net.javaprog.ui.wizard
Interface WizardModel

All Known Implementing Classes:
DefaultWizardModel

public interface WizardModel

Models a sequence of steps.

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

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


cancelWizard

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


contains

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


finishWizard

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


getCurrentIndex

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


getCurrentStep

public Step getCurrentStep()
Returns the currently visible step.


getStepCount

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


getSteps

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


goBack

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


goNext

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


removeWizardModelListener

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