Package org.cytoscape.util.swing
Interface OpenBrowser
-
public interface OpenBrowser
A utility provided as an OSGi service for opening a web browser. The Cytoscape property "defaultWebBrowser" may be set with an alternative command for opening a different web browser than default.Module:
swing-util-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>swing-util-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEF_WEB_BROWSER_PROP_NAME
The name of a property for a Properties object used to define an alternative web browser command.static String
USE_CYBROWSER
A boolean indicating whether to attempt to use Cytoscape's internal web browser.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
openURL(String url)
Opens a web browser pointing to the specified URL.boolean
openURL(String url, boolean useCyBrowser)
Opens a web browser pointing to the specified URL.
-
-
-
Field Detail
-
DEF_WEB_BROWSER_PROP_NAME
static final String DEF_WEB_BROWSER_PROP_NAME
The name of a property for a Properties object used to define an alternative web browser command.- See Also:
- Constant Field Values
-
USE_CYBROWSER
static final String USE_CYBROWSER
A boolean indicating whether to attempt to use Cytoscape's internal web browser.- See Also:
- Constant Field Values
-
-
Method Detail
-
openURL
boolean openURL(String url)
Opens a web browser pointing to the specified URL.- Parameters:
url
- A string URL that should be opened in the web browser.- Returns:
- Whether the browser opened successfully or not.
-
openURL
boolean openURL(String url, boolean useCyBrowser)
Opens a web browser pointing to the specified URL.- Parameters:
url
- A string URL that should be opened in the web browser.useCyBrowser
- a boolean that provides control over whether to use the internal browser or not- Returns:
- Whether the browser opened successfully or not.
-
-