public class TargetableAction extends AbstractActionExt
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 FormModifier and Type | Field and Description |
---|---|
private TargetManager |
targetManager |
GROUP, IS_STATE, LARGE_ICON
changeSupport, enabled
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 and Description |
---|
TargetableAction() |
TargetableAction(String name) |
TargetableAction(String name,
Icon icon) |
TargetableAction(String name,
String command) |
TargetableAction(String name,
String command,
Icon icon) |
Modifier and Type | Method and Description |
---|---|
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() |
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
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
private TargetManager targetManager
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)
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()
toString
in class AbstractActionExt
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses