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:
- ActionAboutArgoUML, ActionAddAllClassesFromModel, ActionAddExistingEdge, ActionAddExistingNode, ActionAddPackage, ActionAggregation, ActionAggregation, ActionAutoCritique, ActionAutoResize, ActionCompartmentDisplay, ActionCompartmentDisplay, ActionCreateMultiple, ActionEdgesDisplay, ActionEdgesDisplay, ActionExit, ActionExportXMI, ActionFind, ActionFlatToDo, ActionGenerateAll, ActionGenerateOne, ActionGenerateProjectCode, ActionGenerationSettings, ActionGoToCritique, ActionGoToDetails, ActionGotoDiagram, ActionGoToEdit, ActionImportFromSources, ActionLayout, ActionModifier, ActionModifier, ActionMultiplicity, ActionMultiplicity, ActionNavigability, ActionNavigability, ActionNew, ActionNewToDoItem, ActionNextEditTab, ActionNotation, ActionOpenCritics, ActionOpenDecisions, ActionOpenGoals, ActionOpenProject, ActionPageSetup, ActionPrint, ActionProperties, ActionProperties, ActionRedo, ActionReopenProject, ActionRevertToSaved, ActionSaveConfiguration, ActionSaveGraphics, ActionSaveProject, ActionSetSourcePath, ActionSettings, ActionShowRapidButtons, ActionSystemInfo, ActionUndo, NavigateTargetBackAction, NavigateTargetForwardAction, NavigatorPane.ActionPerspectiveConfig, ToDoItemAction, UMLChangeAction
- public class UMLAction
- extends javax.swing.AbstractAction
- See Also:
- Serialized Form
Nested classes inherited from class javax.swing.AbstractAction |
|
Field Summary |
protected static org.apache.log4j.Logger |
cat
Deprecated. by Linus Tolke as of 0.15.4. Use your own logger in your
class. This will be removed. |
static boolean |
HAS_ICON
|
private java.lang.String |
iconName
|
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)
Deprecated. in 0.15.1. Replace by getMnemonic and the new way of
retrieving shortcuts. |
java.lang.Object |
getValue(java.lang.String key)
Gets one of this object's properties using the associated key. |
boolean |
isEnabled()
|
void |
markNeedsSave()
|
void |
putValue(java.lang.String key,
java.lang.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. |
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, 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.Logger cat
- Deprecated. by Linus Tolke as of 0.15.4. Use your own logger in your
class. This will be removed.
HAS_ICON
public static boolean HAS_ICON
NO_ICON
public static boolean NO_ICON
iconName
private java.lang.String iconName
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)
putValue
public void putValue(java.lang.String key,
java.lang.Object value)
- Sets one of this object's properties using the associated key. If the
value has changed, a
PropertyChangeEvent
is sent to
listeners.
- Parameters:
key
- a String
containing the key.value
- an Object
value.
getValue
public java.lang.Object getValue(java.lang.String key)
- Gets one of this object's properties using the associated key.
- Parameters:
key
- the name of the property.
- Returns:
- the value of the property.
- See Also:
putValue(String, Object)
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.
- Returns:
- true if the action should be available.
stripJunk
protected static java.lang.String stripJunk(java.lang.String s)
getShortcut
public static final javax.swing.KeyStroke getShortcut(java.lang.String key)
- Deprecated. in 0.15.1. Replace by getMnemonic and the new way of
retrieving shortcuts.
- 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()
- See Also:
Action.isEnabled()