com.inline.feature.ui
Interface Displayable
- All Known Subinterfaces:
- Feature, FeatureAction, FeatureConstructor
- All Known Implementing Classes:
- AbstractDisplayable
- public interface Displayable
Displayable objects are designed to play the role of model in
the MV (model-view) or controller in the MVC (model-view-controller) pattern.
The role of view is played in both cases by the classes implementing
the DisplayProperties interface.
The binding between a Displayable and the DisplayProperties is dynamic.
The information binding a Displayable to its DisplayProperties is
a logical name called display type. To find its DisplayProperties,
a Displayable object involves external DisplayPropertyFactories.
It looks up a factory that can provide DisplayProperties for the required display
type and invokes that factory to produce the DisplayProperty object.
getDisplayType
public java.lang.String getDisplayType()
- 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.
getDisplayProperties
public DisplayProperties getDisplayProperties()
- Returns display properties for this displayable object. This method should
lookup a DisplayPropertyFactory that supports this object's display type and
request a DisplayProperty object from that factory. For example, AbstractFeature,
AbstractFeatureAction, AbstractFeatureConstructor, etc all delegate the factory
lookup to their FeatureModel.
- See Also:
DisplayPropertyFactory
,
FeatureModel.getDisplayProperties(Displayable)