net.refractions.udig.catalog.ui.workflow
Class WorkflowWizard

java.lang.Object
  extended by Wizard
      extended by net.refractions.udig.catalog.ui.workflow.WorkflowWizard
Direct Known Subclasses:
CatalogExportDelegateWizard, CatalogExportWizard

public class WorkflowWizard
extends Wizard


Constructor Summary
WorkflowWizard(Workflow workflow, java.util.Map<java.lang.Class<? extends Workflow.State>,WorkflowWizardPage> map)
          Creates a new workflow wizard.
 
Method Summary
 void addPages()
           
 boolean canFinish()
           
 IWizardPage getNextPage(IWizardPage page)
          Returns the next primary page in the page sequence.
 IWizardPage getPage(java.lang.Class<? extends Workflow.State> theClass)
          Returns the wizard page which corresponds to a particular workflow state.
 IWizardPage getPage(Workflow.State state)
          Returns the wizard page which corresponds to a particular workflow state.
protected  java.util.Map<java.lang.Class<? extends Workflow.State>,WorkflowWizardPage> getStateMap()
           
 Workflow getWorkflow()
           
 boolean needsPreviousAndNextButtons()
           
 boolean performFinish()
           
protected  boolean performFinish(IProgressMonitor monitor)
          This method is ran in a non-UI thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowWizard

public WorkflowWizard(Workflow workflow,
                      java.util.Map<java.lang.Class<? extends Workflow.State>,WorkflowWizardPage> map)
Creates a new workflow wizard. The workflow passed in must have a valid set of states.

Parameters:
workflow - The workflow to be run.
map - A map of workflow states to wizard pages.
Method Detail

getWorkflow

public Workflow getWorkflow()

getStateMap

protected java.util.Map<java.lang.Class<? extends Workflow.State>,WorkflowWizardPage> getStateMap()

addPages

public void addPages()

getNextPage

public IWizardPage getNextPage(IWizardPage page)
Returns the next primary page in the page sequence. This method is called by the

See Also:
when a page does not contribute a secondary page., org.eclipse.jface.wizard.IWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)

getPage

public IWizardPage getPage(Workflow.State state)
Returns the wizard page which corresponds to a particular workflow state.

Parameters:
state - The state in question.
Returns:
The wizard page registered for the state or null if no such page exists.

getPage

public IWizardPage getPage(java.lang.Class<? extends Workflow.State> theClass)
Returns the wizard page which corresponds to a particular workflow state.

Parameters:
state - The class of state in question.
Returns:
The wizard page registered for the state or null if no such page exists.

canFinish

public boolean canFinish()

performFinish

public final boolean performFinish()

performFinish

protected boolean performFinish(IProgressMonitor monitor)
This method is ran in a non-UI thread. It uses PlatformGIS#runBlockingOperation(IRunnableWithProgress, IProgressMonitor) to ensure that blocking operations in this method will not block the UI. It is recommended that all long operation are done in this thread and only quick UI updates should be done in the UI thread.

Parameters:
monitor - the dialog progress monitor.
Returns:
if the wizard finished correctly.
See Also:
Display#syncExec(Runnable), Display#asyncExec(Runnable)

needsPreviousAndNextButtons

public boolean needsPreviousAndNextButtons()