simtools.ui
Class WizardManager

java.lang.Object
  extended by simtools.ui.WizardManager
Direct Known Subclasses:
MCWizardManager

public abstract class WizardManager
extends java.lang.Object

Type
Summary:
A WizardManager controls wizard UI configuration, according to:

Thus, it determine whether or not it is possible to finish, to go forward. A wizard manager provides next and previous steps.


Field Summary
protected  WizardPage currentPage
          (WizardPage) currentPage: The currentPage.
protected  java.util.Stack pageHistory
          (Stack) pageHistory: The pageHistory.
protected  java.util.Map settings
          (Map) settings: The settings map.
protected  java.lang.Object wizardObject
          The object built on finish operation;
 
Constructor Summary
WizardManager()
           
 
Method Summary
abstract  boolean canFinish()
          Method canFinish
Summary:
abstract  boolean canNext()
          Method canFinish
Summary:
 void finish()
          Method finish
Summary:
process finish action
 WizardPage getCurrentStep()
          Method getCurrentStep
Summary:
 java.awt.Dimension getMaximumnPageSize()
           
 WizardPage getPreviousStep()
          Method getPreviousStep
Summary:
 java.util.Map getSettings()
           
abstract  java.lang.String[] getStepsTitles()
          Method getAllPagesTitle
Summary:
 java.lang.Object getWizardObject()
           
protected abstract  WizardPage next()
          Method getNextStep
Summary:
Compute next step in function of current state and settings
protected abstract  java.lang.Object processFinish()
          Method processFinish
Summary:
Instantiate whatever object (if any) the wizard creates from its gathered data.
 void processToNextStep()
          Method processToNextStep
Summary:
Update setting and compute the next page to dispay
 void processToPreviousStep()
          Method processToPreviousStep
Summary:
get previous page, restore previous settings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

settings

protected java.util.Map settings
(Map) settings: The settings map. Shall contain at final step all settings needed to produce what has to be produced. Note: settings shall contain no duplicate keys.


currentPage

protected WizardPage currentPage
(WizardPage) currentPage: The currentPage.


pageHistory

protected java.util.Stack pageHistory
(Stack) pageHistory: The pageHistory.


wizardObject

protected java.lang.Object wizardObject
The object built on finish operation;

Constructor Detail

WizardManager

public WizardManager()
Method Detail

getMaximumnPageSize

public java.awt.Dimension getMaximumnPageSize()
Returns:
the maximumn size to allocate for pages in wizard displayer

getCurrentStep

public WizardPage getCurrentStep()
Method getCurrentStep
Summary:

Returns:
(WizardPage) A WizardPage. The current Wizard page or null if no current page.

getPreviousStep

public WizardPage getPreviousStep()
Method getPreviousStep
Summary:

Returns:
(WizardPage) A WizardPage. The previous Wizard page or null if no previous page.

processToNextStep

public void processToNextStep()
Method processToNextStep
Summary:
Update setting and compute the next page to dispay


processToPreviousStep

public void processToPreviousStep()
Method processToPreviousStep
Summary:
get previous page, restore previous settings


getStepsTitles

public abstract java.lang.String[] getStepsTitles()
Method getAllPagesTitle
Summary:

Returns:
(String[]) A list of pages titles that describes the differents steps to terminate the wizart.

canNext

public abstract boolean canNext()
Method canFinish
Summary:

Returns:
(boolean) Return true if a next step is available

next

protected abstract WizardPage next()
Method getNextStep
Summary:
Compute next step in function of current state and settings

Returns:
(WizardPage) the next page.

canFinish

public abstract boolean canFinish()
Method canFinish
Summary:

Returns:
(boolean) Return true if wizard process can terminate

finish

public void finish()
Method finish
Summary:
process finish action


processFinish

protected abstract java.lang.Object processFinish()
Method processFinish
Summary:
Instantiate whatever object (if any) the wizard creates from its gathered data.

Returns:
(Object) An object composed based on what the user entered in the wizard. Return null if production cannot be accomplished

getWizardObject

public java.lang.Object getWizardObject()

getSettings

public java.util.Map getSettings()