Package mars.venus.actions
Class VenusAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.actions.VenusAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
- Direct Known Subclasses:
EditCommentAction,EditCopyAction,EditCutAction,EditFindReplaceAction,EditPasteAction,EditRedoAction,EditSelectAllAction,EditUndoAction,FileCloseAction,FileCloseAllAction,FileDumpMemoryAction,FileExitAction,FileNewAction,FileOpenAction,FilePrintAction,FileSaveAction,FileSaveAllAction,FileSaveAsAction,HelpAboutAction,HelpHelpAction,HelpUpdateAction,RunAssembleAction,RunAssembleFolderAction,RunClearBreakpointsAction,RunPauseAction,RunResetAction,RunStartAction,RunStepBackwardAction,RunStepForwardAction,RunStopAction,RunToggleBreakpointsAction,SettingsAddressDisplayBaseAction,SettingsAssembleOnOpenAction,SettingsEditorAction,SettingsExceptionHandlerAction,SettingsHighlightingAction,SettingsLabelAction,SettingsPreferencesAction,SettingsProgramArgumentsAction,SettingsValueDisplayBaseAction
Parent class for Action subclasses representing every menu/toolbar option.
- See Also:
-
Field Summary
FieldsFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields 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 -
Method Summary
Modifier and TypeMethodDescriptionabstract voidactionPerformed(ActionEvent event) Should be overridden by subclasses to carry out the action they represent.getGUI()getName()voidregisterShortcut(JComponent component) Register this action as a key shortcut when the component is in focus.voidupdate()Update this action according to the current GUI state.Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
gui
-
shortcut
-
-
Constructor Details
-
VenusAction
-
-
Method Details
-
actionPerformed
Should be overridden by subclasses to carry out the action they represent. -
registerShortcut
Register this action as a key shortcut when the component is in focus.- Parameters:
component- the component to register the key shortcut on.
-
getGUI
- Returns:
- The GUI instance this action was created for.
-
getShortcut
- Returns:
- The key shortcut to execute this action.
-
getName
- Returns:
- The name assigned to the action.
-
update
public void update()Update this action according to the current GUI state.
-