weka.gui
Class BrowserHelper
- java.lang.Object
-
- weka.gui.BrowserHelper
-
public class BrowserHelper extends java.lang.ObjectA little helper class for browser related stuff. TheopenURLmethod is based on Bare Bones Browser Launch, which is placed in the public domain.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String[]LINUX_BROWSERSLinux/Unix binaries to look for
-
Constructor Summary
Constructors Constructor and Description BrowserHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static javax.swing.JLabelcreateLink(java.lang.String url, java.lang.String text)Generates a label with a clickable link.static voidopenURL(java.awt.Component parent, java.lang.String url)opens the URL in a browser.static voidopenURL(java.awt.Component parent, java.lang.String url, boolean showDialog)opens the URL in a browser.static voidopenURL(java.lang.String url)opens the URL in a browser.
-
-
-
Field Detail
-
LINUX_BROWSERS
public static final java.lang.String[] LINUX_BROWSERS
Linux/Unix binaries to look for
-
-
Method Detail
-
openURL
public static void openURL(java.lang.String url)
opens the URL in a browser.- Parameters:
url- the URL to open
-
openURL
public static void openURL(java.awt.Component parent, java.lang.String url)opens the URL in a browser.- Parameters:
parent- the parent componenturl- the URL to open
-
openURL
public static void openURL(java.awt.Component parent, java.lang.String url, boolean showDialog)opens the URL in a browser.- Parameters:
parent- the parent componenturl- the URL to openshowDialog- whether to display a dialog in case of an error or just print the error to the console
-
createLink
public static javax.swing.JLabel createLink(java.lang.String url, java.lang.String text)Generates a label with a clickable link.- Parameters:
url- the url of the linktext- the text to display instead of URL. if null or of length 0 then the URL is used- Returns:
- the generated label
-
-
DataMelt 3.0 © DataMelt by jWork.ORG