|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.util.ui.BrowserLauncher
public abstract class BrowserLauncher
Browser launcher will open a URL in an external browser on your system. (e.g. Internet Explorer or Netscape). If your browser is already open, a new browser window should be created without starting any new processes.
On Windows systems the system's default browser will be used. On UNIX and other platforms the browser defaults to Netscape. For this default behavior to work, the command 'netscape' must be on your path.
This class was inspired by an article at www.javaworld.com by Steven Spencer. The article is available at http://www.javaworld.com/javaworld/javatips/jw-javatip66.html .
Constructor Summary | |
---|---|
BrowserLauncher()
|
Method Summary | |
---|---|
static boolean |
isWindowsPlatform()
Try to determine whether this application is running under Windows or some other platform by examing the "os.name" property. |
static void |
main(java.lang.String[] argv)
Opens the URL specified on the command line in the system browser. |
static void |
showDocument(java.lang.String url)
Display a file in the system browser. |
static void |
showDocument(java.net.URL url)
Display a file in the system browser. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BrowserLauncher()
Method Detail |
---|
public static void showDocument(java.net.URL url)
url
- the file's urlpublic static void showDocument(java.lang.String url)
url
- the file's url (the url must start with either
"http://" or "file://").public static boolean isWindowsPlatform()
public static void main(java.lang.String[] argv)
argv
- argument array. Only the first argument is considered.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |