Package mars.venus

Class ToolAction

All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class ToolAction extends AbstractAction
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
  • Constructor Details

    • ToolAction

      public ToolAction(Class<? extends MarsTool> toolClass, String toolName)
      Simple constructor.
      Parameters:
      toolClass - Class object for the associated MarsTool subclass
      toolName - Name of this tool, for the menu.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Response when tool's item selected from menu. Invokes tool's action() method.
      Parameters:
      e - the ActionEvent that triggered this call