Class WizardSupport.GameSetupPanels

java.lang.Object
org.netbeans.spi.wizard.WizardPanelProvider
VASSAL.build.module.WizardSupport.GameSetupPanels
All Implemented Interfaces:
org.netbeans.spi.wizard.WizardPage.WizardResultProducer
Enclosing class:
WizardSupport

public static class WizardSupport.GameSetupPanels extends org.netbeans.spi.wizard.WizardPanelProvider implements org.netbeans.spi.wizard.WizardPage.WizardResultProducer
Wizard pages for starting a new game. One page will be added for each unfinished GameSetupStep
Author:
rkinney
See Also:
  • Method Details

    • setForcePwd

      public void setForcePwd(boolean forcePwd)
    • newInstance

      public static WizardSupport.GameSetupPanels newInstance()
    • newInstance

      public static WizardSupport.GameSetupPanels newInstance(boolean forcePwd)
    • createPanel

      protected JComponent createPanel(org.netbeans.spi.wizard.WizardController controller, String id, Map settings)
      Description copied from class: org.netbeans.spi.wizard.WizardPanelProvider
      Create a panel that represents a named step in the wizard. This method will be called exactly once in the life of a wizard. The panel should retain the passed settings Map, and add/remove values from it as the user enters information, calling setProblem() and setCanFinish() as appropriate in response to user input.
      Specified by:
      createPanel in class org.netbeans.spi.wizard.WizardPanelProvider
      Parameters:
      controller - - the object which controls whether the Next/Finish buttons in the wizard are enabled, and what instructions are displayed to the user if they are not
      id - The name of the step, one of the array of steps passed in the constructor
      settings - A Map containing settings from earlier steps in the wizard. It is safe to retain a reference to this map and put values in it as the user manipulates the UI; the reference should be refreshed whenever this method is called again.
      Returns:
      A JComponent that should be displayed in the center of the wizard
    • cancel

      public boolean cancel(Map settings)
      Description copied from class: org.netbeans.spi.wizard.WizardPanelProvider
      Called if the user invokes cancel. The default impl returns true.
      Specified by:
      cancel in interface org.netbeans.spi.wizard.WizardPage.WizardResultProducer
      Overrides:
      cancel in class org.netbeans.spi.wizard.WizardPanelProvider
      Returns:
      false to abort cancellation (almost all implementations will want to return true - this is really only applicable in cases such as an OS installer or such).
    • finish

      public Object finish(Map wizardData) throws org.netbeans.spi.wizard.WizardException
      Description copied from class: org.netbeans.spi.wizard.WizardPanelProvider
      Instantiate whatever object (if any) the wizard creates from its gathered data. The default implementation is a no-op that returns null.

      If an instance of Summary is returned from this method, the UI shall display it on a final page and disable all navigation buttons except the Close/Cancel button.

      If an instance of DeferredWizardResult is returned from this method, the UI shall display some sort of progress bar while the result is computed in the background. If that DeferredWizardResult produces a Summary object, that summary shall be displayed as described above.

      The default implementation returns the settings map it is passed.

      Specified by:
      finish in interface org.netbeans.spi.wizard.WizardPage.WizardResultProducer
      Overrides:
      finish in class org.netbeans.spi.wizard.WizardPanelProvider
      Parameters:
      wizardData - The settings map, now fully populated with all settings needed to complete the wizard (this method will only be called if setProblem(null) and setCanFinish(true) have been called on the WizardController passed to createPanel().
      Returns:
      an object composed based on what the user entered in the wizard - somethingmeaningful to whatever code invoked the wizard, or null. Note special handling if an instance of DeferredWizardResult or Summary is returned from this method.
      Throws:
      org.netbeans.spi.wizard.WizardException
    • newWizard

      public org.netbeans.spi.wizard.Wizard newWizard(Dimension logoSize)