org.jdesktop.swingx.hyperlink
Class AbstractHyperlinkAction<T>
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.jdesktop.swingx.action.AbstractActionExt
-
- org.jdesktop.swingx.hyperlink.AbstractHyperlinkAction<T>
-
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.awt.event.ItemListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
- Direct Known Subclasses:
- HyperlinkAction, LinkModelAction
public abstract class AbstractHyperlinkAction<T> extends AbstractActionExt
Convenience implementation to simplifyJXHyperlinkconfiguration and provide minimal api.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringVISITED_KEYKey for the visited property value.-
Fields inherited from class org.jdesktop.swingx.action.AbstractActionExt
GROUP, IS_STATE, LARGE_ICON
-
-
Constructor Summary
Constructors Constructor and Description AbstractHyperlinkAction()Instantiates a LinkAction with null target.AbstractHyperlinkAction(T target)Instantiates a LinkAction with a target of type targetClass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description TgetTarget()booleanisVisited()voiditemStateChanged(java.awt.event.ItemEvent e)Callback method asItemListener.voidsetStateAction(boolean state)Set the state property.voidsetTarget(T target)PRE: isTargetable(target)voidsetVisited(boolean visited)Set the visited property.-
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
-
-
-
-
Field Detail
-
VISITED_KEY
public static final java.lang.String VISITED_KEY
Key for the visited property value.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractHyperlinkAction
public AbstractHyperlinkAction()
Instantiates a LinkAction with null target.
-
AbstractHyperlinkAction
public AbstractHyperlinkAction(T target)
Instantiates a LinkAction with a target of type targetClass. The visited property is initialized as defined byinstallTarget()- Parameters:
target- the target this action should act on.
-
-
Method Detail
-
setVisited
public void setVisited(boolean visited)
Set the visited property.- Parameters:
visited-
-
isVisited
public boolean isVisited()
- Returns:
- visited state
-
getTarget
public T getTarget()
-
setTarget
public void setTarget(T target)
PRE: isTargetable(target)- Parameters:
target-
-
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent e)
Description copied from class:AbstractActionExtCallback method asItemListener. Updates internal state based on the given ItemEvent.Here: synchs selected property if isStateAction(), does nothing otherwise.
- Specified by:
itemStateChangedin interfacejava.awt.event.ItemListener- Overrides:
itemStateChangedin classAbstractActionExt- Parameters:
e- the ItemEvent fired by a ItemSelectable on changing the selected state.
-
setStateAction
public void setStateAction(boolean state)
Set the state property. Overridden to to nothing. PENDING: really?- Overrides:
setStateActionin classAbstractActionExt- Parameters:
state- if true then this action will fire ItemEvents
-
-
DataMelt 3.0 © DataMelt by jWork.ORG