|
|||||||||||
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.SwingListViewFactory
A data view factory for a list data presentation implemented using Swing native graphics. In a list view, list entries correspond to vertex models, with the order specified by the edge models, in a GraphModel. The initial list if formed by starting with the first source vertex in the whole view's graph model, followed by the vertex at the head end of the first edge of each subsequent vertex, ending when a loop or a sink node is found. All other part models in the whole model are ignored. The whole and part view graphic views will be registered automatically as spatial targets of the factory Swing sensors.
Constructor Summary | |
SwingListViewFactory(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: If an edge model, and the tail end vertex is the list tail, appends its head end vertex and forward sublist to the list, otherwise ignores it; if a vertex model, and the native model root is null, sets it as the head node, otherwise ignores it (and waits for an edge). |
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, then adds the sublist of the first source vertex in the whole model as the view list. |
void |
disposeWholeView(WholeView wholeView)
Default implementation: Clears the graphic model, then calls the super method. |
protected GraphicView |
newPartViewGraphic(PartView view)
Default implementation: If view is of a VertexModel, returns a SwingListEntry shape; otherwise, returns a NullGraphicView. |
WholeView |
newWholeView(WholeModel wholeModel)
Default implementation: Throws an exception if the whole model is not a GraphModel, then calls the super method. |
protected GraphicView |
newWholeViewGraphic()
Default implementation: If view is of a WholeModel, returns a SwingListView; otherwise, throws an exception. |
protected void |
removePartViews(java.util.Collection partModels)
Default implementation: For each part model, in iterator order: If an edge model, removes its head end vertex and forward sublist; if a vertex model, removes it and its forward sublist. |
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 SwingListViewFactory(MouseSensor mouse, KeyboardSensor keyboard)
mouse
- Reference to the mouse sensor. Null if none.keyboard
- Reference to the keyboard sensor. Null if none.Method Detail |
protected 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 |