anl.aida.plot
Class TSGraphPlotCanvasListener

java.lang.Object
  extended by anl.aida.plot.TSGraphPlotCanvasListener
All Implemented Interfaces:
CanvasListener

public class TSGraphPlotCanvasListener
extends java.lang.Object
implements CanvasListener


Nested Class Summary
private static class TSGraphPlotCanvasListener.ItemFormatter
           
 
Field Summary
private  NetworkPlotCreator creator
           
private  javax.media.opengl.GLAutoDrawable drawable
           
private  edu.uci.ics.jung.graph.Graph<ValueNode,java.lang.Object> firstGraph
           
private  anl.aida.data.DataFrame frame
           
private  boolean initialized
           
private  java.util.Map<java.lang.Integer,StackItem2> itemMap
           
private  StackRenderer2 stack
           
private  int timestep
           
 
Constructor Summary
TSGraphPlotCanvasListener(anl.aida.data.DataFrame frame, edu.uci.ics.jung.graph.Graph<ValueNode,java.lang.Object> graph, int timestep)
           
 
Method Summary
 void addGraph(edu.uci.ics.jung.graph.Graph<ValueNode,java.lang.Object> graph, int timestep)
           
private  float calculateAvg()
           
 void init(javax.media.opengl.GLAutoDrawable drawable, VNode root)
          Called when the the canvas initializes itself in its GLEventListener.init.
 TimeStepWidget initToolBar(javax.swing.JToolBar bar)
           
 void itemSelected(java.lang.Object obj)
          Called when an item has been selected in the canvas.
 void reshape(javax.media.opengl.GLAutoDrawable drawable, float width, float height, VNode root)
          Called when canvas reshapes in its GLEventListener.reshape
 void selectionsCleared()
          Called when all the selected items in a canvas are unselected.
 void vSpatialMoved(VSpatial spatial, javax.vecmath.Point3f localTrans)
          Called when a VSpatial has been moved using the mouse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stack

private StackRenderer2 stack

firstGraph

private edu.uci.ics.jung.graph.Graph<ValueNode,java.lang.Object> firstGraph

timestep

private int timestep

creator

private NetworkPlotCreator creator

drawable

private javax.media.opengl.GLAutoDrawable drawable

itemMap

private java.util.Map<java.lang.Integer,StackItem2> itemMap

frame

private anl.aida.data.DataFrame frame

initialized

private boolean initialized
Constructor Detail

TSGraphPlotCanvasListener

public TSGraphPlotCanvasListener(anl.aida.data.DataFrame frame,
                                 edu.uci.ics.jung.graph.Graph<ValueNode,java.lang.Object> graph,
                                 int timestep)
Parameters:
graphs -
Method Detail

calculateAvg

private float calculateAvg()

initToolBar

public TimeStepWidget initToolBar(javax.swing.JToolBar bar)

addGraph

public void addGraph(edu.uci.ics.jung.graph.Graph<ValueNode,java.lang.Object> graph,
                     int timestep)

vSpatialMoved

public void vSpatialMoved(VSpatial spatial,
                          javax.vecmath.Point3f localTrans)
Description copied from interface: CanvasListener
Called when a VSpatial has been moved using the mouse.

Specified by:
vSpatialMoved in interface CanvasListener
Parameters:
spatial - the spatial that has been moved
localTrans - the new local translation of the spatial

init

public void init(javax.media.opengl.GLAutoDrawable drawable,
                 VNode root)
Description copied from interface: CanvasListener
Called when the the canvas initializes itself in its GLEventListener.init.

Specified by:
init in interface CanvasListener
Parameters:
drawable - the canvas drawable
root - the root node of the canvas to which other scene elements can be added.

reshape

public void reshape(javax.media.opengl.GLAutoDrawable drawable,
                    float width,
                    float height,
                    VNode root)
Description copied from interface: CanvasListener
Called when canvas reshapes in its GLEventListener.reshape

Specified by:
reshape in interface CanvasListener
Parameters:
drawable - drawable the canvas drawable
width - the width at z = 0 in world coordinates
height - the height at z = in world coordinates
root - the root node of the canvas to which other scene elements can be added.

itemSelected

public void itemSelected(java.lang.Object obj)
Description copied from interface: CanvasListener
Called when an item has been selected in the canvas.

Specified by:
itemSelected in interface CanvasListener
Parameters:
obj - the selected item.

selectionsCleared

public void selectionsCleared()
Description copied from interface: CanvasListener
Called when all the selected items in a canvas are unselected.

Specified by:
selectionsCleared in interface CanvasListener