|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.desktop.ostermiller.Browser
public class Browser
A stripped down version of the Browser class published by Stephen Ostermiller for use by the OSP project. Allows URLs to be opened in the system browser on Windows and Unix. More information about this class is available from ostermiller.org.
Field Summary | |
---|---|
static java.lang.String[] |
exec
A list of commands to try in order to display the url. |
Constructor Summary | |
---|---|
Browser()
|
Method Summary | |
---|---|
static java.lang.String[] |
defaultCommands()
Retrieve the default commands to open a browser for this system. |
static void |
displayURL(java.lang.String url)
Display a URL in the system browser. |
static void |
displayURLs(java.lang.String[] urls)
Display the URLs, each in their own window, in the system browser. |
static void |
init()
Determine appropriate commands to start a browser on the current operating system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String[] exec
rundll32 url.dll,FileProtocolHandler {0}
netscape {0}
Constructor Detail |
---|
public Browser()
Method Detail |
---|
public static void init()
rundll32 url.dll,FileProtocolHandler {0}
On other operating systems, the "which" command is used to
test if Mozilla, netscape, and lynx(xterm) are available (in that
order).
public static java.lang.String[] defaultCommands()
public static void displayURL(java.lang.String url) throws java.io.IOException
url
- the url to display
java.io.IOException
- if the url is not valid or the browser fails to starpublic static void displayURLs(java.lang.String[] urls) throws java.io.IOException
urls
- the list of urls to display
java.io.IOException
- if the url is not valid or the browser fails to star
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |