Package VASSAL.launch

Class GameModuleAction

java.lang.Object
javax.swing.AbstractAction
VASSAL.launch.GameModuleAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
CreateModuleAction, LoadModuleAction, NewExtensionAction

public abstract class GameModuleAction
extends AbstractAction
Utility base class for GameModule-related actions, with auxilliary actions and error reporting.
Author:
rodneykinney
See Also:
Serialized Form
  • Field Details

    • comp

      protected Component comp
    • actionCancelled

      protected boolean actionCancelled
    • actions

      protected List<Runnable> actions
  • Constructor Details

    • GameModuleAction

      public GameModuleAction​(String name, Component comp)
  • Method Details

    • getMessage

      protected String getMessage​(Exception err)
    • actionPerformed

      public void actionPerformed​(ActionEvent e)
    • performAction

      protected abstract void performAction​(ActionEvent evt) throws Exception
      Throws:
      Exception
    • reportError

      protected void reportError​(Exception ex)
    • addAction

      public void addAction​(Runnable r)
      Add an auxilliary action to be performed after the core action. For example, closing a window after a module has been loaded
      Parameters:
      r -
    • runActions

      protected void runActions()