Package mars.venus
Class ToolAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.ToolAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
Connects a MarsTool class (class that implements MarsTool interface) to
the Mars menu system by supplying the response to that tool's menu item
selection.
- Version:
- August 2005
- Author:
- Pete Sanderson
- 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
ConstructorsConstructorDescriptionToolAction(Class<? extends MarsTool> toolClass, String toolName)
Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Response when tool's item selected from menu.Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
ToolAction
Simple constructor.- Parameters:
toolClass
- Class object for the associated MarsTool subclasstoolName
- Name of this tool, for the menu.
-
-
Method Details
-
actionPerformed
Response when tool's item selected from menu. Invokes tool's action() method.- Parameters:
e
- the ActionEvent that triggered this call
-