In typical usage, the client instantiates this class with a particular
wizard. The dialog serves as the wizard container and orchestrates the
presentation of its pages.
The standard layout is roughly as follows: it has an area at the top
containing both the wizard's title, description, and image; the actual wizard
page appears in the middle; below that is a progress indicator (which is made
visible if needed); and at the bottom of the page is message line and a
button bar containing Help, Next, Back, Finish, and Cancel buttons (or some
subset).
Clients may subclass WizardDialog, although this is rarely
required.
Inner Class :protected class PageContainerFillLayout extends Layout
createContents(Composite parent) The WizardDialog implementation of this
Window method calls call IWizard.addPages
to allow the current wizard to add extra pages, then
super.createContents to create the controls.
run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) This implementation of IRunnableContext#run(boolean, boolean,
IRunnableWithProgress) blocks until the runnable has been run, regardless
of the value of fork.
Image registry key for error message image (value
"dialog_title_error_image").
Constructor Detail
WizardDialog
public WizardDialog(Shell parentShell, IWizard newWizard)(Code)
Creates a new wizard dialog for the given wizard.
Parameters: parentShell - the parent shell Parameters: newWizard - the wizard this dialog is working on
Adds a listener for page changes to the list of page changing listeners
registered for this dialog. Has no effect if an identical listener is
already registered.
Parameters: listener - a page changing listener since: 3.3
The WizardDialog implementation of this framework method
prevents the parent composite's columns from being made equal width in
order to remove the margin between the Back and Next buttons.
Parameters: parent - the parent composite to contain the buttons
createContents
protected Control createContents(Composite parent)(Code)
The WizardDialog implementation of this
Window method calls call IWizard.addPages
to allow the current wizard to add extra pages, then
super.createContents to create the controls. It then calls
IWizard.createPageControls to allow the wizard to
pre-create their page controls prior to opening, so that the wizard opens
to the correct size. And finally it shows the first page.
createDialogArea
protected Control createDialogArea(Composite parent)(Code)
Notifies any selection changed listeners that the selected page has
changed. Only listeners registered at the time this method is called are
notified.
Parameters: event - a selection changed event See Also:IPageChangedListener.pageChanged since: 3.1
Notifies any page changing listeners that the currently selected dialog
page is changing. Only listeners registered at the time this method is
called are notified.
Parameters: event - a selection changing event See Also:IPageChangingListener.handlePageChanging(PageChangingEvent) since: 3.3
Removes the provided page changing listener from the list of page
changing listeners registered for the dialog.
Parameters: listener - a page changing listener since: 3.3
This implementation of IRunnableContext#run(boolean, boolean,
IRunnableWithProgress) blocks until the runnable has been run, regardless
of the value of fork. It is recommended that
fork is set to true in most cases. If fork
is set to false, the runnable will run in the UI thread
and it is the runnable's responsibility to call
Display.readAndDispatch() to ensure UI responsiveness.
UI state is saved prior to executing the long-running operation and is
restored after the long-running operation completes executing. Any
attempt to change the UI state of the wizard in the long-running
operation will be nullified when original UI state is restored.
public void setMinimumPageSize(int minWidth, int minHeight)(Code)
Sets the minimum page size used for the pages.
Parameters: minWidth - the minimum page width Parameters: minHeight - the minimum page height See Also:WizardDialog.setMinimumPageSize(Point)
Sets the minimum page size used for the pages.
Parameters: size - the page size encoded as new Point(width,height) See Also:WizardDialog.setMinimumPageSize(int,int)
setPageSize
public void setPageSize(int width, int height)(Code)
Sets the size of all pages. The given size takes precedence over computed
sizes.
Parameters: width - the page width Parameters: height - the page height See Also:WizardDialog.setPageSize(Point)
Sets the size of all pages. The given size takes precedence over computed
sizes.
Parameters: size - the page size encoded as new Point(width,height) See Also:WizardDialog.setPageSize(int,int)
Computes the correct dialog size for the current page and resizes its
shell if nessessary. Also causes the container to refresh its layout.
Parameters: page - the wizard page to use to resize the dialog since: 2.0