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 Summary
Fields Modifier and Type Field Description protected booleanactionCancelledprotected List<Runnable>actionsprotected ComponentcompFields 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 Constructor Description GameModuleAction(String name, Component comp) -
Method Summary
Modifier and Type Method Description voidactionPerformed(ActionEvent e)voidaddAction(Runnable r)Add an auxilliary action to be performed after the core action.protected StringgetMessage(Exception err)protected abstract voidperformAction(ActionEvent evt)protected voidreportError(Exception ex)protected voidrunActions()Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
comp
-
actionCancelled
protected boolean actionCancelled -
actions
-
-
Constructor Details
-
GameModuleAction
-
-
Method Details
-
getMessage
-
actionPerformed
-
performAction
- Throws:
Exception
-
reportError
-
addAction
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()
-