visad.bom
Class BarbManipulationRendererJ2D

java.lang.Object
  extended by visad.DataRenderer
      extended by visad.java2d.RendererJ2D
          extended by visad.java2d.DirectManipulationRendererJ2D
              extended by visad.bom.BarbManipulationRendererJ2D
All Implemented Interfaces:
java.lang.Cloneable, BarbRenderer

public class BarbManipulationRendererJ2D
extends DirectManipulationRendererJ2D
implements BarbRenderer

BarbManipulationRendererJ2D is the VisAD class for direct manipulation rendering of wind barbs under Java2D


Field Summary
 
Fields inherited from class visad.DataRenderer
enabled, pickCrawlToCursor
 
Constructor Summary
BarbManipulationRendererJ2D()
          this DataRenderer supports direct manipulation for Tuple representations of wind barbs; two of the Tuple's Real components must be mapped to Flow1X and Flow1Y, or Flow2X and Flow2Y
 
Method Summary
 void addPoint(float[] x)
           
 float checkClose(double[] origin, double[] direction)
          find minimum distance from ray to barb tail
 void checkDirect()
          set isDirectManipulation = true if this DataRenderer supports direct manipulation for its linked Data
 java.lang.Object clone()
           
 void drag_direct(VisADRay ray, boolean first, int mouseModifiers)
           
 boolean getKnotsConvert()
           
 java.lang.String getWhyNotDirect()
           
static void main(java.lang.String[] args)
          test BarbManipulationRendererJ2D
 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 makeShadowTupleType(TupleType type, DataDisplayLink link, ShadowType parent)
          factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowTupleType
 float[] makeVector(boolean south, float x, float y, float z, float scale, float pt_size, float f0, float f1, float[] vx, float[] vy, float[] vz, int[] numv, float[] tx, float[] ty, float[] tz, int[] numt)
          dummy for BarbRenderer
 void release_direct()
          mouse button released, ending direct manipulation
 void setKnotsConvert(boolean enable)
           
 void setSpatialValues(float[][] spatial_values)
          set spatialValues from ShadowType.doTransform
 void setVectorSpatialValues(float[] mbarb, int which)
           
 void stop_direct()
          discontinue dragging this DataRenderer; this method is not a general disable
 
Methods inherited from class visad.java2d.DirectManipulationRendererJ2D
doTransform, getExtraBranch, isLegalTextureMap, setLinks
 
Methods inherited from class visad.java2d.RendererJ2D
clearBranch, clearScene, doAction, makeShadowTextType, toggle
 
Methods inherited from class visad.DataRenderer
addException, checkAction, clearAVControls, clearExceptions, computeRanges, 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, isTransformControl, prepareAction, realCheckDirect, removeLink, set_all_feasible, setDisplay, setDisplayRenderer, setEarthSpatialData, setEarthSpatialDisplay, setIsDirectManipulation, setLastMouseModifiers, setLatLonIndices, setLinks, setPickCrawlToCursor, spatialToEarth, spatialToEarth, suppressExceptions
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BarbManipulationRendererJ2D

public BarbManipulationRendererJ2D()
this DataRenderer supports direct manipulation for Tuple representations of wind barbs; two of the Tuple's Real components must be mapped to Flow1X and Flow1Y, or Flow2X and Flow2Y

Method Detail

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

Overrides:
makeShadowFunctionType in class RendererJ2D
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

Overrides:
makeShadowRealTupleType in class RendererJ2D
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

Overrides:
makeShadowRealType in class RendererJ2D
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

Overrides:
makeShadowSetType in class RendererJ2D
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

Overrides:
makeShadowTupleType in class RendererJ2D
Throws:
VisADException
java.rmi.RemoteException

makeVector

public float[] makeVector(boolean south,
                          float x,
                          float y,
                          float z,
                          float scale,
                          float pt_size,
                          float f0,
                          float f1,
                          float[] vx,
                          float[] vy,
                          float[] vz,
                          int[] numv,
                          float[] tx,
                          float[] ty,
                          float[] tz,
                          int[] numt)
dummy for BarbRenderer

Specified by:
makeVector in interface BarbRenderer

setKnotsConvert

public void setKnotsConvert(boolean enable)
Specified by:
setKnotsConvert in interface BarbRenderer

getKnotsConvert

public boolean getKnotsConvert()
Specified by:
getKnotsConvert in interface BarbRenderer

getWhyNotDirect

public java.lang.String getWhyNotDirect()
Overrides:
getWhyNotDirect in class DataRenderer

checkDirect

public void checkDirect()
                 throws VisADException,
                        java.rmi.RemoteException
Description copied from class: DataRenderer
set isDirectManipulation = true if this DataRenderer supports direct manipulation for its linked Data

Overrides:
checkDirect in class DirectManipulationRendererJ2D
Throws:
VisADException
java.rmi.RemoteException

addPoint

public void addPoint(float[] x)
              throws VisADException
Overrides:
addPoint in class DirectManipulationRendererJ2D
Throws:
VisADException

setVectorSpatialValues

public void setVectorSpatialValues(float[] mbarb,
                                   int which)

setSpatialValues

public void setSpatialValues(float[][] spatial_values)
set spatialValues from ShadowType.doTransform

Overrides:
setSpatialValues in class DataRenderer

checkClose

public float checkClose(double[] origin,
                        double[] direction)
find minimum distance from ray to barb tail

Overrides:
checkClose in class DataRenderer

release_direct

public void release_direct()
mouse button released, ending direct manipulation

Overrides:
release_direct in class DataRenderer

stop_direct

public void stop_direct()
Description copied from class: DataRenderer
discontinue dragging this DataRenderer; this method is not a general disable

Overrides:
stop_direct in class DataRenderer

drag_direct

public void drag_direct(VisADRay ray,
                        boolean first,
                        int mouseModifiers)
Overrides:
drag_direct in class DataRenderer

clone

public java.lang.Object clone()
Overrides:
clone in class DirectManipulationRendererJ2D

main

public static void main(java.lang.String[] args)
                 throws VisADException,
                        java.rmi.RemoteException
test BarbManipulationRendererJ2D

Throws:
VisADException
java.rmi.RemoteException