samples.preview_new_graphdraw.iter
Class LocalGraphDraw
java.lang.Object
samples.preview_new_graphdraw.iter.LocalGraphDraw
public class LocalGraphDraw
- extends Object
This is the major class for starting an animated layout runner. Inputs:
A graph to be laid out An algorithm for the starting configuration
of the graph An algorithm for iterating on that
- Author:
- danyelf
Constructor Summary |
LocalGraphDraw(Graph g,
StaticLayout startup,
IterableLayout layout,
VertexRenderer vr,
EdgeRenderer er,
Dimension d,
boolean prerelax)
A verbose constructor creates a LocalGraphDraw object, and a panel to
show. |
LocalGraphDraw(Graph g,
StaticLayout startup,
VertexRenderer vr,
EdgeRenderer er,
Dimension d)
A LocalGraphDraw that won't be animated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jgp
protected GraphLayoutPanel jgp
layout
protected IterableLayout layout
li
protected LayoutIterator li
pipeline
protected TransformerPipeline pipeline
staticAnimation
protected boolean staticAnimation
LocalGraphDraw
public LocalGraphDraw(Graph g,
StaticLayout startup,
IterableLayout layout,
VertexRenderer vr,
EdgeRenderer er,
Dimension d,
boolean prerelax)
- A verbose constructor creates a LocalGraphDraw object, and a panel to
show.
- Parameters:
g
- A graph to visualizationstartup
- The startup (static) layout that places the noteslayout
- The iterable layout that moves the nodesvr
- The vertex renderer that draws the nodeser
- The edge renderer that draws edgesd
- The size to which the panel should be drawnprerelax
- Should the graph be iterated for a few milliseconds before
the program starts? By default, this will freeze for half a
second. Turn off to start with a messier view but a faster
startup.
LocalGraphDraw
public LocalGraphDraw(Graph g,
StaticLayout startup,
VertexRenderer vr,
EdgeRenderer er,
Dimension d)
- A LocalGraphDraw that won't be animated. As such, it doesn't
need an IterableLayout as a startup parameter. (It implements a
"static" layout by actually animating very, very slowly--and
running the animation through the UnmovingIterableLayout, which
actually does nothing.
- Parameters:
g
- A graph to visualizationstartup
- The startup (static) layout that places the notesvr
- The vertex renderer that draws the nodeser
- The edge renderer that draws edgesd
- The size to which the panel should be drawnprerelax
- Should the graph be iterated for a few milliseconds before
the program starts? By default, this will freeze for half a
second. Turn off to start with a messier view but a faster
startup.
addToPipeline
public void addToPipeline(LayoutTransformer lt)
getPanel
public GraphLayoutPanel getPanel()
start
public void start()
stop
public void stop()
getIterator
public LayoutIterator getIterator()
- Returns:
- layout iterator
getLayoutSource
public IterableLayout getLayoutSource()
- Returns the iterable layout at the core.
USED ONLY BY MOUSE MOVE STUFF
- Returns:
- iterable layout
updateGraphTo
public void updateGraphTo(Graph g)
- Parameters:
g
-