ucar.visad.display
Class AxisScalarMap

java.lang.Object
  extended by ucar.visad.display.MapAdapter
      extended by ucar.visad.display.ScalarMapAdapter
          extended by ucar.visad.display.AxisScalarMap
All Implemented Interfaces:
Comparable, Propertied
Direct Known Subclasses:
XAxisScalarMap, YAxisScalarMap, ZAxisScalarMap

public abstract class AxisScalarMap
extends ScalarMapAdapter

Provides support for adapting ScalarMap-s to Display.XAxis, Display.YAxis, or Display.ZAxis.

Instances of this class have the the JavaBean properties of the superclass.

Version:
$Revision: 1.10 $
Author:
Steven R. Emmerson

Field Summary
 
Fields inherited from class ucar.visad.display.ScalarMapAdapter
SCALAR_MAP, SCALAR_TYPE
 
Constructor Summary
protected AxisScalarMap(RealType realType, DisplayRealType displayType, DisplayAdapter display)
          Constructs.
 
Method Summary
 void flip()
          Flips.
protected abstract  javax.vecmath.Vector3d new3DTranslationVector(double amount)
          Returns a new, 3-D, translation vector.
 void scale(double amount)
          Scales.
protected abstract  void scale(double[] values, double amount)
          Scales.
protected abstract  void scale(double amount, AffineTransform transform)
          Scales the axis values.
protected  void setControl()
          Sets the control of the underlying ScalarMap.
 void translate(double amount)
          Translates.
protected abstract  void translate(double amount, AffineTransform transform)
          Translates the axis values.
 
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxisScalarMap

protected AxisScalarMap(RealType realType,
                        DisplayRealType displayType,
                        DisplayAdapter display)
                 throws VisADException,
                        RemoteException
Constructs.

Parameters:
realType - The type of data to be mapped to the axis.
displayType - The display type of the axis.
display - The adapted, VisAD display for rendering.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.
Method Detail

translate

public void translate(double amount)
               throws VisADException,
                      RemoteException
Translates.

Parameters:
amount - The amount by which to translate.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

scale

public void scale(double amount)
           throws VisADException,
                  RemoteException
Scales.

Parameters:
amount - The amount by which to scale.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

flip

public void flip()
          throws VisADException,
                 RemoteException
Flips.

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setControl

protected void setControl()
                   throws VisADException,
                          RemoteException
Sets the control of the underlying ScalarMap. This is a template method.

Specified by:
setControl in class ScalarMapAdapter
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

translate

protected abstract void translate(double amount,
                                  AffineTransform transform)
Translates the axis values.

Parameters:
amount - The amount to translate the axis.
transform - The transformation to be translated.

new3DTranslationVector

protected abstract javax.vecmath.Vector3d new3DTranslationVector(double amount)
Returns a new, 3-D, translation vector.

Parameters:
amount - The amount to translate the axis.
Returns:
Vector3D of the translation amount

scale

protected abstract void scale(double amount,
                              AffineTransform transform)
Scales the axis values.

Parameters:
amount - The amount to scale the axis by.
transform - The transformation to be scaled.

scale

protected abstract void scale(double[] values,
                              double amount)
Scales.

Parameters:
values - Unknown.
amount - Unknown.