org.jdesktop.swingx.hyperlink
Class LinkModelAction<T extends LinkModel>
java.lang.Object
javax.swing.AbstractAction
org.jdesktop.swingx.action.AbstractActionExt
org.jdesktop.swingx.hyperlink.AbstractHyperlinkAction<T>
org.jdesktop.swingx.hyperlink.LinkModelAction<T>
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.awt.event.ItemListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class LinkModelAction<T extends LinkModel>
- extends AbstractHyperlinkAction<T>
Specialized LinkAction for a target of type LinkModel
.
This action delegates actionPerformed to vistingDelegate.
PENDING: move to swingx package?
- Author:
- Jeanette Winzenburg
- See Also:
- Serialized Form
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 |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
This action delegates to the visitingDelegate if both
delegate and target are ! |
void |
setVisitingDelegate(java.awt.event.ActionListener delegate)
The delegate to invoke on actionPerformed. |
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, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VISIT_ACTION
public static final java.lang.String VISIT_ACTION
- See Also:
- Constant Field Values
LinkModelAction
public LinkModelAction()
LinkModelAction
public LinkModelAction(java.awt.event.ActionListener visitingDelegate)
LinkModelAction
public LinkModelAction(T target)
LinkModelAction
public LinkModelAction(T target,
java.awt.event.ActionListener visitingDelegate)
setVisitingDelegate
public void setVisitingDelegate(java.awt.event.ActionListener delegate)
- The delegate to invoke on actionPerformed.
The delegates actionPerformed is invoked with an ActionEvent
having the target as source. Delegates are expected to
cope gracefully with the T.
PENDING: JW - How to formalize?
- Parameters:
delegate
- the action invoked on the target.
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- This action delegates to the visitingDelegate if both
delegate and target are != null, does nothing otherwise.
The actionEvent carries the target as source.
PENDING: pass through a null target? - most probably!