|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.visualize.data.AbstractDataViewFactory | +--gumbo.visualize.data.impl.swing.SwingGraphViewFactory
A data view factory for a graph data presentation implemented using Swing native graphics. In a graph view, graph vertices and edges correspond to vertex and edge models, with the order specified by the edge models, in a GraphModel. The initial graph if formed by adding all vertex and edge models. The default implementation ignores non-vertex port models. The whole and part view graphic views will be registered automatically as spatial targets of the factory Swing sensors.
Constructor Summary | |
SwingGraphViewFactory(MouseSensor mouse,
KeyboardSensor keyboard)
Creates and instance. |
Method Summary | |
protected java.util.Collection |
addPartViews(java.util.Collection partModels,
java.util.Collection retVal)
Default implementation: For each part model, in iterator order: Calls the super method to create and add the part views, then calls prepare and realize on the whole graphic view to update the view presentation. |
protected void |
createdPartView(PartView view)
Default implementation: calls the super method, then adds the part view's graphic view as a sensor target. |
protected void |
createdWholeView()
Default implementation: Adds the whole view's graphic view as a sensor target, calls addPartViews() with all the whole model's part models, then calls newWholeLayoutEngine() to lay out the whole view. |
void |
disposeWholeView(WholeView wholeView)
Default implementation: Sets the layout engine null, then calls the super method. |
WholeLayoutEngine |
getWholeLayoutEngine()
Gets the layout engine for the current whole view. |
protected GraphicView |
newPartViewGraphic(PartView view)
Default implementation: If view is of a VertexModel returns a SwingGraphVertex, if an EdgeShape returns a SwingGraphEdge; otherwise, returns a NullGraphicView. |
protected WholeLayoutEngine |
newWholeLayoutEngine()
Called by the system when a new whole view layout engine is needed. |
WholeView |
newWholeView(WholeModel wholeModel)
Default implementation: Throws an exception if the whole model is not a GraphModel, then calls the super method. |
GraphicView |
newWholeViewGraphic()
Default implementation: If view is of a WholeModel, returns a SwingGraphView; otherwise, throws an exception. |
protected void |
removePartViews(java.util.Collection partModels)
Default implementation: For each part model, in iterator order: Calls the super method to remove and dispose the part views, then calls prepare and realize on the whole graphic view to update the view presentation. |
Methods inherited from class gumbo.visualize.data.AbstractDataViewFactory |
getAddedPartModelIn, getRemovingPartModelIn, getWholeView, newPartView |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SwingGraphViewFactory(MouseSensor mouse, KeyboardSensor keyboard)
mouse
- Reference to the mouse sensor. Null if none.keyboard
- Reference to the keyboard sensor. Null if none.Method Detail |
public WholeLayoutEngine getWholeLayoutEngine()
protected WholeLayoutEngine newWholeLayoutEngine()
public GraphicView newWholeViewGraphic()
newWholeViewGraphic
in class AbstractDataViewFactory
protected void createdWholeView()
createdWholeView
in class AbstractDataViewFactory
protected GraphicView newPartViewGraphic(PartView view)
newPartViewGraphic
in class AbstractDataViewFactory
view
- The part view. Never null.
protected void createdPartView(PartView view)
createdPartView
in class AbstractDataViewFactory
view
- The part view. Never null.protected java.util.Collection addPartViews(java.util.Collection partModels, java.util.Collection retVal)
addPartViews
in class AbstractDataViewFactory
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)
removePartViews
in class AbstractDataViewFactory
partModels
- The part model group (PartModel). Never null.public WholeView newWholeView(WholeModel wholeModel)
newWholeView
in interface DataViewFactory
newWholeView
in class AbstractDataViewFactory
wholeModel
- The whole model. Never null.
public void disposeWholeView(WholeView wholeView)
disposeWholeView
in interface DataViewFactory
disposeWholeView
in class AbstractDataViewFactory
wholeView
- The whole view. Never null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |