anl.aida.viz3d
Class DocOpsCanvasListener

java.lang.Object
  extended by anl.aida.viz3d.DocOpsCanvasListener
All Implemented Interfaces:
CanvasListener

public class DocOpsCanvasListener
extends java.lang.Object
implements CanvasListener

CanvasListener that mediates the interaction between a Canvas3D and a DocOpsWidget.


Field Summary
private  DocOpsWidget docOps
           
 
Constructor Summary
DocOpsCanvasListener(DocOpsWidget docOps)
           
 
Method Summary
 void init(javax.media.opengl.GLAutoDrawable drawable, VNode root)
          Called when the the canvas initializes itself in its GLEventListener.init.
 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

docOps

private DocOpsWidget docOps
Constructor Detail

DocOpsCanvasListener

public DocOpsCanvasListener(DocOpsWidget docOps)
Method Detail

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.

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.

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.

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

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