|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.visualize.data.AbstractDataViewFactory
An abstract data view factory for non-nested whole models. The factory is stateful in that it manages a single current whole view, which must be disposed before a new one can be created. This implementation is independent of data presentation and graphics technology type. TODO: Should replace DataViewFactory interface with this class since clients can't implement the interface since the client can't add part views to a whole view.
Constructor Summary | |
protected |
AbstractDataViewFactory()
Used by concrete factories to create an instance, which is typically a singleton. |
Method Summary | |
protected java.util.Collection |
addPartViews(java.util.Collection partModels,
java.util.Collection retVal)
Called by subclasses to add new part views corresponding to a group of part models to an existing whole view. |
protected void |
createdPartView(PartView partView)
Called by the system after creating a new part view but before adding it to its whole. |
protected void |
createdWholeView()
Called by the system after creating a new whole view, with a graphic view, but no part views. |
void |
disposeWholeView(WholeView wholeView)
Default implementation: Breaks connections to the whole model for part model updates, then disposes the current whole view and nulls it. |
protected PartModelField.EventIn |
getAddedPartModelIn()
Receives the part model after it is added to the current whole view's whole model. |
protected PartModelField.EventIn |
getRemovingPartModelIn()
Receives the part model before it is removed from the current whole view's whole model. |
WholeView |
getWholeView()
Gets the current whole view managed by this factory. |
protected PartView |
newPartView(PartModel partModel)
Called by the system to create a new part view for a part model, and to add the view to a whole view. |
protected GraphicView |
newPartViewGraphic(PartView partView)
Called by the system to create (but not set) a new part graphic for a part model. |
WholeView |
newWholeView(WholeModel wholeModel)
Default implementation: Creates a new whole view, using newWholeViewGraphic() for the graphic, saves it as the current whole view, makes connections to the whole model for part model updates, then calls createdWholeView(). |
protected GraphicView |
newWholeViewGraphic()
Called by the system or subclasses to create (but not set) a new whole graphic for the current whole view and its model. |
protected void |
removePartViews(java.util.Collection partModels)
Called by subclasses to remove a group of part views corresponding to a group of part models in an existing whole view. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AbstractDataViewFactory()
Method Detail |
public final WholeView getWholeView()
protected GraphicView newWholeViewGraphic()
protected void createdWholeView()
protected PartView newPartView(PartModel partModel)
partModel
- The part model. Never null.
protected GraphicView newPartViewGraphic(PartView partView)
partView
- The part view. Never null.
protected void createdPartView(PartView partView)
partView
- The part view. Never null.protected java.util.Collection addPartViews(java.util.Collection partModels, java.util.Collection retVal)
partModels
- The part model group (PartModel). Never null.retVal
- Return value object. The added part views (PartView)
in iterator order. Null if none.
protected void removePartViews(java.util.Collection partModels)
partModels
- The part model group (PartModel). Never null.protected PartModelField.EventIn getAddedPartModelIn()
protected PartModelField.EventIn getRemovingPartModelIn()
public WholeView newWholeView(WholeModel wholeModel)
newWholeView
in interface DataViewFactory
wholeModel
- The whole model. Never null.
public void disposeWholeView(WholeView wholeView)
disposeWholeView
in interface DataViewFactory
wholeView
- The whole view. Never null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |