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.AbstractActionAn action for opening aURIin a browser. The URI may benulland 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 voidactionPerformed(java.awt.event.ActionEvent e)java.net.URIgetURI()Gets the current URI.voidsetURI(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- ifuriisnulljava.lang.IllegalArgumentException- if the given string violates RFC 2396
-
OpenBrowserAction
public OpenBrowserAction(java.net.URL url) throws java.net.URISyntaxExceptionCreates 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
-
-