public class Wizard extends Object implements NavigationListener, com.google.gwt.event.logical.shared.CloseHandler<CompositeDialogBox>
| Modifier and Type | Class and Description |
|---|---|
protected class |
Wizard.AbstractAsyncCallbackAdaptor<T>
Asynchronous callback adapter to handle the callback fails by displaying the error inside the dialog.
|
NavigationListener.NavigationDirection| Modifier and Type | Field and Description |
|---|---|
protected WizardStep |
currentStep
The current step of the wizard.
|
protected WizardDialog |
dialog
The dialog in which the wizard steps are loaded.
|
protected boolean |
finishing
true if NavigationDirection#FINISH has been triggered and the queue of next wizard steps is not
empty, false otherwise. |
protected Stack<String> |
navigationStack
Navigation stack to store the user's path through the chain of wizard steps.
|
protected WizardStepProvider |
provider
The wizard step provider to get the steps for the next wizard dialogs.
|
protected List<WizardListener> |
wizardListeners
The list of wizard listeners to be notified by this wizard on events.
|
| Constructor and Description |
|---|
Wizard(String wizardTitle,
com.google.gwt.user.client.ui.Image wizardIcon)
Builds a wizard from the passed title and with the specified icon.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addWizardListener(WizardListener listener)
Adds a wizard listener to the list notified by this wizard.
|
WizardStepProvider |
getProvider() |
protected Object |
getResult() |
void |
hideDialog()
Helper function to hide the dialog and mark that it was closed by code and not by user action.
|
protected void |
initAndDisplayCurrentStep(Object data)
Initializes and displays the current wizard step, with the passed data.
|
protected void |
onCancel()
Handle cancel of the whole wizard.
|
void |
onClose(com.google.gwt.event.logical.shared.CloseEvent<CompositeDialogBox> event) |
void |
onDirection(NavigationListener.NavigationDirection direction)
Triggered when a navigation event takes place.
|
protected void |
onFinish()
Handle commanding the finish of the whole wizard.
|
protected void |
onNext()
Handle advancing to the next step.
|
protected void |
onPrevious()
Handle going to the previous step.
|
void |
removeWizardListener(WizardListener listener)
Removes the specified wizard listener from the list notified by this wizard.
|
void |
setProvider(WizardStepProvider provider) |
void |
start(String startStep,
Object data)
Shows the wizard from the starting step, with the passed data.
|
protected void |
unloadCurrentStep()
Prepares the current step to be unloaded (remove all listeners, etc.), to be executed before loading a next (or
previous) step.
|
protected final List<WizardListener> wizardListeners
protected final Stack<String> navigationStack
protected WizardStepProvider provider
protected final WizardDialog dialog
protected WizardStep currentStep
protected boolean finishing
true if NavigationDirection#FINISH has been triggered and the queue of next wizard steps is not
empty, false otherwise. The wizard goes through all the remaining steps and automatically submits them
once this flag is set to true.public Wizard(String wizardTitle, com.google.gwt.user.client.ui.Image wizardIcon)
wizardTitle - the title of this wizardwizardIcon - the icon of this wizardpublic WizardStepProvider getProvider()
public void setProvider(WizardStepProvider provider)
provider - the wizard step provider to setpublic void start(String startStep, Object data)
startStep - the name of the start step for this wizarddata - the input data for this wizard, to pass to the start stepprotected void initAndDisplayCurrentStep(Object data)
data - the data to initialize the current step withprotected void unloadCurrentStep()
public void onDirection(NavigationListener.NavigationDirection direction)
NavigationListeneronDirection in interface NavigationListenerdirection - the direction of the navigation eventprotected void onCancel()
protected void onPrevious()
protected void onNext()
protected void onFinish()
protected Object getResult()
public void addWizardListener(WizardListener listener)
listener - the listener to addpublic void removeWizardListener(WizardListener listener)
listener - the listener to removepublic void onClose(com.google.gwt.event.logical.shared.CloseEvent<CompositeDialogBox> event)
onClose in interface com.google.gwt.event.logical.shared.CloseHandler<CompositeDialogBox>public void hideDialog()
Copyright © 2004–2016 XWiki. All rights reserved.