|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsamples.preview_new_graphdraw.iter.IterableLayout
samples.preview_new_graphdraw.iter.UpdatableIterableLayout
public abstract class UpdatableIterableLayout
Field Summary |
---|
Fields inherited from class samples.preview_new_graphdraw.iter.IterableLayout |
---|
currentLayout, returnableLayout |
Constructor Summary | |
---|---|
UpdatableIterableLayout()
|
Method Summary | |
---|---|
protected VisEdge |
addVisEdge(Edge e)
Creates and returns a default VisEdge based on e . |
protected VisVertex |
addVisVertex(Vertex v)
Creates and returns a default VisVertex based on v . |
protected void |
cleanupReferences(Graph g)
This OPTIONAL OPTIMIZATION allows the java garbage collector to work. |
static Pair |
getSymmetricDifference(Set set1,
Set set2)
Returns a pair consisting of two collections: set1 - set2, and set2-set1. |
protected void |
removeEdge(Edge e)
Removes e from the layout. |
protected void |
removeVertex(Vertex v)
Removes v from the layout. |
protected void |
updateGraph(Pair oldAndNewVertices,
Pair oldAndNewEdges)
This DEFAULT IMPLEMENTATION immediately removes all OLD items, and immediate creates new items for the NEW. |
void |
updateGraphToMatch(Graph g)
Updates the stored set of of vertices and edges to match the input graph. |
Methods inherited from class samples.preview_new_graphdraw.iter.IterableLayout |
---|
advance, calculate, emit, getScreenSize, getVisEdge, getVisVertex, initializeLocationsFromLayout, isFinite, iterationsAreDone |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UpdatableIterableLayout()
Method Detail |
---|
public void updateGraphToMatch(Graph g)
g
- protected void cleanupReferences(Graph g)
protected void updateGraph(Pair oldAndNewVertices, Pair oldAndNewEdges)
oldAndNewVertices
- oldAndNewVertices
- protected void removeVertex(Vertex v)
v
from the layout. Override to
do something different. (For example, if you want
vertices to resurface later where they currently
are, then override this method to do nothing.)
protected void removeEdge(Edge e)
e
from the layout. Override to
do something different. (For example, if you want
edges to resurface later where they currently
are, then override this method to do nothing.)
protected VisEdge addVisEdge(Edge e)
e
.
Note that if you have overridden removeEdge, then an
entry MAY ALREADY EXIST! (This version does not check)
// TODO THIS VERSION SHOUDL CHECK
e
-
protected VisVertex addVisVertex(Vertex v)
v
.
Default implementation places the new vertex at a RANDOM location.
Override to place someplace more sensible.
Note that if you have overridden removeEdge, then an
entry MAY ALREADY EXIST! (This version does not check)
// TODO THIS VERSION SHOUDL CHECK
public static Pair getSymmetricDifference(Set set1, Set set2)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |