Class CompositeAction
java.lang.Object
javax.swing.AbstractAction
org.jdesktop.swingx.action.AbstractActionExt
org.jdesktop.swingx.action.CompositeAction
- All Implemented Interfaces:
ActionListener, ItemListener, Serializable, Cloneable, EventListener, Action
A class that represents an action which will fire a sequence of actions.
The action ids are added to the internal list. When this action is invoked,
the event will be dispatched to the actions in the internal list.
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.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringKeys for storing extended action attributes.Fields inherited from class AbstractActionExt
GROUP, IS_STATE, LARGE_ICONFields inherited from class AbstractAction
changeSupport, enabledFields inherited from interface Action
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 Summary
ConstructorsConstructorDescriptionCompositeAction(String name) CompositeAction(String name, String command) CompositeAction(String name, String command, Icon icon) CompositeAction(String name, Icon icon) -
Method Summary
Modifier and TypeMethodDescriptionvoidCallback for composite actions.voidAdd an action id to the action list.Returns a list of action ids which indicates that this is a composite action.voidCallback for toggle actions.Methods inherited from class 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, toStringMethods inherited from class AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
LIST_IDS
Keys for storing extended action attributes. May make public.- See Also:
-
-
Constructor Details
-
CompositeAction
public CompositeAction() -
CompositeAction
-
CompositeAction
-
CompositeAction
-
CompositeAction
-
-
Method Details
-
addAction
Add an action id to the action list. This action will be invoked when this composite action is invoked. -
getActionIDs
-
actionPerformed
Callback for composite actions. This method will redispatch the ActionEvent to all the actions held in the list. -
itemStateChanged
Callback for toggle actions.- Specified by:
itemStateChangedin interfaceItemListener- Overrides:
itemStateChangedin classAbstractActionExt- Parameters:
evt- the ItemEvent fired by a ItemSelectable on changing the selected state.
-