net.sf.sdedit.util
Class Browser

java.lang.Object
  extended by net.sf.sdedit.util.Browser
All Implemented Interfaces:
EventListener, HyperlinkListener

public class Browser
extends Object
implements HyperlinkListener

A HyperlinkListener implementation that opens a browser for http hyperlinks, using java.awt.Desktop, and thus only working when JDK version >= is available at runtime.

Author:
Markus Strauch

Method Summary
static Browser getBrowser()
          Returns the singleton Browser instance.
 void hyperlinkUpdate(HyperlinkEvent e)
          Opens the browser in order to display the website belonging to the URL that was clicked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBrowser

public static Browser getBrowser()
Returns the singleton Browser instance.

Returns:
the singleton Browser instance

hyperlinkUpdate

public void hyperlinkUpdate(HyperlinkEvent e)
Opens the browser in order to display the website belonging to the URL that was clicked.

Specified by:
hyperlinkUpdate in interface HyperlinkListener
Parameters:
e - event encapsulation the click of the URL


Copyright © 2011. All Rights Reserved.