ucar.visad.display
Class ContourLevels

java.lang.Object
  extended by ucar.visad.display.ContourLevels
Direct Known Subclasses:
IrregularContourLevels, RegularContourLevels

public abstract class ContourLevels
extends Object

Provides support for contour levels. Instances are immutable.

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

Constructor Summary
protected ContourLevels()
          Constructs an instance.
protected ContourLevels(float base)
          Constructs an instance with a given base contour level.
 
Method Summary
 float getBase()
          Returns the base contour level.
abstract  float[] getLevels(float minimum, float maximum)
          Gets the contour levels given a data range.
abstract  void setControl(ContourControl control)
          Sets a VisAD ContourControl.
abstract  void setControl(ContourControl control, float minimum, float maximum)
          Sets a VisAD ContourControl.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContourLevels

protected ContourLevels()
Constructs an instance. The base contour level will be zero.


ContourLevels

protected ContourLevels(float base)
Constructs an instance with a given base contour level.

Parameters:
base - The base contour level.
Method Detail

getBase

public final float getBase()
Returns the base contour level. The base contour level either determines the transition between dashed and solid contour lines or is a contour line value.

Returns:
The base contour level.

getLevels

public abstract float[] getLevels(float minimum,
                                  float maximum)
                           throws VisADException
Gets the contour levels given a data range.

Parameters:
minimum - The minimum data value.
maximum - The maximum data value.
Returns:
Contour levels appropriate for the given data range. No contour level will lie outside the range. The levels will be ordered by increasing value.
Throws:
VisADException - Invalid range extrema or VisAD failure.

setControl

public abstract void setControl(ContourControl control)
                         throws VisADException,
                                RemoteException
Sets a VisAD ContourControl.

Parameters:
control - The VisAD ContourControl to be set by this object.
Throws:
VisADException - Couldn't perform necessary VisAD operation.
RemoteException - Java RMI failure.

setControl

public abstract void setControl(ContourControl control,
                                float minimum,
                                float maximum)
                         throws VisADException,
                                RemoteException
Sets a VisAD ContourControl.

Parameters:
control - The VisAD ContourControl to be set by this object.
minimum - The minimum value. It shall not be Float.NEGATIVE_INFINITY
maximum - The maximum value. It shall not be Float.POSITIVE_INFINITY
Throws:
VisADException - Couldn't perform necessary VisAD operation.
RemoteException - Java RMI failure.