|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
org.jdesktop.swingx.action.AbstractActionExt
org.jdesktop.swingx.hyperlink.AbstractHyperlinkAction<URI>
org.jdesktop.swingx.hyperlink.HyperlinkAction
public class HyperlinkAction
A implementation wrapping Desktop actions BROWSE and MAIL, that is
URI-related.
| Field Summary |
|---|
| Fields inherited from class org.jdesktop.swingx.hyperlink.AbstractHyperlinkAction |
|---|
target, VISITED_KEY |
| Fields inherited from class org.jdesktop.swingx.action.AbstractActionExt |
|---|
GROUP, IS_STATE, LARGE_ICON |
| Fields 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 | |
|---|---|
HyperlinkAction()
Instantiates a HyperlinkAction with action type BROWSE. |
|
HyperlinkAction(Desktop.Action desktopAction)
Instantiates a HyperlinkAction with the given action type. |
|
HyperlinkAction(URI uri,
Desktop.Action desktopAction)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
Invoked when an action occurs. |
static HyperlinkAction |
createHyperlinkAction(URI uri)
Factory method to create and return a HyperlinkAction for the given uri. |
static HyperlinkAction |
createHyperlinkAction(URI uri,
Desktop.Action type)
Creates and returns a HyperlinkAction with the given target and action type. |
Desktop.Action |
getDesktopAction()
|
protected void |
installTarget()
hook for subclasses to update internal state after a new target has been set. |
| Methods inherited from class org.jdesktop.swingx.hyperlink.AbstractHyperlinkAction |
|---|
getTarget, isVisited, itemStateChanged, setStateAction, setTarget, setVisited, uninstallTarget |
| Methods inherited from class org.jdesktop.swingx.action.AbstractActionExt |
|---|
dispose, getAccelerator, getActionCommand, getGroup, getLargeIcon, getLongDescription, getMnemonic, getName, getShortDescription, getSmallIcon, isSelected, isStateAction, setAccelerator, setActionCommand, setGroup, setLargeIcon, setLongDescription, setMnemonic, setMnemonic, setName, setSelected, setShortDescription, setSmallIcon, setStateAction, toString |
| Methods inherited from class javax.swing.AbstractAction |
|---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HyperlinkAction()
HeadlessException - if GraphicsEnvironment.isHeadless() returns true
UnsupportedOperationException - if the current platform doesn't support
Desktop
IllegalArgumentException - if unsupported action typepublic HyperlinkAction(Desktop.Action desktopAction)
desktopAction - the type of desktop action this class should perform, must be
BROWSE or MAIL
HeadlessException - if GraphicsEnvironment.isHeadless() returns true
UnsupportedOperationException - if the current platform doesn't support
Desktop
IllegalArgumentException - if unsupported action type
public HyperlinkAction(URI uri,
Desktop.Action desktopAction)
uri - the target uri, maybe null.desktopAction - the type of desktop action this class should perform, must be
BROWSE or MAIL
HeadlessException - if GraphicsEnvironment.isHeadless() returns true
UnsupportedOperationException - if the current platform doesn't support
Desktop
IllegalArgumentException - if unsupported action type| Method Detail |
|---|
public static HyperlinkAction createHyperlinkAction(URI uri)
uri - to uri to create a HyperlinkAction for, maybe null.
HeadlessException - if GraphicsEnvironment.isHeadless() returns true
UnsupportedOperationException - if the current platform doesn't support
Desktop
public static HyperlinkAction createHyperlinkAction(URI uri,
Desktop.Action type)
uri - the target uri, maybe null.desktopAction - the type of desktop action this class should perform, must be
BROWSE or MAIL
HeadlessException - if GraphicsEnvironment.isHeadless() returns true
UnsupportedOperationException - if the current platform doesn't support
Desktop
IllegalArgumentException - if unsupported action typepublic void actionPerformed(ActionEvent e)
Implemented to perform the appropriate Desktop action if supported on the current target. Sets the visited property to true if the desktop action doesn't throw an exception or to false if it did. Does nothing if the action isn't supported.
public Desktop.Action getDesktopAction()
protected void installTarget()
AbstractHyperlinkActionSubclasses are free to decide the details. Here:
installTarget in class AbstractHyperlinkAction<URI>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||