public abstract class WizardModel extends Object
Constructor and Description |
---|
WizardModel(WizardStepModel firstStep)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(WizardListener wizardListener)
Add a listener.
|
void |
cancel()
Method call when Wizard progress to cancel status.
|
boolean |
canPrevious()
Is it possible to progress to previous step.
|
void |
cleanup()
Clean the data model.
|
void |
finish()
Method call when Wizard progress to finish status.
|
protected void |
fireCurrentStep(WizardStepModel oldStep,
WizardStepModel newStep)
Notify listeners that current step has changed.
|
protected void |
fireFinishable(boolean finishable)
Notify listeners that finish status has been selected or not.
|
protected void |
fireNextable()
Notify listeners of that next status has been selected.
|
protected void |
firePreviousable()
Notify listeners that previous status has been selected.
|
WizardStepModel |
getCurrentStep() |
abstract String |
getDescription()
Retruns a human readable description of this Wizard.
|
protected WizardStepModel |
getFirstStep() |
List<WizardStepModel> |
getStepHistory() |
boolean |
isFinishable()
Is it possible to progress to finish status.
|
abstract boolean |
isFinishable(Stack<WizardStepModel> stack)
Is it possible to finish ?
|
boolean |
isMovingBackwards()
Return true while executing commit on current step view during previousStep().
|
boolean |
isNextable()
Is it possible to progress to next step ?
|
WizardStepModel |
next()
Get the next step data model.
|
void |
nextStep()
Progress to next step.
|
WizardStepModel |
previous()
Get the previous step data model.
|
void |
previousStep()
Progress to previous step.
|
void |
removeListener(WizardListener wizardListener)
Remove a listener
|
protected void |
setCurrentStep(WizardStepModel newStep,
boolean oldStepAlreadyCommitted)
Set a new step.
|
void |
setFinishable(boolean finishable)
Update the finish status.
|
public WizardModel(WizardStepModel firstStep)
firstStep
- the data model of the first wizard's stepprotected final void setCurrentStep(WizardStepModel newStep, boolean oldStepAlreadyCommitted)
newStep
- the new step data modeloldStepAlreadyCommitted
- true if previous step has been committedprotected final void fireCurrentStep(WizardStepModel oldStep, WizardStepModel newStep)
oldStep
- previous step data modelnewStep
- new step data modelpublic final WizardStepModel next()
public final WizardStepModel previous()
public void nextStep()
protected void fireNextable()
public boolean isNextable()
public void previousStep()
public boolean isMovingBackwards()
protected final void firePreviousable()
public final boolean canPrevious()
public final boolean isFinishable()
public abstract boolean isFinishable(Stack<WizardStepModel> stack)
stack
- the step data modelsprotected void fireFinishable(boolean finishable)
finishable
- public final void setFinishable(boolean finishable)
public void finish()
public void cancel()
public List<WizardStepModel> getStepHistory()
public final WizardStepModel getCurrentStep()
protected WizardStepModel getFirstStep()
public abstract String getDescription()
public final void addListener(WizardListener wizardListener)
wizardListener
- public void cleanup()
public final void removeListener(WizardListener wizardListener)
wizardListener
- Plealog Software - 2003-2017