Package ucar.unidata.idv.control
Class WebBrowser
java.lang.Object
ucar.unidata.idv.control.WebBrowser
A simple utility class for opening a web browser to a given link.
-
Method Summary
-
Method Details
-
browse
Attempts to use the system default browser to visiturl
. Tries looking for and executing any browser specified by the IDV property "idv.browser.path".If the property wasn't given or there was an error, try the new (as of Java 1.6) way of opening a browser.
If the previous attempts failed (or we're in 1.5), we finally try some more primitive measures.
Note: if you are trying to use this method with a
JTextPane
you may need to turn off editing viaJTextComponent.setEditable(boolean)
.- Parameters:
url
- URL to visit.- See Also:
-
useBrowserForUrl
Test whether or not a given URL should be opened in a web browser.- Parameters:
url
- URL to test. Cannot benull
.- Returns:
true
ifurl
begins with either "http:" or "https:".
-
main
-