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 boolean
Launches the default browser to display a URI.static boolean
Launches the default browser to display a URI.static boolean
displayURL
(String url) Display a URL in the system browser.static boolean
Launches the default application to edit a file.static boolean
Determines if the desktop API is supported.static boolean
mail()
Launches the default email program without a recipient.static boolean
Launches the default email program with the given address.static boolean
Launches 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
-
-