Interface IWizard
- All Known Subinterfaces:
IConfigurationWizard,IExportWizard,IImportWizard,INewWizard,IWorkbenchWizard,IWorkingSetEditWizard,IWorkingSetNewWizard
- All Known Implementing Classes:
BasicNewFileResourceWizard,BasicNewFolderResourceWizard,BasicNewProjectResourceWizard,BasicNewResourceWizard,DeleteResourcesWizard,ExternalProjectImportWizard,FileSystemExportWizard,FileSystemImportWizard,ModelParticipantWizard,MoveResourcesWizard,ParticipantSynchronizeWizard,RefactoringHistoryWizard,RefactoringWizard,RenameResourceWizard,SubscriberParticipantWizard,Wizard,ZipFileExportWizard,ZipFileImportWizard
The class Wizard provides an abstract implementation
of this interface. However, clients are also free to implement this
interface if Wizard does not suit their needs.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPages()Adds any last-minute pages to this wizard.booleanReturns whether this wizard could be finished without further user interaction.voidcreatePageControls(Composite pageContainer) Creates this wizard's controls in the given parent control.voiddispose()Disposes of this wizard and frees all SWT resources.Returns the container of this wizard.Returns the default page image for this wizard.Returns the dialog settings for this wizard.default PointReturns the minimum size of this wizard.getNextPage(IWizardPage page) Returns the successor of the given page.Returns the wizard page with the given name belonging to this wizard.intReturns the number of pages in this wizard.getPages()Returns all the pages in this wizard.getPreviousPage(IWizardPage page) Returns the predecessor of the given page.Returns the first page to be shown in this wizard.Returns the title bar color for this wizard.Returns the window title string for this wizard.booleanReturns whether help is available for this wizard.booleanReturns whether this wizard needs Previous and Next buttons.booleanReturns whether this wizard needs a progress monitor.booleanPerforms any actions appropriate in response to the user having pressed the Cancel button, or refuse if canceling now is not permitted.booleanPerforms any actions appropriate in response to the user having pressed the Finish button, or refuse if finishing now is not permitted.voidsetContainer(IWizardContainer wizardContainer) Sets or clears the container of this wizard.
-
Method Details
-
addPages
void addPages()Adds any last-minute pages to this wizard.This method is called just before the wizard becomes visible, to give the wizard the opportunity to add any lazily created pages.
-
canFinish
boolean canFinish()Returns whether this wizard could be finished without further user interaction.The result of this method is typically used by the wizard container to enable or disable the Finish button.
- Returns:
trueif the wizard could be finished, andfalseotherwise
-
createPageControls
Creates this wizard's controls in the given parent control.The wizard container calls this method to create the controls for the wizard's pages before the wizard is opened. This allows the wizard to size correctly; otherwise a resize may occur when moving to a new page.
- Parameters:
pageContainer- the parent control
-
dispose
void dispose()Disposes of this wizard and frees all SWT resources. -
getContainer
IWizardContainer getContainer()Returns the container of this wizard.- Returns:
- the wizard container, or
nullif this wizard has yet to be added to a container
-
getDefaultPageImage
Image getDefaultPageImage()Returns the default page image for this wizard.This image can be used for pages which do not supply their own image.
- Returns:
- the default page image
-
getDialogSettings
IDialogSettings getDialogSettings()Returns the dialog settings for this wizard.The dialog store is used to record state between wizard invocations (for example, radio button selections, last directory, etc.).
- Returns:
- the dialog settings, or
nullif none
-
getNextPage
Returns the successor of the given page.This method is typically called by a wizard page
- Parameters:
page- the page- Returns:
- the next page, or
nullif none
-
getMinimumWizardSize
Returns the minimum size of this wizard. The minimum size is calculated using the minimum page sizes of all wizard pages. May returnnullif none of the wizard pages specify a minimum size.- Returns:
- the minimum size encoded as
new Point(width,height) - Since:
- 3.30
- See Also:
-
getPage
Returns the wizard page with the given name belonging to this wizard.- Parameters:
pageName- the name of the wizard page- Returns:
- the wizard page with the given name, or
nullif none
-
getPageCount
int getPageCount()Returns the number of pages in this wizard.- Returns:
- the number of wizard pages
-
getPages
IWizardPage[] getPages()Returns all the pages in this wizard.- Returns:
- a list of pages
-
getPreviousPage
Returns the predecessor of the given page.This method is typically called by a wizard page
- Parameters:
page- the page- Returns:
- the previous page, or
nullif none
-
getStartingPage
IWizardPage getStartingPage()Returns the first page to be shown in this wizard.- Returns:
- the first wizard page
-
getTitleBarColor
RGB getTitleBarColor()Returns the title bar color for this wizard.- Returns:
- the title bar color
-
getWindowTitle
String getWindowTitle()Returns the window title string for this wizard.- Returns:
- the window title string, or
nullfor no title
-
isHelpAvailable
boolean isHelpAvailable()Returns whether help is available for this wizard.The result of this method is typically used by the container to show or hide a button labeled "Help".
Note: This wizard's container might be a
TrayDialogwhich provides its own help support that is independent of this property.Note 2: In the default
WizardDialogimplementation, the "Help" button only works whenIDialogPage.performHelp()is implemented.- Returns:
trueif help is available,falseotherwise- See Also:
-
needsPreviousAndNextButtons
boolean needsPreviousAndNextButtons()Returns whether this wizard needs Previous and Next buttons.The result of this method is typically used by the container.
- Returns:
trueif Previous and Next buttons are required, andfalseif none are needed
-
needsProgressMonitor
boolean needsProgressMonitor()Returns whether this wizard needs a progress monitor.The result of this method is typically used by the container.
- Returns:
trueif a progress monitor is required, andfalseif none is needed
-
performCancel
boolean performCancel()Performs any actions appropriate in response to the user having pressed the Cancel button, or refuse if canceling now is not permitted.- Returns:
trueto indicate the cancel request was accepted, andfalseto indicate that the cancel request was refused
-
performFinish
boolean performFinish()Performs any actions appropriate in response to the user having pressed the Finish button, or refuse if finishing now is not permitted. Normally this method is only called on the container's current wizard. However if the current wizard is a nested wizard this method will also be called on all wizards in its parent chain. Such parents may use this notification to save state etc. However, the value the parents return from this method is ignored.- Returns:
trueto indicate the finish request was accepted, andfalseto indicate that the finish request was refused
-
setContainer
Sets or clears the container of this wizard.- Parameters:
wizardContainer- the wizard container, ornull
-