|
||||||||||
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.action.TargetableAction
public class TargetableAction
A class that represents a dynamically targetable action. The invocation of this
action will be dispatched to the TargetManager
instance.
You would create instances of this class to let the TargetManager handle the action invocations from the ui components constructed with this action. The TargetManager could be configured depending on application state to handle these actions.
TargetManager
,
Serialized FormField Summary |
---|
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 | |
---|---|
TargetableAction()
|
|
TargetableAction(String name)
|
|
TargetableAction(String name,
Icon icon)
|
|
TargetableAction(String name,
String command)
|
|
TargetableAction(String name,
String command,
Icon icon)
|
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent evt)
Callback for command actions. |
TargetManager |
getTargetManager()
Returns the target manager instance which will be used for action dispatch. |
void |
itemStateChanged(ItemEvent evt)
Callback for toggle actions. |
void |
setTargetManager(TargetManager tm)
Set target manager which will handle this command. |
String |
toString()
Returns a string representation of the object. |
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, setStateAction |
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 TargetableAction()
public TargetableAction(String name)
public TargetableAction(String name, String command)
name
- display name of the actioncommand
- the value of the action command keypublic TargetableAction(String name, String command, Icon icon)
name
- display name of the actioncommand
- the value of the action command keyicon
- icon to displaypublic TargetableAction(String name, Icon icon)
Method Detail |
---|
public void setTargetManager(TargetManager tm)
tm
- the target manager instance to dispatch the actionspublic TargetManager getTargetManager()
public void actionPerformed(ActionEvent evt)
evt
- event which will be forwarded to the TargetManagerTargetManager
public void itemStateChanged(ItemEvent evt)
itemStateChanged
in interface ItemListener
itemStateChanged
in class AbstractActionExt
evt
- event which will be forwarded to the TargetManagerTargetManager
public String toString()
java.lang.Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
in class AbstractActionExt
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |