Package org.jdesktop.swingx.action
Class OpenBrowserAction
java.lang.Object
javax.swing.AbstractAction
org.jdesktop.swingx.action.OpenBrowserAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
An action for opening a
URI
in a browser. The URI may be null
and if so this
action does nothing.- See Also:
-
Field Summary
FieldsFields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of OpenBrowserActionOpenBrowserAction
(String uri) Creates a new action for the specified URI.OpenBrowserAction
(URI uri) Creates a new action for the specified URI.OpenBrowserAction
(URL url) Creates a new action for the specified URL. -
Method Summary
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
log
-
uri
-
-
Constructor Details
-
OpenBrowserAction
public OpenBrowserAction()Creates a new instance of OpenBrowserAction -
OpenBrowserAction
Creates a new action for the specified URI.- Parameters:
uri
- the URI- Throws:
NullPointerException
- ifuri
isnull
IllegalArgumentException
- if the given string violates RFC 2396
-
OpenBrowserAction
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
Creates a new action for the specified URI.- Parameters:
uri
- the URI
-
-
Method Details
-
getURI
Gets the current URI.- Returns:
- the URI
-
setURI
Sets the current URI.- Parameters:
uri
- the new URI
-
actionPerformed
-