|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.AbstractAction
org.tigris.gef.undo.UndoableAction
org.argouml.uml.ui.UMLAction
The prototype of all actions within ArgoUML.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.AbstractAction |
|
| Field Summary | |
static boolean |
HAS_ICON
Constant for determining the icon. |
private String |
iconName
The key for the icon name. |
private static Logger |
LOG
Logger. |
static boolean |
NO_ICON
Constant for determining the icon. |
| Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
UMLAction(String name)
The constructor for a non-global action with icon. |
|
UMLAction(String key,
boolean hasIcon)
The constructor for a non-global action. |
|
UMLAction(String key,
boolean global,
boolean hasIcon)
The constructor. |
|
| Method Summary | |
static String |
getMnemonic(String key)
This function returns a localized string corresponding to the specified key. |
Object |
getValue(String key)
Gets one of this object's properties using the associated key. |
boolean |
isEnabled()
|
void |
oldActionPerformed(ActionEvent e)
Perform the work the action is supposed to do. |
void |
putValue(String key,
Object value)
Sets one of this object's properties using the associated key. |
boolean |
shouldBeEnabled()
Return true if this action should be available to the user. |
void |
updateEnabled()
Enable the action if it should be enabled. |
void |
updateEnabled(Object target)
|
| Methods inherited from class org.tigris.gef.undo.UndoableAction |
actionPerformed |
| Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final Logger LOG
public static final boolean HAS_ICON
public static final boolean NO_ICON
private String iconName
| Constructor Detail |
public UMLAction(String name)
name - the (to be localized) description of the action
public UMLAction(String key,
boolean hasIcon)
key - the (to be localized) name of the actionhasIcon - true if an icon is to be shown
public UMLAction(String key,
boolean global,
boolean hasIcon)
hasIcon - true if an icon has to be shownkey - the (to be localized) name of the actionglobal - the action is global, i.e. implements shouldBeEnabled(),
and listens to Target changes| Method Detail |
public void putValue(String key,
Object value)
PropertyChangeEvent is sent to
listeners.
key - a String containing the key.value - an Object value.public Object getValue(String key)
key - the name of the property.
putValue(String, Object)public void oldActionPerformed(ActionEvent e)
ActionListener.actionPerformed(java.awt.event.ActionEvent)public void updateEnabled(Object target)
target - the action to be enabledpublic void updateEnabled()
public boolean shouldBeEnabled()
"Global" actions shall implement this function! - Otherwise it is not usefull to make them global...
public static final String getMnemonic(String key)
key - the given key
public boolean isEnabled()
Action.isEnabled()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| ArgoUML © 1996-2005 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |