|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.wizard.Wizard
public abstract class Wizard
An abstract base implementation of a wizard. A typical client subclasses
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 java.lang.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(java.lang.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. |
java.lang.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(java.lang.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 java.lang.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 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 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()
IWizard
getContainer in interface 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 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 IWizardnull if nonepublic IWizardPage getNextPage(IWizardPage page)
IWizardThis method is typically called by a wizard page
getNextPage in interface IWizardpage - the page
null if nonepublic IWizardPage getPage(java.lang.String name)
IWizard
getPage in interface IWizardname - the name of the wizard page
null if nonepublic int getPageCount()
IWizard
getPageCount in interface IWizardpublic IWizardPage[] getPages()
IWizard
getPages in interface IWizardpublic IWizardPage getPreviousPage(IWizardPage page)
IWizardThis method is typically called by a wizard page
getPreviousPage in interface IWizardpage - the page
null if nonepublic Shell getShell()
null is returned.
public IWizardPage getStartingPage()
IWizard
getStartingPage in interface IWizardpublic RGB getTitleBarColor()
IWizard
getTitleBarColor in interface IWizardpublic java.lang.String getWindowTitle()
IWizard
getWindowTitle in interface 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 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 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 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 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 IWizardtrue to indicate the finish request
was accepted, and false to indicate
that the finish request was refusedpublic void setContainer(IWizardContainer wizardContainer)
IWizard
setContainer in interface 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(java.lang.String newTitle)
newTitle - the window title for the container
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.