net.javaprog.ui.wizard
Interface WizardModel

All Known Implementing Classes:
DefaultWizardModel

public interface WizardModel

Models a sequence of steps.

Author:
Michael Rudolf
See Also:
Step, WizardModelListener

Method Summary
 void addWizardModelListener(WizardModelListener l)
          Adds a listener for the back, next and finish actions.
 void cancelWizard()
          Cancels the wizard.
 boolean contains(Step step)
          Returns whether the sequence contains the given step.
 void finishWizard()
          Finishes the wizard if possible.
 int getCurrentIndex()
          Returns the index of the currently visible step in the sequence.
 Step getCurrentStep()
          Returns the currently visible step.
 int getStepCount()
          Returns the number of steps in this sequence.
 Step[] getSteps()
          Returns the sequence of steps as a plain array.
 void goBack()
          Requests that the previous step should be shown if possible.
 void goNext()
          Requests that the next step should be shown if possible.
 void removeWizardModelListener(WizardModelListener l)
          Removes a previously added listener.
 

Method Detail

addWizardModelListener

void addWizardModelListener(WizardModelListener l)
Adds a listener for the back, next and finish actions.


removeWizardModelListener

void removeWizardModelListener(WizardModelListener l)
Removes a previously added listener.


getCurrentStep

Step getCurrentStep()
Returns the currently visible step.


getCurrentIndex

int getCurrentIndex()
Returns the index of the currently visible step in the sequence.


contains

boolean contains(Step step)
Returns whether the sequence contains the given step.


getSteps

Step[] getSteps()
Returns the sequence of steps as a plain array.


getStepCount

int getStepCount()
Returns the number of steps in this sequence.


goNext

void goNext()
Requests that the next step should be shown if possible. This method must notify the registered WizardListeners of the request.


goBack

void goBack()
Requests that the previous step should be shown if possible. This method must notify the registered WizardListeners of the request.


cancelWizard

void cancelWizard()
Cancels the wizard. This method must notify the registered WizardListeners of the cancel event.


finishWizard

void finishWizard()
Finishes the wizard if possible. This method must notify the registered WizardListeners of the finish event.