Package org.eclipse.jface.wizard
Class WizardPage
java.lang.Object
org.eclipse.jface.dialogs.DialogPage
org.eclipse.jface.wizard.WizardPage
- All Implemented Interfaces:
IDialogPage,IMessageProvider,IWizardPage
- Direct Known Subclasses:
AcceptLicensesWizardPage,RefactoringWizardPage,WizardDataTransferPage,WizardExternalProjectImportPage,WizardNewFileCreationPage,WizardNewFolderMainPage,WizardNewLinkPage,WizardNewProjectCreationPage,WizardNewProjectReferencePage,WizardSelectionPage
An abstract base implementation of a wizard page.
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:
setDescriptionsetErrorMessagesetImageDescriptorsetMessagesetPageCompletesetPreviousPagesetTitle
Subclasses may override these methods if required:
performHelp- may be reimplemented to display help for the pagecanFlipToNextPage- may be extended or reimplementedisPageComplete- may be extendedsetDescription- may be extendedsetTitle- may be extendeddispose- 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.
-
Field Summary
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWizardPage(String pageName) Creates a new wizard page with the given name, and with no title or image.protectedWizardPage(String pageName, String title, ImageDescriptor titleImage) Creates a new wizard page with the given name, title, and image. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTheWizardPageimplementation of thisIWizardPagemethod returnstrueif this page is complete (isPageComplete) and there is a next page to flip to.protected IWizardContainerReturns the wizard container for this wizard page.protected IDialogSettingsReturns the dialog settings for this wizard page.getImage()Returns this dialog page's image.getName()Returns this page's name.Returns the wizard page that would to be shown if the user was to press the Next button.Returns the wizard page that would to be shown if the user was to press the Back button.getShell()TheWizardPageimplementation of this method declared onDialogPagereturns the shell of the container.Returns the wizard that hosts this wizard page.protected booleanReturns whether this page is the current one in the wizard's container.booleanTheWizardPageimplementation of thisIWizardmethod returns the value of an internal state variable set bysetPageComplete.voidsetDescription(String description) TheWizardPageimplementation of thisIDialogPagemethod extends theDialogPageimplementation to update the wizard container title bar.voidsetErrorMessage(String newMessage) TheWizardPageimplementation of this method declared onDialogPageupdates the container if this is the current page.voidTheWizardPageimplementation of this method declared onDialogPageupdates the container if this page is the current page.voidsetMessage(String newMessage, int newType) TheWizardPageimplementation of this method declared onDialogPageupdates the container if this is the current page.voidsetPageComplete(boolean complete) Sets whether this page is complete.voidsetPreviousPage(IWizardPage page) Sets the wizard page that would typically be shown if the user was to press the Back button.voidTheWizardPageimplementation of thisIDialogPagemethod extends theDialogPageimplementation to update the wizard container title bar.voidSets the wizard that hosts this wizard page.toString()Returns a printable representation of this wizard page suitable only for debug purposes.Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jface.dialogs.IDialogPage
createControl, dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisibleMethods inherited from interface org.eclipse.jface.wizard.IWizardPage
getMinimumPageSize
-
Constructor Details
-
WizardPage
Creates a new wizard page with the given name, and with no title or image.- Parameters:
pageName- the name of the page
-
WizardPage
Creates a new wizard page with the given name, title, and image.- Parameters:
pageName- the name of the pagetitle- the title for this wizard page, ornullif nonetitleImage- the image descriptor for the title of this wizard page, ornullif none
-
-
Method Details
-
canFlipToNextPage
public boolean canFlipToNextPage()TheWizardPageimplementation of thisIWizardPagemethod returnstrueif this page is complete (isPageComplete) and there is a next page to flip to. Subclasses may override (extend or reimplement).- Specified by:
canFlipToNextPagein interfaceIWizardPage- Returns:
trueif the next page could be displayed, andfalseotherwise- See Also:
-
getContainer
Returns the wizard container for this wizard page.- Returns:
- the wizard container, or
nullif this wizard page has yet to be added to a wizard, or the wizard has yet to be added to a container
-
getDialogSettings
Returns the dialog settings for this wizard page.- Returns:
- the dialog settings, or
nullif none
-
getImage
Description copied from interface:IDialogPageReturns this dialog page's image.- Specified by:
getImagein interfaceIDialogPage- Overrides:
getImagein classDialogPage- Returns:
- the image for this dialog page, or
nullif none
-
getName
Description copied from interface:IWizardPageReturns this page's name.- Specified by:
getNamein interfaceIWizardPage- Returns:
- the name of this page
-
getNextPage
Description copied from interface:IWizardPageReturns the wizard page that would to be shown if the user was to press the Next button.- Specified by:
getNextPagein interfaceIWizardPage- Returns:
- the next wizard page, or
nullif none
-
getPreviousPage
Description copied from interface:IWizardPageReturns the wizard page that would to be shown if the user was to press the Back button.- Specified by:
getPreviousPagein interfaceIWizardPage- Returns:
- the previous wizard page, or
nullif none
-
getShell
TheWizardPageimplementation of this method declared onDialogPagereturns 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.- Overrides:
getShellin classDialogPage- Returns:
- the shell
-
getWizard
Description copied from interface:IWizardPageReturns the wizard that hosts this wizard page.- Specified by:
getWizardin interfaceIWizardPage- Returns:
- the wizard, or
nullif this page has not been added to any wizard - See Also:
-
isCurrentPage
protected boolean isCurrentPage()Returns whether this page is the current one in the wizard's container.- Returns:
trueif the page is active, andfalseotherwise
-
isPageComplete
public boolean isPageComplete()TheWizardPageimplementation of thisIWizardmethod returns the value of an internal state variable set bysetPageComplete. Subclasses may extend.- Specified by:
isPageCompletein interfaceIWizardPage- Returns:
trueif this page is complete, andfalseotherwise
-
setDescription
TheWizardPageimplementation of thisIDialogPagemethod extends theDialogPageimplementation to update the wizard container title bar. Subclasses may extend.- Specified by:
setDescriptionin interfaceIDialogPage- Overrides:
setDescriptionin classDialogPage- Parameters:
description- the description text for this dialog page, ornullif none
-
setErrorMessage
TheWizardPageimplementation of this method declared onDialogPageupdates the container if this is the current page.- Overrides:
setErrorMessagein classDialogPage- Parameters:
newMessage- the message, ornullto clear the error message
-
setImageDescriptor
TheWizardPageimplementation of this method declared onDialogPageupdates the container if this page is the current page.- Specified by:
setImageDescriptorin interfaceIDialogPage- Overrides:
setImageDescriptorin classDialogPage- Parameters:
image- the image for this dialog page, ornullif none
-
setMessage
TheWizardPageimplementation of this method declared onDialogPageupdates the container if this is the current page.- Overrides:
setMessagein classDialogPage- Parameters:
newMessage- the message, ornullto clear the messagenewType- the message type
-
setPageComplete
public void setPageComplete(boolean complete) Sets whether this page is 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.
- Parameters:
complete-trueif this page is complete, and andfalseotherwise- See Also:
-
setPreviousPage
Description copied from interface:IWizardPageSets the wizard page that would typically be shown if the user was to press the Back button.This method is called by the container.
- Specified by:
setPreviousPagein interfaceIWizardPage- Parameters:
page- the previous wizard page
-
setTitle
TheWizardPageimplementation of thisIDialogPagemethod extends theDialogPageimplementation to update the wizard container title bar. Subclasses may extend.- Specified by:
setTitlein interfaceIDialogPage- Overrides:
setTitlein classDialogPage- Parameters:
title- the title of this dialog page, ornullif none
-
setWizard
Description copied from interface:IWizardPageSets the wizard that hosts this wizard page. Once established, a page's wizard cannot be changed to a different wizard.- Specified by:
setWizardin interfaceIWizardPage- Parameters:
newWizard- the wizard- See Also:
-
toString
Returns a printable representation of this wizard page suitable only for debug purposes.
-