visad.java2d
Class RendererJ2D

java.lang.Object
  extended by visad.DataRenderer
      extended by visad.java2d.RendererJ2D
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
DefaultRendererJ2D, DirectManipulationRendererJ2D

public abstract class RendererJ2D
extends DataRenderer

RendererJ2D is the VisAD abstract super-class for graphics rendering algorithms under Java2D. These transform Data objects into 2-D depictions in a Display window.

RendererJ2D is not Serializable and should not be copied between JVMs.


Field Summary
 
Fields inherited from class visad.DataRenderer
enabled, pickCrawlToCursor
 
Constructor Summary
RendererJ2D()
           
 
Method Summary
 void clearBranch()
          clear scene graph component
 void clearScene()
          clear any display list created by the most recent doAction invocation
 boolean doAction()
          re-transform if needed; return false if not done
abstract  VisADGroup doTransform()
          create a VisADGroup scene graph for Data in links; this can put Behavior objects in the scene graph for DataRenderer classes that implement direct manipulation widgets; may reduce work by only changing scene graph for Data and Controls that have changed: 1.
 ShadowType makeShadowFunctionType(FunctionType type, DataDisplayLink link, ShadowType parent)
          factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowFunctionType; these factories are invoked by the buildShadowType methods of the MathType subclasses, which are invoked by DataDisplayLink.prepareData, which is invoked by DataRenderer.prepareAction
 ShadowType makeShadowRealTupleType(RealTupleType type, DataDisplayLink link, ShadowType parent)
          factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowRealTupleType
 ShadowType makeShadowRealType(RealType type, DataDisplayLink link, ShadowType parent)
          factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowRealType
 ShadowType makeShadowSetType(SetType type, DataDisplayLink link, ShadowType parent)
          factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowSetType
 ShadowType makeShadowTextType(TextType type, DataDisplayLink link, ShadowType parent)
          factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowTextType
 ShadowType makeShadowTupleType(TupleType type, DataDisplayLink link, ShadowType parent)
          factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowTupleType
 void setLinks(DataDisplayLink[] links, DisplayImpl d)
           
 void toggle(boolean on)
          Sets the visibility of the data being rendered by this instance.
 
Methods inherited from class visad.DataRenderer
addException, addPoint, checkAction, checkClose, checkDirect, clearAVControls, clearExceptions, clone, computeRanges, drag_direct, earthToSpatial, earthToSpatial, findRayManifoldIntersection, get_all_feasible, get_any_changed, get_any_transform_control, getBadScale, getDisplay, getDisplayCoordinateSystem, getDisplayRenderer, getEarthDimension, getEarthUnits, getEnabled, getExceptionVector, getIsDirectManipulation, getLastMouseModifiers, getLatLonIndices, getLatLonRange, getLink, getLinks, getPickCrawlToCursor, getRanges, getRealVectorTypes, getWhyNotDirect, isLegalTextureMap, isTransformControl, prepareAction, realCheckDirect, release_direct, removeLink, set_all_feasible, setDisplay, setDisplayRenderer, setEarthSpatialData, setEarthSpatialDisplay, setIsDirectManipulation, setLastMouseModifiers, setLatLonIndices, setLinks, setPickCrawlToCursor, setSpatialValues, spatialToEarth, spatialToEarth, stop_direct, suppressExceptions
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RendererJ2D

public RendererJ2D()
Method Detail

setLinks

public void setLinks(DataDisplayLink[] links,
                     DisplayImpl d)
              throws VisADException
Specified by:
setLinks in class DataRenderer
Throws:
VisADException

toggle

public void toggle(boolean on)
Description copied from class: DataRenderer
Sets the visibility of the data being rendered by this instance.

Overrides:
toggle in class DataRenderer
Parameters:
on - Whether or not to render the data.

makeShadowFunctionType

public ShadowType makeShadowFunctionType(FunctionType type,
                                         DataDisplayLink link,
                                         ShadowType parent)
                                  throws VisADException,
                                         java.rmi.RemoteException
Description copied from class: DataRenderer
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowFunctionType; these factories are invoked by the buildShadowType methods of the MathType subclasses, which are invoked by DataDisplayLink.prepareData, which is invoked by DataRenderer.prepareAction

Specified by:
makeShadowFunctionType in class DataRenderer
Throws:
VisADException
java.rmi.RemoteException

makeShadowRealTupleType

public ShadowType makeShadowRealTupleType(RealTupleType type,
                                          DataDisplayLink link,
                                          ShadowType parent)
                                   throws VisADException,
                                          java.rmi.RemoteException
Description copied from class: DataRenderer
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowRealTupleType

Specified by:
makeShadowRealTupleType in class DataRenderer
Throws:
VisADException
java.rmi.RemoteException

makeShadowRealType

public ShadowType makeShadowRealType(RealType type,
                                     DataDisplayLink link,
                                     ShadowType parent)
                              throws VisADException,
                                     java.rmi.RemoteException
Description copied from class: DataRenderer
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowRealType

Specified by:
makeShadowRealType in class DataRenderer
Throws:
VisADException
java.rmi.RemoteException

makeShadowSetType

public ShadowType makeShadowSetType(SetType type,
                                    DataDisplayLink link,
                                    ShadowType parent)
                             throws VisADException,
                                    java.rmi.RemoteException
Description copied from class: DataRenderer
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowSetType

Specified by:
makeShadowSetType in class DataRenderer
Throws:
VisADException
java.rmi.RemoteException

makeShadowTextType

public ShadowType makeShadowTextType(TextType type,
                                     DataDisplayLink link,
                                     ShadowType parent)
                              throws VisADException,
                                     java.rmi.RemoteException
Description copied from class: DataRenderer
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowTextType

Specified by:
makeShadowTextType in class DataRenderer
Throws:
VisADException
java.rmi.RemoteException

makeShadowTupleType

public ShadowType makeShadowTupleType(TupleType type,
                                      DataDisplayLink link,
                                      ShadowType parent)
                               throws VisADException,
                                      java.rmi.RemoteException
Description copied from class: DataRenderer
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowTupleType

Specified by:
makeShadowTupleType in class DataRenderer
Throws:
VisADException
java.rmi.RemoteException

doAction

public boolean doAction()
                 throws VisADException,
                        java.rmi.RemoteException
re-transform if needed; return false if not done

Specified by:
doAction in class DataRenderer
Throws:
VisADException
java.rmi.RemoteException

clearBranch

public void clearBranch()
Description copied from class: DataRenderer
clear scene graph component

Specified by:
clearBranch in class DataRenderer

clearScene

public void clearScene()
Description copied from class: DataRenderer
clear any display list created by the most recent doAction invocation

Specified by:
clearScene in class DataRenderer

doTransform

public abstract VisADGroup doTransform()
                                throws VisADException,
                                       java.rmi.RemoteException
create a VisADGroup scene graph for Data in links; this can put Behavior objects in the scene graph for DataRenderer classes that implement direct manipulation widgets; may reduce work by only changing scene graph for Data and Controls that have changed: 1. use boolean[] changed to determine which Data objects have changed 2. if Data has not changed, then use Control.checkTicks loop like in prepareAction to determine which Control-s have changed

Throws:
VisADException
java.rmi.RemoteException