visad.bom.annotations
Class ScreenAnnotator

java.lang.Object
  extended by visad.bom.annotations.ScreenAnnotator
Direct Known Subclasses:
ScreenAnnotatorJ3D

public abstract class ScreenAnnotator
extends Object

Take descriptions of geometry primatives in Screen Coordinates and draw them onto a VisAD display directly. The objects should then stay on the same screen position. Enables thing like scale bars, tables, logos, etc to be independent of data manipulation tranformations.


Field Summary
protected  ArrayList things
           
 
Constructor Summary
ScreenAnnotator()
          Default constructor.
 
Method Summary
 void add(Object object)
          Add the object to the list of items to be drawn.
 void clear()
          Remove all items from the list of things to draw.
abstract  void draw()
          Traverses all the data objects in the list and transforms them into viewable objects and then arranges to make them visible.
abstract  void makeVisible(boolean on)
          Set the visibility flag.
 void remove(Object object)
          Remove the object from the list of items to be drawn.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

things

protected ArrayList things
Constructor Detail

ScreenAnnotator

public ScreenAnnotator()
Default constructor.

Method Detail

makeVisible

public abstract void makeVisible(boolean on)
Set the visibility flag.

Parameters:
on - true to display, false to undisplay.

draw

public abstract void draw()
                   throws VisADException
Traverses all the data objects in the list and transforms them into viewable objects and then arranges to make them visible.

Throws:
VisADException - if if any problem creating the picture.

add

public void add(Object object)
Add the object to the list of items to be drawn.

Parameters:
object - add this item to the list of things to draw.

remove

public void remove(Object object)
Remove the object from the list of items to be drawn.

Parameters:
object - remove this item from the list of things to draw.

clear

public void clear()
Remove all items from the list of things to draw. to draw.