org.argouml.uml.ui
Class UMLAction
java.lang.Object
|
+--javax.swing.AbstractAction
|
+--org.argouml.uml.ui.UMLAction
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable
- Direct Known Subclasses:
- ActionAddExistingEdge, ActionAddExistingNode, ActionAddPackage, ActionAggregation, ActionAutoResize, ActionCompartmentDisplay, ActionCut, ActionExit, ActionGenerateAll, ActionGenerateOne, ActionGenerateProjectCode, ActionGenerationSettings, ActionGoToCritique, ActionGoToDetails, ActionGoToEdit, ActionImportFromSources, ActionLayout, ActionLoadModelFromDB, ActionModifier, ActionMultiplicity, ActionNavigability, ActionNew, ActionNotation, ActionOpenProject, ActionProperties, ActionSaveConfiguration, ActionSaveGIF, ActionSaveGraphics, ActionSaveProject, ActionSetSourcePath, ActionSettings, ActionStoreModelToDB, ActionZoom, UMLChangeAction
- public class UMLAction
- extends javax.swing.AbstractAction
- See Also:
- Serialized Form
Field Summary |
protected static org.apache.log4j.Category |
cat
|
static boolean |
HAS_ICON
|
static boolean |
NO_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(java.lang.String name)
|
UMLAction(java.lang.String name,
boolean hasIcon)
|
UMLAction(java.lang.String name,
boolean global,
boolean hasIcon)
|
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
Perform the work the action is supposed to do. |
static java.lang.String |
getMnemonic(java.lang.String key)
This function returns a localized string corresponding
to the specified key. |
static javax.swing.KeyStroke |
getShortcut(java.lang.String key)
This function returns a localized menu shortcut key
to the specified key. |
boolean |
isEnabled()
|
void |
markNeedsSave()
|
boolean |
shouldBeEnabled()
return true if this action should be available to the user. |
protected static java.lang.String |
stripJunk(java.lang.String s)
|
void |
updateEnabled()
|
void |
updateEnabled(java.lang.Object target)
|
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cat
protected static org.apache.log4j.Category cat
HAS_ICON
public static boolean HAS_ICON
NO_ICON
public static boolean NO_ICON
UMLAction
public UMLAction(java.lang.String name)
UMLAction
public UMLAction(java.lang.String name,
boolean hasIcon)
UMLAction
public UMLAction(java.lang.String name,
boolean global,
boolean hasIcon)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Perform the work the action is supposed to do.
- Overrides:
actionPerformed
in class javax.swing.AbstractAction
markNeedsSave
public void markNeedsSave()
updateEnabled
public void updateEnabled(java.lang.Object target)
updateEnabled
public void updateEnabled()
shouldBeEnabled
public boolean shouldBeEnabled()
- return true if this action should be available to the user. This
method should examine the ProjectBrowser that owns it. Sublass
implementations of this method should always call
super.shouldBeEnabled first.
stripJunk
protected static java.lang.String stripJunk(java.lang.String s)
getShortcut
public static final javax.swing.KeyStroke getShortcut(java.lang.String key)
- This function returns a localized menu shortcut key
to the specified key.
getMnemonic
public static final java.lang.String getMnemonic(java.lang.String key)
- This function returns a localized string corresponding
to the specified key.
isEnabled
public boolean isEnabled()
- Overrides:
isEnabled
in class javax.swing.AbstractAction
- See Also:
Action.isEnabled()