com.inline.feature.ui
Class AbstractDisplayable

java.lang.Object
  |
  +--com.inline.feature.ui.AbstractDisplayable
Direct Known Subclasses:
AbstractFeatureAction, AbstractFeatureConstructor

public abstract class AbstractDisplayable
extends java.lang.Object
implements Displayable

Basic implementation of the Displayable interface that can be used for elements of a FeatureModel. It delegates the lookup of DisplayPropertyFactory to the FeatureModel.


Field Summary
protected  DisplayProperties displayProperties
           
protected  FeatureModel featureModel
           
 
Constructor Summary
AbstractDisplayable(FeatureModel featureModel)
           
 
Method Summary
 DisplayProperties getDisplayProperties()
          DisplayProperties are used by the UI to configure how this displayable object is displayed.
abstract  java.lang.String getDisplayType()
          Displayable objects are bound to their display properties using an abstract identifier called display type.
 FeatureModel getFeatureModel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

featureModel

protected FeatureModel featureModel

displayProperties

protected DisplayProperties displayProperties
Constructor Detail

AbstractDisplayable

public AbstractDisplayable(FeatureModel featureModel)
Method Detail

getFeatureModel

public FeatureModel getFeatureModel()

getDisplayType

public abstract java.lang.String getDisplayType()
Description copied from interface: Displayable
Displayable objects are bound to their display properties using an abstract identifier called display type. Ask a displayable object for its display type, then go find a DisplayPropertyFactory that accepts that display type. That is the sole purpose of display type.
Specified by:
getDisplayType in interface Displayable

getDisplayProperties

public DisplayProperties getDisplayProperties()
DisplayProperties are used by the UI to configure how this displayable object is displayed.

AbstractDisplayable's implementation calls getDisplayProperties(this) on the feature model, thus making the displayable loosely bound to its display properties. The idea is to allow alternative sets of display properties for the same object. The choice between those alternatives is made by feature model and ultimately by DisplayPropertyFactories based the displayable instance and on properties of the model.

Specified by:
getDisplayProperties in interface Displayable
Tags copied from interface: Displayable
See Also:
DisplayPropertyFactory, FeatureModel.getDisplayProperties(Displayable)