|
Eclipse Platform 2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.eclipse.jface.wizard.Wizard
An abstract base implementation of a wizard. A typical client subclasses
both Wizard 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.
| Field Summary | |
static String |
DEFAULT_IMAGE
Image registry key of the default image for wizard pages (value "org.eclipse.jface.wizard.Wizard.pageImage"). |
| Constructor Summary | |
protected |
Wizard()
Creates a new empty wizard. |
| Method Summary | |
void |
addPage(IWizardPage page)
Adds a new page to this wizard. |
void |
addPages()
The Wizard implementation of this IWizard
method does nothing. |
boolean |
canFinish()
Returns whether this wizard could be finished without further user interaction. |
void |
createPageControls(Composite pageContainer)
The Wizard implementation of this IWizard
method creates all the pages controls using IDialogPage.createControl. |
void |
dispose()
The Wizard implementation of this IWizard
method disposes all the pages controls using DialogPage.dispose. |
IWizardContainer |
getContainer()
Returns the container of this wizard. |
Image |
getDefaultPageImage()
Returns the default page image for this wizard. |
IDialogSettings |
getDialogSettings()
Returns the dialog settings for this wizard. |
IWizardPage |
getNextPage(IWizardPage page)
Returns the successor of the given page. |
IWizardPage |
getPage(String name)
Returns the wizard page with the given name belonging to this wizard. |
int |
getPageCount()
Returns the number of pages in this wizard. |
IWizardPage[] |
getPages()
Returns all the pages in this wizard. |
IWizardPage |
getPreviousPage(IWizardPage page)
Returns the predecessor of the given page. |
Shell |
getShell()
Returns the wizard's shell if the wizard is visible. |
IWizardPage |
getStartingPage()
Returns the first page to be shown in this wizard. |
RGB |
getTitleBarColor()
Returns the title bar color for this wizard. |
String |
getWindowTitle()
Returns the window title string for this wizard. |
boolean |
isHelpAvailable()
Returns whether help is available for this wizard. |
boolean |
needsPreviousAndNextButtons()
Returns whether this wizard needs Previous and Next buttons. |
boolean |
needsProgressMonitor()
Returns whether this wizard needs a progress monitor. |
boolean |
performCancel()
The Wizard implementation of this IWizard
method does nothing and returns true. |
abstract boolean |
performFinish()
Subclasses must implement this IWizard method
to perform any special finish processing for their wizard. |
void |
setContainer(IWizardContainer wizardContainer)
Sets or clears the container of this wizard. |
void |
setDefaultPageImageDescriptor(ImageDescriptor imageDescriptor)
Sets the default page image descriptor for this wizard. |
void |
setDialogSettings(IDialogSettings settings)
Sets the dialog settings for this wizard. |
void |
setForcePreviousAndNextButtons(boolean b)
Controls whether the wizard needs Previous and Next buttons even if it currently contains only one page. |
void |
setHelpAvailable(boolean b)
Sets whether help is available for this wizard. |
void |
setNeedsProgressMonitor(boolean b)
Sets whether this wizard needs a progress monitor. |
void |
setTitleBarColor(RGB color)
Sets the title bar color for this wizard. |
void |
setWindowTitle(String newTitle)
Sets the window title for the container that hosts this page to the given string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String DEFAULT_IMAGE
"org.eclipse.jface.wizard.Wizard.pageImage").| Constructor Detail |
protected Wizard()
| Method Detail |
public void addPage(IWizardPage page)
page - the new pagepublic void addPages()
Wizard implementation of this IWizard
method does nothing.
Subclasses should extend if extra pages need to be added before
the wizard opens. New pages should be added by calling addPage.addPages in interface IWizardpublic boolean canFinish()
IWizardThe result of this method is typically used by the wizard container to enable or disable the Finish button.
canFinish in interface IWizardorg.eclipse.jface.wizard.IWizardtrue if the wizard could be finished,
and false otherwisepublic void createPageControls(Composite pageContainer)
Wizard implementation of this IWizard
method creates all the pages controls using IDialogPage.createControl.
Subclasses should reimplement this method if they want to delay creating
one or more of the pages lazily. The framework ensures that the contents
of a page will be created before attempting to show it.createPageControls in interface IWizardorg.eclipse.jface.wizard.IWizardpageContainer - the parent controlpublic void dispose()
Wizard implementation of this IWizard
method disposes all the pages controls using DialogPage.dispose.
Subclasses should extend this method if the wizard instance maintains
addition SWT resource that need to be disposed.dispose in interface IWizardpublic IWizardContainer getContainer()
IWizardgetContainer in interface IWizardorg.eclipse.jface.wizard.IWizardnull if this
wizard has yet to be added to a containerpublic Image getDefaultPageImage()
IWizardThis image can be used for pages which do not supply their own image.
getDefaultPageImage in interface IWizardorg.eclipse.jface.wizard.IWizardpublic IDialogSettings getDialogSettings()
IWizardThe dialog store is used to record state between wizard invocations (for example, radio button selections, last directory, etc.).
getDialogSettings in interface IWizardorg.eclipse.jface.wizard.IWizardnull if nonepublic IWizardPage getNextPage(IWizardPage page)
IWizardThis method is typically called by a wizard page
getNextPage in interface IWizardorg.eclipse.jface.wizard.IWizardpage - the pagenull if nonepublic IWizardPage getPage(String name)
IWizardgetPage in interface IWizardorg.eclipse.jface.wizard.IWizardpageName - the name of the wizard pagenull if nonepublic int getPageCount()
IWizardgetPageCount in interface IWizardorg.eclipse.jface.wizard.IWizardpublic IWizardPage[] getPages()
IWizardgetPages in interface IWizardorg.eclipse.jface.wizard.IWizardpublic IWizardPage getPreviousPage(IWizardPage page)
IWizardThis method is typically called by a wizard page
getPreviousPage in interface IWizardorg.eclipse.jface.wizard.IWizardpage - the pagenull if nonepublic Shell getShell()
null is returned.public IWizardPage getStartingPage()
IWizardgetStartingPage in interface IWizardorg.eclipse.jface.wizard.IWizardpublic RGB getTitleBarColor()
IWizardgetTitleBarColor in interface IWizardorg.eclipse.jface.wizard.IWizardpublic String getWindowTitle()
IWizardgetWindowTitle in interface IWizardorg.eclipse.jface.wizard.IWizardnull for no titlepublic boolean isHelpAvailable()
IWizardThe result of this method is typically used by the container to show or hide the Help button.
isHelpAvailable in interface IWizardorg.eclipse.jface.wizard.IWizardtrue if help is available,
and false if this wizard is helplesspublic boolean needsPreviousAndNextButtons()
IWizardThe result of this method is typically used by the container.
needsPreviousAndNextButtons in interface IWizardorg.eclipse.jface.wizard.IWizardtrue if Previous and Next buttons are required,
and false if none are neededpublic boolean needsProgressMonitor()
IWizardThe result of this method is typically used by the container.
needsProgressMonitor in interface IWizardorg.eclipse.jface.wizard.IWizardtrue if a progress monitor is required,
and false if none is neededpublic boolean performCancel()
Wizard implementation of this IWizard
method does nothing and returns true.
Subclasses should reimplement this method if they need to perform
any special cancel processing for their wizard.performCancel in interface IWizardorg.eclipse.jface.wizard.IWizardtrue to indicate the cancel request
was accepted, and false to indicate
that the cancel request was refusedpublic abstract boolean performFinish()
IWizard method
to perform any special finish processing for their wizard.performFinish in interface IWizardorg.eclipse.jface.wizard.IWizardtrue to indicate the finish request
was accepted, and false to indicate
that the finish request was refusedpublic void setContainer(IWizardContainer wizardContainer)
IWizardsetContainer in interface IWizardorg.eclipse.jface.wizard.IWizardwizardContainer - the wizard container, or nullpublic void setDefaultPageImageDescriptor(ImageDescriptor imageDescriptor)
This image descriptor will be used to generate an image for a page with no image of its own; the image will be computed once and cached.
imageDescriptor - the default page image descriptorpublic void setDialogSettings(IDialogSettings settings)
The dialog settings is used to record state between wizard invocations (for example, radio button selection, last import directory, etc.)
settings - the dialog settings, or null if nonegetDialogSettings()public void setForcePreviousAndNextButtons(boolean b)
This flag should be set on wizards where the first wizard page adds follow-on wizard pages based on user input.
b - true to always show Next and Previous
buttons, and false to suppress Next and Previous
buttons for single page wizardspublic void setHelpAvailable(boolean b)
The result of this method is typically used by the container to show or hide the Help button.
b - true if help is available,
and false if this wizard is helplessisHelpAvailable()public void setNeedsProgressMonitor(boolean b)
b - true if a progress monitor is required,
and false if none is neededneedsProgressMonitor()public void setTitleBarColor(RGB color)
color - the title bar colorpublic void setWindowTitle(String newTitle)
newTitle - the window title for the container
|
Eclipse Platform 2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||