org.netbeans.spi.wizard
Interface WizardPanel

All Known Implementing Classes:
WizardPage

public interface WizardPanel

This is an optional interface for panels that want to be notified when the next and back buttons are pressed. The WizardPanelProvider is NOT required to create panels that implement this interface. Each of these methods returns a WizardPanelNavResult that can be used to indicate PROCEED or REMAIN_ON_PAGE. The result can also be an instance of a subclass of WizardPanelNavResult that implements the start method to use a background thread to determine if the next page can be shown.

Author:
stanley@stanleyknutson.com

Method Summary
Modifier and Type Method and Description
 WizardPanelNavResult allowBack(java.lang.String stepName, java.util.Map settings, Wizard wizard)
          This method is invoked when the "back" button has been pushed, to discard any data from the setings that will not been needed and for which the normal "just hide that data" is not the desired behavior.
 WizardPanelNavResult allowFinish(java.lang.String stepName, java.util.Map settings, Wizard wizard)
          This method is invoked when the "finish" button has been pushed, to allow veto of the finish action BEFORE the wizard finish method is invoked.
 WizardPanelNavResult allowNext(java.lang.String stepName, java.util.Map settings, Wizard wizard)
          This method is invoked when the "next" button has been pushed, to do a final validation of input (such as doing a database login).
 

Method Detail

allowNext

WizardPanelNavResult allowNext(java.lang.String stepName,
                               java.util.Map settings,
                               Wizard wizard)
This method is invoked when the "next" button has been pushed, to do a final validation of input (such as doing a database login). If this method return false, then the "next" button will not change the displayed panel. Presumably some error will have been shown to the user.

Parameters:
stepName -
settings -
wizard -
Returns:
WizardPanelNavResult.PROCEED if the "next" button should proceed, WizardPanelNavResult.REMAIN_ON_PAGE if "next" should not proceed, or a instance of subclass of WizardPanelResult that will do some background computation and call the progress.finished method with one of those constants (or call progress.failed with the error message)

allowBack

WizardPanelNavResult allowBack(java.lang.String stepName,
                               java.util.Map settings,
                               Wizard wizard)
This method is invoked when the "back" button has been pushed, to discard any data from the setings that will not been needed and for which the normal "just hide that data" is not the desired behavior. (See MergeMap for discussion of the "hide the data" behavior) If this method return false, then the "next" button will not change the displayed panel. Presumably some error will have been shown to the user.

Parameters:
stepName -
settings -
wizard -
Returns:
WizardPanelNavResult.PROCEED if the "back" button should proceed, WizardPanelNavResult.REMAIN_ON_PAGE if "back" should not proceed, or a instance of subclass of WizardPanelResult that will do some background computation and call the progress.finished method with one of those constants. (or call progress.failed with the error message)

allowFinish

WizardPanelNavResult allowFinish(java.lang.String stepName,
                                 java.util.Map settings,
                                 Wizard wizard)
This method is invoked when the "finish" button has been pushed, to allow veto of the finish action BEFORE the wizard finish method is invoked. If this method return false, then the "finish" button will have no effect. Presumably some error will have been shown to the user.

Parameters:
stepName -
settings -
wizard -
Returns:
WizardPanelNavResult.PROCEED if the "finish" button should proceed, WizardPanelNavResult.REMAIN_ON_PAGE if "finish" should not proceed, or a instance of subclass of WizardPanelResult that will do some background computation and call the progress.finished method with one of those constants. (or call progress.failed with the error message)