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, ActionEdgesDisplay, ActionExit, ActionExportXMI, ActionGenerateAll, ActionGenerateOne, ActionGenerateProjectCode, ActionGenerationSettings, ActionGoToCritique, ActionGoToDetails, ActionGoToEdit, ActionImportFromSources, ActionLayout, ActionModifier, ActionMultiplicity, ActionNavigability, ActionNew, ActionNotation, ActionOpenProject, ActionProperties, ActionSaveConfiguration, ActionSaveGraphics, ActionSaveProject, ActionSetSourcePath, ActionSettings, ActionZoom, NavigateTargetBackAction, NavigateTargetForwardAction, UMLChangeAction

public class UMLAction
extends javax.swing.AbstractAction

See Also:
Serialized Form

Field Summary
protected static 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, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cat

protected static Category cat

HAS_ICON

public static boolean HAS_ICON

NO_ICON

public static boolean NO_ICON
Constructor Detail

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)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Perform the work the action is supposed to do.


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()
Specified by:
isEnabled in interface javax.swing.Action
Overrides:
isEnabled in class javax.swing.AbstractAction
See Also:
Action.isEnabled()


ArgoUML © 1996-2003 (20030919)ArgoUML Project HomeArgoUML Cookbook