com.ibm.lab.soln.dialogs
Class StructureWizard

java.lang.Object
  |
  +--org.eclipse.jface.wizard.Wizard
        |
        +--com.ibm.lab.soln.dialogs.StructureWizard
All Implemented Interfaces:
org.eclipse.ui.INewWizard, org.eclipse.jface.wizard.IWizard, org.eclipse.ui.IWorkbenchWizard

public class StructureWizard
extends org.eclipse.jface.wizard.Wizard
implements org.eclipse.ui.INewWizard

Demonstration of a simple multi-page wizard that supports controlled paging and file creation. Three pages are added in the addPages() method. File creation is supported through a custom page that inherits container selection and file name validation. Additional pages support testing of the page complete status using values passed to the wizard page constructors.

See Also:
Wizard, INewWizard

Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
 
Constructor Summary
StructureWizard()
          The constructor.
 
Method Summary
 void addPages()
          Add predetermined pages that are required in the wizard.
 void init(org.eclipse.ui.IWorkbench workbench, org.eclipse.jface.viewers.IStructuredSelection selection)
          Initialize processing saves local workbench and selection references and sets wizard title/image.
 boolean performFinish()
          Passes the wizard finish request on to each resource creation page.
 
Methods inherited from class org.eclipse.jface.wizard.Wizard
addPage, canFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.wizard.IWizard
canFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer
 

Constructor Detail

StructureWizard

public StructureWizard()
The constructor.
Method Detail

addPages

public void addPages()
Add predetermined pages that are required in the wizard. Other pages could be added after the wizard starts using the addPage() method.
Specified by:
addPages in interface org.eclipse.jface.wizard.IWizard
Overrides:
addPages in class org.eclipse.jface.wizard.Wizard
See Also:
Wizard.addPages()

init

public void init(org.eclipse.ui.IWorkbench workbench,
                 org.eclipse.jface.viewers.IStructuredSelection selection)
Initialize processing saves local workbench and selection references and sets wizard title/image.
Specified by:
init in interface org.eclipse.ui.IWorkbenchWizard

performFinish

public boolean performFinish()
Passes the wizard finish request on to each resource creation page. Most pages will have been finished already, as the getNextPage logic in each page calls the page finish as they page forward. The last page added will still need to receive a finish request.

Sending the finish request to a page more than once is ok, each page caches the resource after initial creation and returns the original instance.

Specified by:
performFinish in interface org.eclipse.jface.wizard.IWizard
Overrides:
performFinish in class org.eclipse.jface.wizard.Wizard
See Also:
Wizard.performFinish()