Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.function.generic
Class AbstractGenericFunctionWizard<P extends AbstractParameter,T extends AbstractFunction<P>>

java.lang.Object
  extended by org.eclipse.jface.wizard.Wizard
      extended by eu.esdihumboldt.hale.ui.function.AbstractFunctionWizard
          extended by eu.esdihumboldt.hale.ui.function.generic.AbstractGenericFunctionWizard<P,T>
Type Parameters:
T - the function type
P - the field definition type
All Implemented Interfaces:
FunctionWizard, TitleImageWizard, org.eclipse.jface.wizard.IWizard
Direct Known Subclasses:
GenericPropertyFunctionWizard, GenericTypeFunctionWizard

public abstract class AbstractGenericFunctionWizard<P extends AbstractParameter,T extends AbstractFunction<P>>
extends AbstractFunctionWizard
implements TitleImageWizard

Generic function wizard

Author:
Simon Templer

Field Summary
 
Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
 
Constructor Summary
AbstractGenericFunctionWizard(Cell cell)
           
AbstractGenericFunctionWizard(SchemaSelection selection, String functionId)
          Create a generic function wizard for a certain function based on a schema selection
 
Method Summary
 void addPages()
           
protected abstract  EntitiesPage<T,P,?> createEntitiesPage(SchemaSelection initSelection, Cell initCell)
          Create the entities page
protected  List<ParameterPage> createParameterPages(Cell initialCell)
          Create the page for configuring the function parameters.
 void dispose()
           
abstract  T getFunction()
          Get the function
 String getFunctionId()
          Get the function identifier
 MutableCell getResult()
          Get the result cell
 org.eclipse.swt.graphics.Image getTitleImage()
          Get the title image.
 Cell getUnfinishedCell()
          Returns the cell that would be created if the wizard would be finished now.
 void init()
          Calls AbstractFunctionWizard.init(Cell) or AbstractFunctionWizard.init(SchemaSelection)
protected  void init(Cell cell)
          Initialize the wizard based on an existing cell.
protected  void init(SchemaSelection selection)
          Initialize the wizard based on a schema selection.
 boolean performFinish()
           
 
Methods inherited from class eu.esdihumboldt.hale.ui.function.AbstractFunctionWizard
getInitCell, getInitSelection
 
Methods inherited from class org.eclipse.jface.wizard.Wizard
addPage, canFinish, createPageControls, 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, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer
 

Constructor Detail

AbstractGenericFunctionWizard

public AbstractGenericFunctionWizard(SchemaSelection selection,
                                     String functionId)
Create a generic function wizard for a certain function based on a schema selection

Parameters:
selection - the schema selection, may be null
functionId - the function identifier

AbstractGenericFunctionWizard

public AbstractGenericFunctionWizard(Cell cell)
See Also:
AbstractFunctionWizard.AbstractFunctionWizard(Cell)
Method Detail

init

public void init()
Description copied from class: AbstractFunctionWizard
Calls AbstractFunctionWizard.init(Cell) or AbstractFunctionWizard.init(SchemaSelection)

Specified by:
init in interface FunctionWizard
Overrides:
init in class AbstractFunctionWizard
See Also:
AbstractFunctionWizard.init()

init

protected void init(SchemaSelection selection)
Description copied from class: AbstractFunctionWizard
Initialize the wizard based on a schema selection.

Overrides:
init in class AbstractFunctionWizard
Parameters:
selection - the schema selection, may be null
See Also:
AbstractFunctionWizard.init(SchemaSelection)

init

protected void init(Cell cell)
Description copied from class: AbstractFunctionWizard
Initialize the wizard based on an existing cell.

Overrides:
init in class AbstractFunctionWizard
Parameters:
cell - the cell
See Also:
AbstractFunctionWizard.init(Cell)

createEntitiesPage

protected abstract EntitiesPage<T,P,?> createEntitiesPage(SchemaSelection initSelection,
                                                          Cell initCell)
Create the entities page

Parameters:
initSelection - the initial selection, may be null
initCell - the initial cell, may be null
Returns:
the entities page

createParameterPages

protected List<ParameterPage> createParameterPages(Cell initialCell)
Create the page for configuring the function parameters.

Parameters:
initialCell - the initial cell, may be null
Returns:
the parameter configuration page or null

addPages

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

getResult

public MutableCell getResult()
Description copied from interface: FunctionWizard
Get the result cell

Specified by:
getResult in interface FunctionWizard
Returns:
the result cell
See Also:
FunctionWizard.getResult()

getFunctionId

public String getFunctionId()
Get the function identifier

Returns:
the function identifier

getFunction

public abstract T getFunction()
Get the function

Returns:
the function

performFinish

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

getUnfinishedCell

public Cell getUnfinishedCell()
Returns the cell that would be created if the wizard would be finished now.

Returns:
the cell

getTitleImage

public org.eclipse.swt.graphics.Image getTitleImage()
Description copied from interface: TitleImageWizard
Get the title image.

Specified by:
getTitleImage in interface TitleImageWizard
Returns:
the title image or null
See Also:
TitleImageWizard.getTitleImage()

dispose

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

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d