Package org.graffiti.plugin.actions
Class GraffitiAction
java.lang.Object
javax.swing.AbstractAction
org.graffiti.plugin.actions.GraffitiAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
- Direct Known Subclasses:
CloneViewAction
,CloseViewAction
,EditRedoAction
,EditUndoAction
,ExitAction
,FileCloseAction
,FileNewAction
,FileOpenAction
,FileOpenAction
,FileSaveAction
,FileSaveAllAction
,FileSaveAsAction
,FileSaveAsAction
,PluginManagerEditAction
,RedrawViewAction
,RunAlgorithm
,SelectionAction
,SelectionChangeAction
,SelectionSaveAction
,ShowPreferencesAction
,ViewNewAction
public abstract class GraffitiAction extends AbstractAction
Represents the basic action in the graffiti system.
- Version:
- $Revision: 1.9 $
- See Also:
- Serialized Form
-
Field Summary
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
Constructors Constructor Description GraffitiAction(String name, MainFrame mainFrame, String helpID)
Constructs a new GraffitiAction from the given name. -
Method Summary
Modifier and Type Method Description HelpContext
getHelpContext()
Returns the help context for this action.String
getName()
Returns the abstract name of the action.abstract boolean
isEnabled()
Returnstrue
, if this action is enabled.static boolean
performAction(String name)
void
setEnabled(boolean enableNow)
void
update()
Updates the state of the action.static void
updateAllActions()
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
-
Constructor Details
-
GraffitiAction
Constructs a new GraffitiAction from the given name.- Parameters:
name
- the name for the actionmainFrame
- DOCUMENT ME!
-
-
Method Details
-
performAction
-
isEnabled
public abstract boolean isEnabled()Returnstrue
, if this action is enabled.- Specified by:
isEnabled
in interfaceAction
- Overrides:
isEnabled
in classAbstractAction
- Returns:
true
, if this action is enabled.
-
getHelpContext
Returns the help context for this action.- Returns:
- the help context for this action.
-
setEnabled
public void setEnabled(boolean enableNow)- Specified by:
setEnabled
in interfaceAction
- Overrides:
setEnabled
in classAbstractAction
- See Also:
AbstractAction.setEnabled(boolean)
-
getName
Returns the abstract name of the action.- Returns:
- the abstract name of the action.
-
update
public void update()Updates the state of the action. Calls:setEnabled(isEnabled());
. -
updateAllActions
public static void updateAllActions()
-