Package VASSAL.build.module.properties
Class ScenarioOptions
java.lang.Object
VASSAL.build.module.properties.ScenarioOptions
- All Implemented Interfaces:
GameComponent
A free-standing class to display the combined Scenario options
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JDialogprotected GlobalPropertiesParent Global Properties componentprotected JButtonprotected Actionprotected final JTabbedPane -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcancel()Close button clicked.Create the top-level dialog, but don't populate any tabs or options yet, this is done just before display in case we are Editing and making changes, and to allow for roll-back management if user clicks cancelstatic ScenarioOptionsWhen saving a game, each GameComponent should return aCommandthat, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return nullprotected booleanReturn true if there is at least one ScenarioOption definedprotected voidopen()protected voidOK Button has been clicked, loop tabs and generate and combine actions for any that have changed.protected voidrebuild()static voidsetInstance(ScenarioOptions options) voidsetup(boolean gameStarting) Notify the GameComponent that a game has started/endedprotected void
-
Field Details
-
dialog
-
optionTabs
-
openAction
-
launch
-
globalProperties
Parent Global Properties component
-
-
Constructor Details
-
ScenarioOptions
-
-
Method Details
-
setInstance
-
getInstance
-
toggleVisible
protected void toggleVisible() -
getDialog
Create the top-level dialog, but don't populate any tabs or options yet, this is done just before display in case we are Editing and making changes, and to allow for roll-back management if user clicks cancel- Returns:
- generated dialog
-
getOpenAction
-
getLaunchButton
-
processChanges
protected void processChanges()OK Button has been clicked, loop tabs and generate and combine actions for any that have changed. -
cancel
protected void cancel()Close button clicked. No change to underlying properties yet, so just close the dialog, it will be rebuilt showing the old values when next opened. -
open
protected void open() -
setup
public void setup(boolean gameStarting) Description copied from interface:GameComponentNotify the GameComponent that a game has started/ended- Specified by:
setupin interfaceGameComponent- Parameters:
gameStarting- if true, a game is starting. If false, then a game is ending
-
getRestoreCommand
Description copied from interface:GameComponentWhen saving a game, each GameComponent should return aCommandthat, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null- Specified by:
getRestoreCommandin interfaceGameComponent
-
hasScenarioOptions
protected boolean hasScenarioOptions()Return true if there is at least one ScenarioOption defined -
rebuild
protected void rebuild()
-