Class WizardSupport.BranchingWizard

java.lang.Object
org.netbeans.spi.wizard.WizardBranchController
VASSAL.build.module.WizardSupport.BranchingWizard
Enclosing class:
WizardSupport

public static class WizardSupport.BranchingWizard extends org.netbeans.spi.wizard.WizardBranchController
Branches the wizard by forwarding to the Wizard stored in the wizard settings under a specified key
Author:
rkinney
  • Constructor Summary

    Constructors
    Constructor
    Description
    BranchingWizard(org.netbeans.spi.wizard.WizardPanelProvider base, String key)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.netbeans.spi.wizard.WizardPanelProvider
    Override this method to return a WizardPanelProvider representing the steps from here to the final step of the wizard, varying the returned object based on the contents of the map and the step in question.
    protected org.netbeans.spi.wizard.Wizard
    getWizardForStep(String step, Map settings)
    Get the wizard which represents the subsequent panes after this step.

    Methods inherited from class org.netbeans.spi.wizard.WizardBranchController

    createWizard

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BranchingWizard

      public BranchingWizard(org.netbeans.spi.wizard.WizardPanelProvider base, String key)
  • Method Details

    • getPanelProviderForStep

      protected org.netbeans.spi.wizard.WizardPanelProvider getPanelProviderForStep(String step, Map settings)
      Description copied from class: org.netbeans.spi.wizard.WizardBranchController
      Override this method to return a WizardPanelProvider representing the steps from here to the final step of the wizard, varying the returned object based on the contents of the map and the step in question. The default implementation of this method throws an Error - either override this method, or override getWizardForStep() (in which case this method will not be called).

      Note: This method can be called very frequently, to determine if the sequence of steps has changed - so it needs to run fast. Returning the same instance every time called with equivalent arguments is highly recommended.

      Overrides:
      getPanelProviderForStep in class org.netbeans.spi.wizard.WizardBranchController
      Parameters:
      step - The string ID of the current step
      settings - The settings map, which previous panes of the wizard will have written content into
    • getWizardForStep

      protected org.netbeans.spi.wizard.Wizard getWizardForStep(String step, Map settings)
      Description copied from class: org.netbeans.spi.wizard.WizardBranchController
      Get the wizard which represents the subsequent panes after this step. The UI for the current step should have put sufficient data into the settings map to decide what to return; return null if not.

      The default implementation delegates to getPanelProviderForStep() and returns a Wizard representing the result of that call.

      Note: This method can be called very frequently, to determine if the sequence of steps has changed - so it needs to run fast. Returning the same instance every time the same arguments are passed is highly recommended. It will typically be called whenever a change is fired by the base wizard (i.e. every call setProblem() should generate a check to see if the navigation has changed).

      Note that the wizard for the subsequent steps will be instantiated as soon as it is known what the user's choice is, so the list of pending steps can be updated (this does not mean that all subsequent panel UI components of the wizard will be instantiated, just the Wizard object itself, which will create panels on demand if they have not already been created).

      Overrides:
      getWizardForStep in class org.netbeans.spi.wizard.WizardBranchController
      Parameters:
      step - The current step the user is on in the wizard
      settings - The settings map, which previous panes of the wizard have been writing information into