|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
com.ehsbe.commons.action.AbstractActionExt
com.ehsbe.commons.action.ManagedAction
public class ManagedAction
An extended abstract action, which delegates action and item events to its listeners.
Field Summary | |
---|---|
protected CopyOnWriteArrayList<ActionListener> |
actionListeners
all registered action listeners |
protected CopyOnWriteArrayList<ItemListener> |
itemListeners
all registered item listeners |
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 | |
---|---|
ManagedAction(String name)
Create a action with the given name. |
|
ManagedAction(String name,
Icon icon)
Create a action with the given name and icon. |
|
ManagedAction(String name,
String command)
Constructs an Action with the label and command |
|
ManagedAction(String name,
String command,
Icon icon)
Constructs an action with the given name, icon and command key. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
|
void |
addActionListener(ActionListener listener)
Register the given listener for receiving action events sent by registered actions of this instance. |
void |
addItemListener(ItemListener listener)
Register the given listener for receiving item events sent by registered actions of this instance. |
ManagedAction |
clone()
Create a copy of this object, but does not copy its item, action and property change listeners. |
void |
itemStateChanged(ItemEvent e)
|
void |
removeActionListener(ActionListener listener)
Unregister the given listener for receiving action events sent by registered actions of this instance. |
void |
removeItemListener(ItemListener listener)
Unregister the given listener for receiving item events sent by registered actions of this instance. |
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 |
Field Detail |
---|
protected CopyOnWriteArrayList<ActionListener> actionListeners
protected CopyOnWriteArrayList<ItemListener> itemListeners
Constructor Detail |
---|
public ManagedAction(String name)
name
- action's nameAbstractAction.AbstractAction(String)
public ManagedAction(String name, Icon icon)
name
- action's nameicon
- small icon to setAbstractAction.AbstractAction(String, Icon)
public ManagedAction(String name, String command)
name
- name of the action usually used as a labelcommand
- command key of the actionpublic ManagedAction(String name, String command, Icon icon)
name
- display name of the actioncommand
- the value of the action command keyicon
- icon to displayMethod Detail |
---|
public void addActionListener(ActionListener listener)
listener
- listener to addpublic void addItemListener(ItemListener listener)
listener
- listener to addpublic void removeActionListener(ActionListener listener)
listener
- listener to removepublic void removeItemListener(ItemListener listener)
listener
- listener to removepublic void actionPerformed(ActionEvent e)
public void itemStateChanged(ItemEvent e)
public ManagedAction clone() throws CloneNotSupportedException
clone
in class AbstractActionExt
CloneNotSupportedException
|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |