public abstract class WizardPage extends DialogPage implements IWizardPage
Subclasses must implement the createControl method
to create the specific controls for the wizard page.
Subclasses may call the following methods to configure the wizard page:
setDescriptionsetErrorMessagesetImageDescriptorsetMessagesetPageCompletesetPreviousPagesetTitleSubclasses may override these methods if required:
performHelp - may be reimplemented to display help for the pagecanFlipToNextPage - may be extended or reimplementedisPageComplete - may be extended setDescription - may be extended setTitle - may be extended dispose - may be extended to dispose additional allocated SWT resources
Note that clients are free to implement IWizardPage from scratch
instead of subclassing WizardPage. Correct implementations of
IWizardPage will work with any correct implementation of
IWizard.
ERROR, INFORMATION, NONE, WARNING| Modifier | Constructor and Description |
|---|---|
protected |
WizardPage(String pageName)
Creates a new wizard page with the given name, and
with no title or image.
|
protected |
WizardPage(String pageName,
String title,
ImageDescriptor titleImage)
Creates a new wizard page with the given name, title, and image.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFlipToNextPage()
The
WizardPage implementation of this IWizardPage
method returns true if this page is complete (isPageComplete)
and there is a next page to flip to. |
protected IWizardContainer |
getContainer()
Returns the wizard container for this wizard page.
|
protected IDialogSettings |
getDialogSettings()
Returns the dialog settings for this wizard page.
|
Image |
getImage()
Returns this dialog page's image.
|
String |
getName()
Returns this page's name.
|
IWizardPage |
getNextPage()
Returns the wizard page that would to be shown if the user was to
press the Next button.
|
IWizardPage |
getPreviousPage()
Returns the wizard page that would to be shown if the user was to
press the Back button.
|
Shell |
getShell()
The
WizardPage implementation of this method declared on
DialogPage returns the shell of the container. |
IWizard |
getWizard()
Returns the wizard that hosts this wizard page.
|
protected boolean |
isCurrentPage()
Returns whether this page is the current one in the wizard's container.
|
boolean |
isPageComplete()
The
WizardPage implementation of this IWizard method
returns the value of an internal state variable set by
setPageComplete. |
void |
setDescription(String description)
The
WizardPage implementation of this IDialogPage
method extends the DialogPage implementation to update
the wizard container title bar. |
void |
setErrorMessage(String newMessage)
The
WizardPage implementation of this method
declared on DialogPage updates the container
if this is the current page. |
void |
setImageDescriptor(ImageDescriptor image)
The
WizardPage implementation of this method
declared on DialogPage updates the container
if this page is the current page. |
void |
setMessage(String newMessage,
int newType)
The
WizardPage implementation of this method
declared on DialogPage updates the container
if this is the current page. |
void |
setPageComplete(boolean complete)
Sets whether this page is complete.
|
void |
setPreviousPage(IWizardPage page)
Sets the wizard page that would typically be shown
if the user was to press the Back button.
|
void |
setTitle(String title)
The
WizardPage implementation of this IDialogPage
method extends the DialogPage implementation to update
the wizard container title bar. |
void |
setWizard(IWizard newWizard)
Sets the wizard that hosts this wizard page.
|
String |
toString()
Returns a printable representation of this wizard page suitable
only for debug purposes.
|
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateControl, dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisibleprotected WizardPage(String pageName)
pageName - the name of the pageprotected WizardPage(String pageName, String title, ImageDescriptor titleImage)
pageName - the name of the pagetitle - the title for this wizard page,
or null if nonetitleImage - the image descriptor for the title of this wizard page,
or null if nonepublic boolean canFlipToNextPage()
WizardPage implementation of this IWizardPage
method returns true if this page is complete (isPageComplete)
and there is a next page to flip to. Subclasses may override (extend or reimplement).canFlipToNextPage in interface IWizardPagetrue if the next page could be displayed,
and false otherwisegetNextPage(),
isPageCompleteprotected IWizardContainer getContainer()
null if this
wizard page has yet to be added to a wizard, or the
wizard has yet to be added to a containerprotected IDialogSettings getDialogSettings()
null if nonepublic Image getImage()
IDialogPagegetImage in interface IDialogPagegetImage in class DialogPagenull
if nonepublic String getName()
IWizardPagegetName in interface IWizardPagepublic IWizardPage getNextPage()
IWizardPagegetNextPage in interface IWizardPagenull if nonepublic IWizardPage getPreviousPage()
IWizardPagegetPreviousPage in interface IWizardPagenull if nonepublic Shell getShell()
WizardPage implementation of this method declared on
DialogPage returns the shell of the container.
The advantage of this implementation is that the shell is accessable
once the container is created even though this page's control may not
yet be created.getShell in class DialogPagepublic IWizard getWizard()
IWizardPagegetWizard in interface IWizardPagenull if this page has not been
added to any wizardIWizardPage.setWizard(org.eclipse.jface.wizard.IWizard)protected boolean isCurrentPage()
true if the page is active,
and false otherwisepublic boolean isPageComplete()
WizardPage implementation of this IWizard method
returns the value of an internal state variable set by
setPageComplete. Subclasses may extend.isPageComplete in interface IWizardPagetrue if this page is complete, and
false otherwisepublic void setDescription(String description)
WizardPage implementation of this IDialogPage
method extends the DialogPage implementation to update
the wizard container title bar. Subclasses may extend.setDescription in interface IDialogPagesetDescription in class DialogPagedescription - the description text for this dialog
page, or null if nonepublic void setErrorMessage(String newMessage)
WizardPage implementation of this method
declared on DialogPage updates the container
if this is the current page.setErrorMessage in class DialogPagenewMessage - the message, or null to clear the error messagepublic void setImageDescriptor(ImageDescriptor image)
WizardPage implementation of this method
declared on DialogPage updates the container
if this page is the current page.setImageDescriptor in interface IDialogPagesetImageDescriptor in class DialogPageimage - the image for this dialog page,
or null if nonepublic void setMessage(String newMessage, int newType)
WizardPage implementation of this method
declared on DialogPage updates the container
if this is the current page.setMessage in class DialogPagenewMessage - the message, or null to clear the messagenewType - the message typepublic void setPageComplete(boolean complete)
This information is typically used by the wizard to decide when it is okay to move on to the next page or finish up.
complete - true if this page is complete, and
and false otherwiseisPageCompletepublic void setPreviousPage(IWizardPage page)
IWizardPageThis method is called by the container.
setPreviousPage in interface IWizardPagepage - the previous wizard pagepublic void setTitle(String title)
WizardPage implementation of this IDialogPage
method extends the DialogPage implementation to update
the wizard container title bar. Subclasses may extend.setTitle in interface IDialogPagesetTitle in class DialogPagetitle - the title of this dialog page,
or null if nonepublic void setWizard(IWizard newWizard)
IWizardPagesetWizard in interface IWizardPagenewWizard - the wizardIWizardPage.getWizard()Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.