org.springframework.richclient.wizard
Interface Wizard

All Known Implementing Classes:
AbstractWizard, InstallWizard, NewOwnerWizard, SetupWizard

public interface Wizard

A wizard is a collection of dialog components that guide the user through a sequence of steps required to perform a particular task. This top-level interface defines the behaviour that is common to all wizards in a Spring Rich Client application.

The AbstractWizard class provides an abstract implementation of this interface. However, clients are also free to implement this interface directly if AbstractWizard does not suit their needs.

Author:
Keith Donald

Method Summary
 void addPages()
          Adds any last-minute pages to this wizard.
 void addWizardListener(WizardListener wizardListener)
          Add a listener to this wizard
 boolean canFinish()
          Returns whether this wizard could be finished without further user interaction.
 WizardContainer getContainer()
          Returns the container managing the display of this wizard.
 Image getDefaultPageImage()
          Returns the default page image for this wizard.
 String getId()
          Returns this wizard's identifier.
 WizardPage getNextPage(WizardPage page)
          Returns the successor of the given page.
 WizardPage getPage(String pageName)
          Returns the wizard page with the given name belonging to this wizard.
 int getPageCount()
          Returns the number of pages in this wizard.
 WizardPage[] getPages()
          Returns all the pages in this wizard.
 WizardPage getPreviousPage(WizardPage page)
          Returns the predecessor of the given page.
 WizardPage getStartingPage()
          Returns the first page to be shown in this wizard.
 String getTitle()
          Returns the window title string for this wizard.
 boolean needsPreviousAndNextButtons()
          Returns whether this wizard needs Previous and Next buttons.
 boolean performCancel()
          Performs any actions appropriate in response to the user having pressed the Cancel button, or refuse if canceling now is not permitted.
 boolean performFinish()
          Performs any actions appropriate in response to the user having pressed the Finish button, or refuse if finishing now is not permitted.
 void removeWizardListener(WizardListener wizardListener)
          Removes the given listener from this wizard.
 void setContainer(WizardContainer wizardContainer)
          Sets or clears the container of this wizard.
 

Method Detail

getId

String getId()
Returns this wizard's identifier. This value is intended to be unique within a given application.

Returns:
the identifier of this wizard.

getTitle

String getTitle()
Returns the window title string for this wizard.

Returns:
the window title string, or null for no title.

getDefaultPageImage

Image getDefaultPageImage()
Returns the default page image for this wizard.

This image can be used for pages which do not supply their own image.

Returns:
the default page image

addPages

void addPages()
Adds any last-minute pages to this wizard.

This method is called by the wizard's container to add the pages.


getStartingPage

WizardPage getStartingPage()
Returns the first page to be shown in this wizard.

Returns:
the first wizard page

getPreviousPage

WizardPage getPreviousPage(WizardPage page)
Returns the predecessor of the given page.

Parameters:
page - the page
Returns:
the previous page, or null if none

getNextPage

WizardPage getNextPage(WizardPage page)
Returns the successor of the given page.

Parameters:
page - the page
Returns:
the next page, or null if none

getPage

WizardPage getPage(String pageName)
Returns the wizard page with the given name belonging to this wizard.

Parameters:
pageName - the name of the wizard page
Returns:
the wizard page with the given name, or null if none

getPageCount

int getPageCount()
Returns the number of pages in this wizard.

Returns:
the number of wizard pages

getPages

WizardPage[] getPages()
Returns all the pages in this wizard.

Returns:
a list of pages

getContainer

WizardContainer getContainer()
Returns the container managing the display of this wizard. Generally a dialog.

Returns:
the wizard container

setContainer

void setContainer(WizardContainer wizardContainer)
Sets or clears the container of this wizard.

Parameters:
wizardContainer - the wizard container, or null

needsPreviousAndNextButtons

boolean needsPreviousAndNextButtons()
Returns whether this wizard needs Previous and Next buttons.

The result of this method is typically used by the container.

Returns:
true if Previous and Next buttons are required, and false if none are needed

canFinish

boolean canFinish()
Returns whether this wizard could be finished without further user interaction.

The result of this method is typically used by the wizard container to enable or disable the Finish button.

Returns:
true if the wizard could be finished, and false otherwise

performFinish

boolean performFinish()
Performs any actions appropriate in response to the user having pressed the Finish button, or refuse if finishing now is not permitted.

Returns:
true to indicate the finish request was accepted, and false to indicate that the finish request was refused

performCancel

boolean performCancel()
Performs any actions appropriate in response to the user having pressed the Cancel button, or refuse if canceling now is not permitted.

Returns:
true to indicate the cancel request was accepted, and false to indicate that the cancel request was refused

addWizardListener

void addWizardListener(WizardListener wizardListener)
Add a listener to this wizard

Parameters:
wizardListener - The listener to be added.

removeWizardListener

void removeWizardListener(WizardListener wizardListener)
Removes the given listener from this wizard.

Parameters:
wizardListener - The listener to be removed.


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.