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 final String
    The name of a property for a Properties object used to define an alternative web browser command.
    static final String
    A boolean indicating whether to attempt to use Cytoscape's internal web browser.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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 Details

    • 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:
    • USE_CYBROWSER

      static final String USE_CYBROWSER
      A boolean indicating whether to attempt to use Cytoscape's internal web browser.
      See Also:
  • Method Details

    • 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.