|
||||||||||
| 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<T>
public abstract class AbstractHyperlinkAction<T>
Convenience implementation to simplify JXHyperlink configuration and
provide minimal api.
PENDING: rename to AbstractLinkAction
| Field Summary | |
|---|---|
protected T |
target
the object the actionPerformed can act on. |
static String |
VISITED_KEY
Key for the visited property value. |
| 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, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
AbstractHyperlinkAction()
Instantiates a LinkAction with null target. |
|
AbstractHyperlinkAction(T target)
Instantiates a LinkAction with a target of type targetClass. |
|
| Method Summary | |
|---|---|
T |
getTarget()
|
protected void |
installTarget()
hook for subclasses to update internal state after a new target has been set. |
boolean |
isVisited()
|
void |
itemStateChanged(ItemEvent e)
Callback method as ItemListener. |
void |
setStateAction(boolean state)
Set the state property. |
void |
setTarget(T target)
PRE: isTargetable(target) |
void |
setVisited(boolean visited)
Set the visited property. |
protected void |
uninstallTarget()
hook for subclasses to cleanup before the old target is overwritten. |
| 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 |
| Methods inherited from interface java.awt.event.ActionListener |
|---|
actionPerformed |
| Field Detail |
|---|
public static final String VISITED_KEY
protected T target
| Constructor Detail |
|---|
public AbstractHyperlinkAction()
public AbstractHyperlinkAction(T target)
installTarget()
target - the target this action should act on.| Method Detail |
|---|
public void setVisited(boolean visited)
visited - public boolean isVisited()
public T getTarget()
public void setTarget(T target)
target - protected void installTarget()
Subclasses are free to decide the details. Here:
protected void uninstallTarget()
Subclasses are free to decide the details. Here: does nothing.
public void itemStateChanged(ItemEvent e)
AbstractActionExtItemListener. Updates internal state based
on the given ItemEvent. Here: synchs selected property if isStateAction(), does nothing otherwise.
itemStateChanged in interface ItemListeneritemStateChanged in class AbstractActionExte - the ItemEvent fired by a ItemSelectable on changing the selected
state.public void setStateAction(boolean state)
setStateAction in class AbstractActionExtstate - if true then this action will fire ItemEvents
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||