ehsbe CommonsTM
Version 1.1.0rc3

com.ehsbe.commons.action
Class CompositeAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by com.ehsbe.commons.action.AbstractActionExt
          extended by com.ehsbe.commons.action.ManagedAction
              extended by com.ehsbe.commons.action.CompositeAction
All Implemented Interfaces:
ActionListener, ItemListener, Serializable, Cloneable, EventListener, Action

public class CompositeAction
extends ManagedAction

A class that represents an action which will fire a sequence of actions.

Version:
$Revision: 432 $
Author:
Jens Elkner
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ehsbe.commons.action.ManagedAction
actionListeners, itemListeners
 
Fields inherited from class com.ehsbe.commons.action.AbstractActionExt
GROUP, IS_STATE, LARGE_ICON_P_KEY, SELECT_PROPERTY_NAME, SMALL_ICON_P_KEY
 
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()
          Default constructor.
CompositeAction(String name)
          Create a action with the given name.
CompositeAction(String name, Icon icon)
          Create a action with the given name and icon.
CompositeAction(String name, String command)
          Constructs an Action with the label and command
CompositeAction(String name, String command, Icon icon)
          Constructs an action with the given name, icon and command key.
 
Method Summary
 void addAction(Action action)
          Add an action to the action list.
 Set<Action> getActions()
          Get a list of actions which indicates that this is a composite action.
 void removeAction(Action action)
          Remove the given action from the internal list of actions, where to dispatch events.
 
Methods inherited from class com.ehsbe.commons.action.ManagedAction
actionPerformed, addActionListener, addItemListener, clone, itemStateChanged, removeActionListener, removeItemListener
 
Methods inherited from class com.ehsbe.commons.action.AbstractActionExt
dispose, getAccelerator, getActionCommand, getGroup, getLargeIcon, getLargePressedIcon, getLongDescription, getMnemonic, getName, getShortDescription, getSmallIcon, getSmallPressedIcon, isSelected, isStateAction, setAccelerator, setActionCommand, setGroup, setLargeIcon, setLargePressedIcon, setLongDescription, setMnemonic, setMnemonic, setName, setSelected, setShortDescription, setSmallIcon, setSmallPressedIcon, setStateAction, setStateAction, toString
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, 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()
Default constructor.


CompositeAction

public CompositeAction(String name)
Create a action with the given name.

Parameters:
name - action's name
See Also:
AbstractAction.AbstractAction(String)

CompositeAction

public CompositeAction(String name,
                       String command)
Constructs an Action with the label and command

Parameters:
name - name of the action usually used as a label
command - command key of the action

CompositeAction

public CompositeAction(String name,
                       Icon icon)
Create a action with the given name and icon.

Parameters:
name - action's name
icon - small icon to set
See Also:
AbstractAction.AbstractAction(String, Icon)

CompositeAction

public CompositeAction(String name,
                       String command,
                       Icon icon)
Constructs an action with the given name, icon and command key.

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(Action action)
Add an action to the action list. This action will be invoked when this composite action is invoked.

Parameters:
action - action to add
See Also:
ManagedAction.addActionListener(ActionListener), ManagedAction.addItemListener(ItemListener)

removeAction

public void removeAction(Action action)
Remove the given action from the internal list of actions, where to dispatch events.

Parameters:
action - action to remove.
See Also:
ManagedAction.removeActionListener(ActionListener), ManagedAction.removeItemListener(ItemListener)

getActions

public Set<Action> getActions()
Get a list of actions which indicates that this is a composite action.

Returns:
a valid list of action ids or null

ehsbe CommonsTM
Version 1.1.0rc3

Copyright ©2005-2009 EHSBE, Walther-Rathenau-Str. 58, 39104 Magdeburg, Sachsen-Anhalt, Germany. All Rights Reserved.