Class ScenarioOptions

java.lang.Object
VASSAL.build.module.properties.ScenarioOptions
All Implemented Interfaces:
GameComponent

public class ScenarioOptions extends Object implements GameComponent
A free-standing class to display the combined Scenario options
  • Field Details Link icon

    • dialog Link icon

      protected JDialog dialog
    • optionTabs Link icon

      protected final JTabbedPane optionTabs
    • openAction Link icon

      protected Action openAction
    • launch Link icon

      protected JButton launch
    • globalProperties Link icon

      protected GlobalProperties globalProperties
      Parent Global Properties component
  • Constructor Details Link icon

  • Method Details Link icon

    • setInstance Link icon

      public static void setInstance(ScenarioOptions options)
    • getInstance Link icon

      public static ScenarioOptions getInstance()
    • toggleVisible Link icon

      protected void toggleVisible()
    • getDialog Link icon

      public JDialog 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 Link icon

      public Action getOpenAction()
    • getLaunchButton Link icon

      public JButton getLaunchButton()
    • processChanges Link icon

      protected void processChanges()
      OK Button has been clicked, loop tabs and generate and combine actions for any that have changed.
    • cancel Link icon

      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 Link icon

      protected void open()
    • setup Link icon

      public void setup(boolean gameStarting)
      Description copied from interface: GameComponent
      Notify the GameComponent that a game has started/ended
      Specified by:
      setup in interface GameComponent
      Parameters:
      gameStarting - if true, a game is starting. If false, then a game is ending
    • getRestoreCommand Link icon

      public Command getRestoreCommand()
      Description copied from interface: GameComponent
      When saving a game, each GameComponent should return a Command 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 interface GameComponent
    • hasScenarioOptions Link icon

      protected boolean hasScenarioOptions()
      Return true if there is at least one ScenarioOption defined
    • rebuild Link icon

      protected void rebuild()