samples.preview_new_graphdraw.iter
Class LocalGraphDraw

java.lang.Object
  extended by samples.preview_new_graphdraw.iter.LocalGraphDraw

public class LocalGraphDraw
extends Object

This is the major class for starting an animated layout runner. Inputs:

Author:
danyelf

Field Summary
protected  GraphLayoutPanel jgp
           
protected  IterableLayout layout
           
protected  LayoutIterator li
           
protected  TransformerPipeline pipeline
           
protected  boolean staticAnimation
           
 
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.
 
Method Summary
 void addToPipeline(LayoutTransformer lt)
           
 LayoutIterator getIterator()
           
 IterableLayout getLayoutSource()
          Returns the iterable layout at the core.
 GraphLayoutPanel getPanel()
           
 void start()
           
 void stop()
           
 void updateGraphTo(Graph g)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jgp

protected GraphLayoutPanel jgp

layout

protected IterableLayout layout

li

protected LayoutIterator li

pipeline

protected TransformerPipeline pipeline

staticAnimation

protected boolean staticAnimation
Constructor Detail

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 visualization
startup - The startup (static) layout that places the notes
layout - The iterable layout that moves the nodes
vr - The vertex renderer that draws the nodes
er - The edge renderer that draws edges
d - The size to which the panel should be drawn
prerelax - 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 visualization
startup - The startup (static) layout that places the notes
vr - The vertex renderer that draws the nodes
er - The edge renderer that draws edges
d - The size to which the panel should be drawn
prerelax - 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.
Method Detail

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 -