java.awt.event.ActionListener
, java.awt.event.ItemListener
, java.io.Serializable
, java.lang.Cloneable
, java.util.EventListener
, javax.swing.Action
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 FormGROUP, IS_STATE, LARGE_ICON
Constructor | Description |
---|---|
CompositeAction() |
|
CompositeAction(java.lang.String name) |
|
CompositeAction(java.lang.String name,
java.lang.String command) |
|
CompositeAction(java.lang.String name,
java.lang.String command,
javax.swing.Icon icon) |
|
CompositeAction(java.lang.String name,
javax.swing.Icon icon) |
Modifier and Type | Method | Description |
---|---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt) |
Callback for composite actions.
|
void |
addAction(java.lang.String id) |
Add an action id to the action list.
|
java.util.List |
getActionIDs() |
Returns a list of action ids which indicates that this is a composite
action.
|
void |
itemStateChanged(java.awt.event.ItemEvent evt) |
Callback for toggle actions.
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
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
public CompositeAction()
public CompositeAction(java.lang.String name)
public CompositeAction(java.lang.String name, java.lang.String command)
name
- display name of the actioncommand
- the value of the action command keypublic CompositeAction(java.lang.String name, javax.swing.Icon icon)
public CompositeAction(java.lang.String name, java.lang.String command, javax.swing.Icon icon)
name
- display name of the actioncommand
- the value of the action command keyicon
- icon to displaypublic void addAction(java.lang.String id)
public java.util.List getActionIDs()
public void actionPerformed(java.awt.event.ActionEvent evt)
public void itemStateChanged(java.awt.event.ItemEvent evt)
itemStateChanged
in interface java.awt.event.ItemListener
itemStateChanged
in class AbstractActionExt
evt
- the ItemEvent fired by a ItemSelectable on changing the selected
state.