Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdesktop.swingx.action
Class CompositeAction

    java.lang.Object
      javax.swing.AbstractAction
          org.jdesktop.swingx.action.AbstractActionExt
              org.jdesktop.swingx.action.CompositeAction

All Implemented Interfaces:
  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

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.

Author:
  Mark Davidson
See Also:
  `ActionManager`, Serialized Form

Field 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, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON`

Constructor Summary
`CompositeAction()`
`CompositeAction(java.lang.String name)`
`CompositeAction(java.lang.String name, javax.swing.Icon icon)`
`CompositeAction(java.lang.String name, java.lang.String command)`
`CompositeAction(java.lang.String name, java.lang.String command, javax.swing.Icon icon)`

Method Summary
`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<java.lang.String>` | `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.

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, toString`

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

### CompositeAction

    public CompositeAction()

### CompositeAction

    public CompositeAction(java.lang.String name)

### CompositeAction

    public CompositeAction(java.lang.String name,
                           java.lang.String command)

Parameters:
  `name` - display name of the action
  `command` - the value of the action command key

### CompositeAction

    public CompositeAction(java.lang.String name,
                           javax.swing.Icon icon)

### CompositeAction

    public CompositeAction(java.lang.String name,
                           java.lang.String command,
                           javax.swing.Icon icon)

Parameters:
  `name` - display name of the action
  `command` - the value of the action command key
  `icon` - icon to display

Method Detail

### addAction

    public void addAction(java.lang.String id)

  Add an action id to the action list. This action will be invoked when this composite action is invoked.

### getActionIDs

    public java.util.List<java.lang.String> getActionIDs()

  Returns a list of action ids which indicates that this is a composite action.

  Returns:
    a valid list of action ids or null

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent evt)

  Callback for composite actions. This method will redispatch the ActionEvent to all the actions held in the list.

### itemStateChanged

    public void itemStateChanged(java.awt.event.ItemEvent evt)

  Callback for toggle actions.

  Specified by:
    `itemStateChanged` in interface `java.awt.event.ItemListener`
  Overrides:
    `itemStateChanged` in class `AbstractActionExt`
  Parameters:
    `evt` - the ItemEvent fired by a ItemSelectable on changing the selected state.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010. All Rights Reserved.