Package org.jdesktop.swingx.action
Class OpenBrowserAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.jdesktop.swingx.action.OpenBrowserAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
public class OpenBrowserAction extends javax.swing.AbstractAction
An action for opening aURI
in a browser. The URI may benull
and if so this action does nothing.- Author:
- Karl Schaefer, joshy (original version)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OpenBrowserAction()
Creates a new instance of OpenBrowserActionOpenBrowserAction(java.lang.String uri)
Creates a new action for the specified URI.OpenBrowserAction(java.net.URI uri)
Creates a new action for the specified URI.OpenBrowserAction(java.net.URL url)
Creates a new action for the specified URL.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
java.net.URI
getURI()
Gets the current URI.void
setURI(java.net.URI uri)
Sets the current URI.-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Constructor Detail
-
OpenBrowserAction
public OpenBrowserAction()
Creates a new instance of OpenBrowserAction
-
OpenBrowserAction
public OpenBrowserAction(java.lang.String uri)
Creates a new action for the specified URI.- Parameters:
uri
- the URI- Throws:
java.lang.NullPointerException
- ifuri
isnull
java.lang.IllegalArgumentException
- if the given string violates RFC 2396
-
OpenBrowserAction
public OpenBrowserAction(java.net.URL url) throws java.net.URISyntaxException
Creates a new action for the specified URL.- Parameters:
url
- the URL- Throws:
java.net.URISyntaxException
- if the URL cannot be converted to a valid URI
-
OpenBrowserAction
public OpenBrowserAction(java.net.URI uri)
Creates a new action for the specified URI.- Parameters:
uri
- the URI
-
-