public interface IWizardModel extends IClusterable
wizard model listeners
can be registered to be notified of important
events (changing the active step) using the add
listener
method.
Typically, you would use the default implementation of this interface
, but if
you need to do more sophisticated stuff, like branching etc, you can consider creating your own
implementation. In that case, it is recommended you start by extending from
AbstractWizardModel
.
Swing Wizard Framework served as a valuable source of inspiration.
AbstractWizardModel
,
WizardModel
Modifier and Type | Method and Description |
---|---|
void |
addListener(IWizardModelListener listener)
Adds a wizard model listener.
|
void |
cancel()
Cancels further processing.
|
void |
finish()
Instructs the wizard to finish succesfully.
|
IWizardStep |
getActiveStep()
Gets the current active step the wizard should display.
|
boolean |
isCancelVisible()
Gets whether the cancel button should be displayed.
|
default boolean |
isFinishAvailable()
Gets whether the finish button should be enabled.
|
boolean |
isLastAvailable()
Checks if the last button should be enabled.
|
boolean |
isLastStep(IWizardStep step)
Gets whether the specified step is the last step in the wizard.
|
boolean |
isLastVisible()
Gets whether the last button should be displayed.
|
boolean |
isNextAvailable()
Gets whether the next button should be enabled.
|
boolean |
isPreviousAvailable()
Gets whether the previous button should be enabled.
|
void |
last()
Takes the model to the last step in the wizard.
|
void |
next()
Increments the model to the next step.
|
void |
previous()
Takes the model to the previous step.This method must only be called if
isPreviousAvailable() returns true. |
void |
removeListener(IWizardModelListener listener)
Removes a wizard model listener.
|
void |
reset()
Resets the model, setting it to the first step.
|
Iterator<IWizardStep> |
stepIterator()
Returns an iterator over all the steps in the model.
|
void addListener(IWizardModelListener listener)
listener
- The wizard model listener to addvoid removeListener(IWizardModelListener listener)
listener
- The listener to removevoid reset()
listeners
through calling
IWizardModelListener.onActiveStepChanged(IWizardStep)
.Iterator<IWizardStep> stepIterator()
boolean isLastStep(IWizardStep step)
step
- the step to checkIWizardStep getActiveStep()
boolean isCancelVisible()
cancel()
void cancel()
model listeners
.boolean isPreviousAvailable()
previous()
void previous()
isPreviousAvailable()
returns true. Implementors should notify
listeners
through calling
IWizardModelListener.onActiveStepChanged(IWizardStep)
.isPreviousAvailable()
boolean isNextAvailable()
next()
void next()
isNextAvailable()
returns true. Implementors should notify
listeners
through calling
IWizardModelListener.onActiveStepChanged(IWizardStep)
.isNextAvailable()
boolean isLastVisible()
isLastAvailable()
will return true at any point. Returning false will prevent the last
button from appearing on the wizard at all.isLastAvailable()
,
last()
boolean isLastAvailable()
isLastVisible()
,
last()
void last()
isLastAvailable()
returns true. Implementors should notify
listeners
through calling
IWizardModelListener.onActiveStepChanged(IWizardStep)
.isLastVisible()
,
isLastAvailable()
default boolean isFinishAvailable()
By default the finish button is available for the last step only.
isLastStep(IWizardStep)
,
finish()
void finish()
model listeners
.Copyright © 2006–2022 Apache Software Foundation. All rights reserved.