Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.function.generic.pages.internal
Class Field<F extends AbstractParameter,S extends EntitySelector<F>>

java.lang.Object
  extended by java.util.Observable
      extended by eu.esdihumboldt.hale.ui.function.generic.pages.internal.Field<F,S>
Type Parameters:
S - the entity selector type
F - the field type
Direct Known Subclasses:
PropertyField, TypeField

public abstract class Field<F extends AbstractParameter,S extends EntitySelector<F>>
extends Observable

Represents named entities in a function

Author:
Simon Templer

Constructor Summary
Field(F definition, SchemaSpaceID ssid, org.eclipse.swt.widgets.Composite parent, Set<EntityDefinition> candidates, Cell initialCell)
          Create a field
 
Method Summary
protected  void addSelector(S selector)
          Add a selector
protected abstract  S createEntitySelector(SchemaSpaceID ssid, F field, org.eclipse.swt.widgets.Composite parent)
          Create an entity selector
 void fillEntities(com.google.common.collect.ListMultimap<String,Entity> target)
          Fill the given map with the field's entities
 SchemaSpaceID getSchemaSpace()
          Get the schema space
protected  List<S> getSelectors()
          Get the selectors associated with the field
 boolean isValid()
          Determines if the field is valid in its current configuration
protected  void removeSelector(S selector)
          Remove a selector
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Field

public Field(F definition,
             SchemaSpaceID ssid,
             org.eclipse.swt.widgets.Composite parent,
             Set<EntityDefinition> candidates,
             Cell initialCell)
Create a field

Parameters:
definition - the field definition
ssid - the schema space
parent - the parent composite
candidates - the entity candidates
initialCell - the initial cell
Method Detail

createEntitySelector

protected abstract S createEntitySelector(SchemaSpaceID ssid,
                                          F field,
                                          org.eclipse.swt.widgets.Composite parent)
Create an entity selector

Parameters:
ssid - the schema space
field - the field definition
parent - the parent composite
Returns:
the entity selector

getSelectors

protected List<S> getSelectors()
Get the selectors associated with the field

Returns:
the selectors

addSelector

protected void addSelector(S selector)
Add a selector

Parameters:
selector - the entity selector to add

removeSelector

protected void removeSelector(S selector)
Remove a selector

Parameters:
selector - the entity selector to remove

getSchemaSpace

public SchemaSpaceID getSchemaSpace()
Get the schema space

Returns:
the schema space

isValid

public boolean isValid()
Determines if the field is valid in its current configuration

Returns:
if the field is valid

fillEntities

public void fillEntities(com.google.common.collect.ListMultimap<String,Entity> target)
Fill the given map with the field's entities

Parameters:
target - the map to add the entities to

Humboldt Alignment Editor 2.5.0

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