org.peace_tools.generic
Interface WizardPage

All Known Implementing Classes:
AnalyzerWizardPage, ClusterWizardPage, ESTInfoWizardPage, FiltersWizardPage, GenericWizardPage, HeuristicsWizardPage, JobInfoWizardPage, MSTWizardPage, ServerAddingEntryWizardPage, ServerInfoWizardPage, ServerTypeWizardPage, SubmitJobWizardPage, SummaryWizardPage, VerifyWizardPage

public interface WizardPage

A simple interface that is implemented by all wizard pages so that they can be displayed in a wizard dialog. This interface provides the hand shake between a wizard dialog and a wizard page.


Method Summary
 java.awt.Component getPage()
          Obtain the actual component associated with this wizard page.
 java.lang.String getSubTitle()
          This method must be implemented to return a sub-title for this wizard page.
 java.lang.String getTitle()
          This method must be implemented to return a title for this wizard page.
 void pageChanged(WizardDialog dialog, int currPage, int prevPage)
          This method is invoked on a wizard page just before it is going to be displayed.
 boolean pageChanging(WizardDialog dialog, int currPage, int nextPage)
          This method is invoked to indicate indicate to the currently visible page that the user is moving away from the current page by clicking either on the "Previous" or the "Next" button.
 

Method Detail

getPage

java.awt.Component getPage()
Obtain the actual component associated with this wizard page. This method must be implemented to return the actual graphics component associated with this page. This is typically a panel that contains all the dialog elements associated with this page.

Returns:
The actual graphics component to be displayed for this page.

getTitle

java.lang.String getTitle()
This method must be implemented to return a title for this wizard page. The title is displayed in the wizard dialog's title pane. In addition the title is used to display the list of pages in the overview sequence.

Returns:
A non-null title for this page. The title typically is 2-3 short words that describe overall functionality of the wizard page.

getSubTitle

java.lang.String getSubTitle()
This method must be implemented to return a sub-title for this wizard page. The sub-title is displayed in the wizard dialog's title pane just below the title.

Returns:
An optional sub-title for the wizard page. If the wizard page does not have a sub-title then this method can return null.

pageChanging

boolean pageChanging(WizardDialog dialog,
                     int currPage,
                     int nextPage)
This method is invoked to indicate indicate to the currently visible page that the user is moving away from the current page by clicking either on the "Previous" or the "Next" button.

Parameters:
dialog - The wizard dialog that is invoking this method.
currPage - The logical (zero-based) index of the current page in the sequence of pages in the wizard.
nextPage - The logical (zero-based) index of the next page that is going to be displayed.
Returns:
If this method returns true, then the switching is completed. Otherwise, the switching is canceled and the current page continues to be displayed.

pageChanged

void pageChanged(WizardDialog dialog,
                 int currPage,
                 int prevPage)
This method is invoked on a wizard page just before it is going to be displayed. This method can be used by the wizard page to update the information displayed by it or enable/disable some of the buttons in the parent

Note: This method must call WizardDialog.setButtonStatus(int, int, int) with suitable parameters.

Parameters:
dialog - The wizard dialog that is invoking this method.
currPage - The logical (zero-based) index of the current page in the sequence of pages in the wizard that is going to be displayed.
prevPage - The logical (zero-based) index of the previous page that was displayed. For the first page this value is -1.