Before you can use the wizard component, it needs to be initialized with a model. You do this by calling {@link #init(IWizardModel)} with the wizard model you intent to use.
This default implementation should be useful for basic cases, if the layout is exactly what you need. If you want to provide your own layout and/ or have more or less components (e.g. you want to additionally provide an overview component), you can override this class and add the components you want yourself using methods like {@link #newButtonBar(String)} et-cetera.
@author Eelco HilleniusWizard to implement a particular wizard. Subclasses may call the following methods to configure the wizard:
addPagesetHelpAvailablesetDefaultPageImageDescriptorsetDialogSettingssetNeedsProgressMonitorsetTitleBarColorsetWindowTitleSubclasses may override these methods if required:
createPageControlsperformCanceladdPagesperformFinishdispose Note that clients are free to implement IWizard from scratch instead of subclassing Wizard. Correct implementations of IWizard will work with any correct implementation of IWizardPage.
The sequence of pages that will appear in a Wizard is defined by a WizardPageChain. Before starting a wizard, its chain of pages must be set by calling {@link #setPageChain(WizardPageChain) setPageChain}. If the wizard uses a static set of pages, the WizardPageChain implementation WizardPageList can be used. If the sequence of pages is dynamic, i.e. if the user input on one page determines which page comes next, a custom WizardPageChain implementation must be used. Such an implementation may use {@link WizardPage#getNextPage() WizardPage.getNextPage()} internally.
A Wizard is displayed in a WizardDisplayer, which serves as the interface between the wizard and the application it is running in. Two concrete WizardDisplayer implementations are provided:
WizardPageDisplayer - for displaying the wizard as a page in the main window;WizardDialogDisplayer - for displaying the wizard in a popup dialog.Example that starts a wizard in the main window:
Wizard wizard = new ImportProjectWizard(); wizard.setTitle("Import Project"); WizardPageList pages = new WizardPageList(); pages.addPage(new ProjectSelectionPage(wizard)); pages.addPage(new ProjectDestinationPage(wizard)); wizard.setPageChain(pages); WizardPageDisplayer displayer = new WizardPageDisplayer(wizard); displayer.setIcon(projectIcon); wizard.start();
@param < T> The type of objects created or modified by the Wizard.
@see WizardPage
@see WizardPageChain
@see WizardDisplayer
@see WizardPageDisplayer
@see WizardDialogDisplayer
@author Torgil Zethson
Wizard call one of the constructors and call setPages(WizardPage []) to set the pages that the Wizard should use.
@see WizardPage
@see uk.ac.man.cs.mig.util.wizard.WizardEventListener
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |