Package org.opensourcephysics.desktop
Class OSPDesktop
java.lang.Object
org.opensourcephysics.desktop.OSPDesktop
OSPDesktop invokes the java.awt.Desktop API using reflection for Java 1.5 compatibility.
- Author:
- Wolfgang Christian
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanLaunches the default browser to display a URI.static booleanLaunches the default browser to display a URI.static booleandisplayURL(String url) Display a URL in the system browser.static booleanLaunches the default application to edit a file.static booleanDetermines if the desktop API is supported.static booleanmail()Launches the default email program without a recipient.static booleanLaunches the default email program with the given address.static booleanLaunches the default application to edit a file.
-
Constructor Details
-
OSPDesktop
public OSPDesktop()
-
-
Method Details
-
displayURL
Display a URL in the system browser. Attempts to open URL with desktop API if available; attempts Ostermiller code otherwise.- Returns:
- true if successful
-
isDesktopSupported
public static boolean isDesktopSupported()Determines if the desktop API is supported.- Returns:
- true if the desktop API is supported.
-
browse
Launches the default browser to display a URI.- Parameters:
uriName-
-
browse
Launches the default browser to display a URI.- Parameters:
uri-- Returns:
- true if successful
-
mail
Launches the default email program with the given address.- Parameters:
addr-- Returns:
- true if successful
-
mail
public static boolean mail()Launches the default email program without a recipient.- Returns:
- true if successful
-
edit
Launches the default application to edit a file.- Parameters:
file-
-
open
Launches the default application to edit a file.- Parameters:
file-
-