wicket.extensions.wizard
Interface IWizardModel

public interface IWizardModel
extends Serializable
This interface defines the model for wizards. This model knows about the wizard's steps and the transitions between them, and it holds a reference to the currently active step. It might function as a generic state holder for the wizard too, though you might find it more convenient to use the wizard component itself for that, or even an external model.

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.

Swing Wizard Framework served as a valuable source of inspiration.

SinceNot specified.
VersionNot specified.
AuthorEelco Hillenius
See also
Wiki javadoc Use textile entry format.
Add your comments here.
Method Summary
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.
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 lastStep()
Takes the model to the last step in the wizard.
void next()
Increments the model the 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 stepIterator()
Returns an iterator over all the steps in the model.
addListener
public void addListener ( IWizardModelListener listener )
Adds a wizard model listener.
Parameters
TypeNameDescription
IWizardModelListener listener The wizard model listener to add
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
cancel
public void cancel ( )
Cancels further processing. Implementations may clean up and reset the model. Implementations should notify the registered model listeners .
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
finish
public void finish ( )
Instructs the wizard to finish succesfully. Typically, implementations check whether this option is available at all. Implementations may clean up and reset the model. Implementations should notify the registered model listeners .
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
getActiveStep
public IWizardStep getActiveStep ( )
Gets the current active step the wizard should display.
Wiki javadoc Use textile entry format.
Add your comments here.
isCancelVisible
public boolean isCancelVisible ( )
Gets whether the cancel button should be displayed.
Wiki javadoc Use textile entry format.
Add your comments here.
isLastAvailable
public boolean isLastAvailable ( )
Checks if the last button should be enabled.
See also
Wiki javadoc Use textile entry format.
Add your comments here.
isLastStep
public boolean isLastStep ( IWizardStep step )
Gets whether the specified step is the last step in the wizard.
Parameters
TypeNameDescription
IWizardStep step the step to check
Wiki javadoc Use textile entry format.
Add your comments here.
isLastVisible
public boolean isLastVisible ( )
Gets whether the last button should be displayed. This method should only return true if the isLastAvailable() will return true at any point. Returning false will prevent the last button from appearing on the wizard at all.
Wiki javadoc Use textile entry format.
Add your comments here.
isNextAvailable
public boolean isNextAvailable ( )
Gets whether the next button should be enabled.
Wiki javadoc Use textile entry format.
Add your comments here.
isPreviousAvailable
public boolean isPreviousAvailable ( )
Gets whether the previous button should be enabled.
Wiki javadoc Use textile entry format.
Add your comments here.
lastStep
public void lastStep ( )
Takes the model to the last step in the wizard. This method must only be called if isLastAvailable() returns true.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
next
public void next ( )
Increments the model the the next step. This method must only be called if isNextAvailable() returns true.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
previous
public void previous ( )
Takes the model to the previous step.This method must only be called if isPreviousAvailable() returns true.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
removeListener
public void removeListener ( IWizardModelListener listener )
Removes a wizard model listener.
Parameters
TypeNameDescription
IWizardModelListener listener The listener to remove
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
reset
public void reset ( )
Resets the model, setting it to the first step.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
stepIterator
public Iterator stepIterator ( )
Returns an iterator over all the steps in the model. The iteration order is not guarenteed to the be the order of traversal.
Wiki javadoc Use textile entry format.
Add your comments here.