Package org.openstreetmap.josm.tools
Class OpenBrowser
- java.lang.Object
-
- org.openstreetmap.josm.tools.OpenBrowser
-
public final class OpenBrowser extends java.lang.Object
Helper to open platform web browser on different platforms This now delegates the real work to a platform specific class.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
OpenBrowser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
displayUrl(java.lang.String url)
Displays an external URL using platform associated software.static java.lang.String
displayUrl(java.net.URI uri)
Displays an external URI using platform associated software.
-
-
-
Constructor Detail
-
OpenBrowser
private OpenBrowser()
-
-
Method Detail
-
displayUrl
public static java.lang.String displayUrl(java.net.URI uri)
Displays an external URI using platform associated software. A web resource will launch platform's browser, an audio file URI will launch audio player, etc.- Parameters:
uri
- The URI to display- Returns:
null
for success or a string in case of an error.- Throws:
java.lang.IllegalStateException
- if no platform is set to which opening the URL can be dispatched,PlatformManager.getPlatform()
-
displayUrl
public static java.lang.String displayUrl(java.lang.String url)
Displays an external URL using platform associated software. A web resource will launch platform's browser, an audio file URL will launch audio player, etc.- Parameters:
url
- The URL to display- Returns:
null
for success or a string in case of an error.- Throws:
java.lang.IllegalStateException
- if no platform is set to which opening the URL can be dispatched,PlatformManager.getPlatform()
-
-