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
Modifier and TypeFieldDescriptionprotected JDialog
protected GlobalProperties
Parent Global Properties componentprotected JButton
protected Action
protected final JTabbedPane
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
cancel()
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 ScenarioOptions
When saving a game, each GameComponent should return aCommand
that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return nullprotected boolean
Return true if there is at least one ScenarioOption definedprotected void
open()
protected void
OK Button has been clicked, loop tabs and generate and combine actions for any that have changed.protected void
rebuild()
static void
setInstance
(ScenarioOptions options) void
setup
(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:GameComponent
Notify the GameComponent that a game has started/ended- Specified by:
setup
in interfaceGameComponent
- Parameters:
gameStarting
- if true, a game is starting. If false, then a game is ending
-
getRestoreCommand
Description copied from interface:GameComponent
When saving a game, each GameComponent should return aCommand
that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null- Specified by:
getRestoreCommand
in interfaceGameComponent
-
hasScenarioOptions
protected boolean hasScenarioOptions()Return true if there is at least one ScenarioOption defined -
rebuild
protected void rebuild()
-