Package weka.gui

Class BrowserHelper

java.lang.Object
weka.gui.BrowserHelper

public class BrowserHelper extends Object
A little helper class for browser related stuff.

The openURL method is based on Bare Bones Browser Launch, which is placed in the public domain.

Version:
$Revision: 12296 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
  • Field Details

    • LINUX_BROWSERS

      public static final String[] LINUX_BROWSERS
      Linux/Unix binaries to look for
  • Constructor Details

    • BrowserHelper

      public BrowserHelper()
  • Method Details

    • openURL

      public static void openURL(String url)
      opens the URL in a browser.
      Parameters:
      url - the URL to open
    • openURL

      public static void openURL(Component parent, String url)
      opens the URL in a browser.
      Parameters:
      parent - the parent component
      url - the URL to open
    • openURL

      public static void openURL(Component parent, String url, boolean showDialog)
      opens the URL in a browser.
      Parameters:
      parent - the parent component
      url - the URL to open
      showDialog - whether to display a dialog in case of an error or just print the error to the console
    • createLink

      public static JLabel createLink(String url, String text)
      Generates a label with a clickable link.
      Parameters:
      url - the url of the link
      text - the text to display instead of URL. if null or of length 0 then the URL is used
      Returns:
      the generated label