Package ucar.visad.display
Class XAxisScalarMap
java.lang.Object
ucar.visad.display.MapAdapter
ucar.visad.display.ScalarMapAdapter
ucar.visad.display.AxisScalarMap
ucar.visad.display.XAxisScalarMap
- All Implemented Interfaces:
Comparable
,Propertied
Provides support for adapting ScalarMap-s to
Display.XAxis
.
Instances of this class have the the JavaBean properties of the superclass.
- Version:
- $Revision: 1.9 $
- Author:
- Steven R. Emmerson
-
Field Summary
Fields inherited from class ucar.visad.display.ScalarMapAdapter
SCALAR_MAP, SCALAR_TYPE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected javax.vecmath.Vector3d
new3DTranslationVector
(double amount) Returns a new, 3-D, translation vector.protected void
scale
(double[] values, double amount) Scales an array of values by a given amountprotected void
scale
(double amount, AffineTransform transform) Scales the axis values.protected void
translate
(double amount, AffineTransform transform) Translates the axis values.Methods inherited from class ucar.visad.display.AxisScalarMap
flip, scale, setControl, translate
Methods inherited from class ucar.visad.display.ScalarMapAdapter
addScalarMapListener, compareTo, equals, getControl, getDisplayType, getScalarType, hashCode, removeScalarMapListener, scalarMapChange, setRange, setScalarType
Methods inherited from class ucar.visad.display.MapAdapter
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getDisplayRealType, removePropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
XAxisScalarMap
public XAxisScalarMap(RealType realType, DisplayAdapter display) throws VisADException, RemoteException Constructs.- Parameters:
realType
- The type of data to be mapped to the X-axis.display
- The adapted, VisAD display for rendering.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
-
Method Details
-
translate
Translates the axis values.- Specified by:
translate
in classAxisScalarMap
- Parameters:
amount
- The amount to translate the axis.transform
- The transformation to be translated.
-
new3DTranslationVector
protected javax.vecmath.Vector3d new3DTranslationVector(double amount) Returns a new, 3-D, translation vector.- Specified by:
new3DTranslationVector
in classAxisScalarMap
- Parameters:
amount
- The amount to translate the axis.- Returns:
- Vector3D with the x translation amount
-
scale
Scales the axis values.- Specified by:
scale
in classAxisScalarMap
- Parameters:
amount
- The amount to scale the axis by.transform
- The transformation to be scaled.
-
scale
protected void scale(double[] values, double amount) Scales an array of values by a given amount- Specified by:
scale
in classAxisScalarMap
- Parameters:
values
- The array of values to be scaled.amount
- The amount to scale the values.
-