Class OpenBrowserAction

java.lang.Object
javax.swing.AbstractAction
org.jdesktop.swingx.action.OpenBrowserAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class OpenBrowserAction extends AbstractAction
An action for opening a URI in a browser. The URI may be null and if so this action does nothing.
See Also:
  • Field Details

    • log

      private static Logger log
    • uri

      private URI uri
  • Constructor Details

    • OpenBrowserAction

      public OpenBrowserAction()
      Creates a new instance of OpenBrowserAction
    • OpenBrowserAction

      public OpenBrowserAction(String uri)
      Creates a new action for the specified URI.
      Parameters:
      uri - the URI
      Throws:
      NullPointerException - if uri is null
      IllegalArgumentException - if the given string violates RFC 2396
    • OpenBrowserAction

      public OpenBrowserAction(URL url) throws URISyntaxException
      Creates a new action for the specified URL.
      Parameters:
      url - the URL
      Throws:
      URISyntaxException - if the URL cannot be converted to a valid URI
    • OpenBrowserAction

      public OpenBrowserAction(URI uri)
      Creates a new action for the specified URI.
      Parameters:
      uri - the URI
  • Method Details

    • getURI

      public URI getURI()
      Gets the current URI.
      Returns:
      the URI
    • setURI

      public void setURI(URI uri)
      Sets the current URI.
      Parameters:
      uri - the new URI
    • actionPerformed

      public void actionPerformed(ActionEvent e)