public class CompositeAction extends AbstractActionExt
The action ids are represented by the value of the Action.ACTION_COMMAND_KEY
and must be managed by the ActionManager
. When this action is
invoked, then the actions are retrieved from the ActionManager in list order
and invoked.
ActionManager
,
Serialized FormModifier and Type | Field and Description |
---|---|
private static String |
LIST_IDS
Keys for storing extended action attributes.
|
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 |
---|
CompositeAction() |
CompositeAction(String name) |
CompositeAction(String name,
Icon icon) |
CompositeAction(String name,
String command) |
CompositeAction(String name,
String command,
Icon icon) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent evt)
Callback for composite actions.
|
void |
addAction(String id)
Add an action id to the action list.
|
List<String> |
getActionIDs()
Returns a list of action ids which indicates that this is a composite
action.
|
void |
itemStateChanged(ItemEvent evt)
Callback for toggle actions.
|
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, toString
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
private static final String LIST_IDS
public CompositeAction()
public CompositeAction(String name)
public CompositeAction(String name, String command)
name
- display name of the actioncommand
- the value of the action command keypublic CompositeAction(String name, Icon icon)
public CompositeAction(String name, String command, Icon icon)
name
- display name of the actioncommand
- the value of the action command keyicon
- icon to displaypublic void addAction(String id)
public List<String> getActionIDs()
public void actionPerformed(ActionEvent evt)
public void itemStateChanged(ItemEvent evt)
itemStateChanged
in interface ItemListener
itemStateChanged
in class AbstractActionExt
evt
- the ItemEvent fired by a ItemSelectable on changing the selected
state.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses