Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.function.common
Class EntitySelector<F extends AbstractParameter>

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.util.selector.AbstractSelector<EntityDefinition>
      extended by eu.esdihumboldt.hale.ui.function.common.EntitySelector<F>
Type Parameters:
F - the field type
All Implemented Interfaces:
org.eclipse.jface.viewers.ISelectionProvider
Direct Known Subclasses:
PropertyEntitySelector, TypeEntitySelector

public abstract class EntitySelector<F extends AbstractParameter>
extends AbstractSelector<EntityDefinition>

Entity selector

Author:
Simon Templer

Constructor Summary
EntitySelector(SchemaSpaceID ssid, F field, org.eclipse.swt.widgets.Composite parent, org.eclipse.jface.viewers.ViewerFilter[] filters)
          Create an entity selector.
 
Method Summary
protected abstract  Entity createEntity(EntityDefinition element)
          Create an entity for the given entity definition
protected abstract  EntityDialog createEntityDialog(org.eclipse.swt.widgets.Shell parentShell, SchemaSpaceID ssid, F field)
          Create the dialog for selecting an entity.
protected  AbstractViewerSelectionDialog<EntityDefinition,?> createSelectionDialog(org.eclipse.swt.widgets.Shell parentShell)
          Create the dialog for selecting an entity.
 Entity getEntity()
          Get the selected entity
 F getField()
          Get the field definition associated with the selector.
 
Methods inherited from class eu.esdihumboldt.hale.ui.util.selector.AbstractSelector
accepts, addSelectionChangedListener, fireSelectionChange, getControl, getSelectedObject, getSelection, removeSelectionChangedListener, setSelection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntitySelector

public EntitySelector(SchemaSpaceID ssid,
                      F field,
                      org.eclipse.swt.widgets.Composite parent,
                      org.eclipse.jface.viewers.ViewerFilter[] filters)
Create an entity selector.

Parameters:
ssid - the schema space
field - the field definition, may be null
parent - the parent composite
filters - the viewer filters
Method Detail

getField

public F getField()
Get the field definition associated with the selector.

Returns:
the field definition

createSelectionDialog

protected AbstractViewerSelectionDialog<EntityDefinition,?> createSelectionDialog(org.eclipse.swt.widgets.Shell parentShell)
Description copied from class: AbstractSelector
Create the dialog for selecting an entity.

Specified by:
createSelectionDialog in class AbstractSelector<EntityDefinition>
Parameters:
parentShell - the parent shell for the dialog
Returns:
the entity dialog
See Also:
AbstractSelector.createSelectionDialog(Shell)

createEntityDialog

protected abstract EntityDialog createEntityDialog(org.eclipse.swt.widgets.Shell parentShell,
                                                   SchemaSpaceID ssid,
                                                   F field)
Create the dialog for selecting an entity.

Parameters:
parentShell - the parent shell for the dialog
ssid - the schema space
field - the field definition
Returns:
the entity dialog

getEntity

public Entity getEntity()
Get the selected entity

Returns:
the selected entity or null

createEntity

protected abstract Entity createEntity(EntityDefinition element)
Create an entity for the given entity definition

Parameters:
element - the entity definition
Returns:
the entity

Humboldt Alignment Editor 2.5.0

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