Class IrregularContourLevels

java.lang.Object
ucar.visad.display.ContourLevels
ucar.visad.display.IrregularContourLevels

public final class IrregularContourLevels extends ContourLevels
Provides support for irregular contours, which are characterized by an explicit set of contour levels.

Instances of this class are immutable.

Version:
$Revision: 1.9 $
Author:
Steven R. Emmerson
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final float[]
    The set of contour levels.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IrregularContourLevels(float[] levels)
    Constructs an instance from a list of contour values.
    IrregularContourLevels(float[] levels, float base)
    Constructs an instance from a list of contour values and a base contour level for dashed lines.
    IrregularContourLevels(float[] levels, float base, boolean dash)
    Constructs an instance from a list of contour values and a base contour level for dashed lines.
  • Method Summary

    Modifier and Type
    Method
    Description
    float[]
    getLevels(float minimum, float maximum)
    Gets the contour levels given a data range.
    void
    Sets a VisAD ContourControl.
    void
    setControl(ContourControl control, float minimum, float maximum)
    Sets a VisAD ContourControl.

    Methods inherited from class ucar.visad.display.ContourLevels

    getBase

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • levels

      protected final float[] levels
      The set of contour levels.
  • Constructor Details

    • IrregularContourLevels

      public IrregularContourLevels(float[] levels)
      Constructs an instance from a list of contour values. The base contour for dashed lines shall be zero.
      Parameters:
      levels - The contour levels. They shall be ordered by increasing value.
    • IrregularContourLevels

      public IrregularContourLevels(float[] levels, float base)
      Constructs an instance from a list of contour values and a base contour level for dashed lines.
      Parameters:
      levels - The contour levels. They shall be ordered by increasing value.
      base - The base contour level. Contour lines below this value will be dashed.
    • IrregularContourLevels

      public IrregularContourLevels(float[] levels, float base, boolean dash)
      Constructs an instance from a list of contour values and a base contour level for dashed lines.
      Parameters:
      levels - The contour levels. They shall be ordered by increasing value.
      base - The base contour level. Contour lines below this value will be dashed.
      dash - dash contours below base if true
  • Method Details

    • getLevels

      public float[] getLevels(float minimum, float maximum)
      Gets the contour levels given a data range.
      Specified by:
      getLevels in class ContourLevels
      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.
    • setControl

      public void setControl(ContourControl control) throws VisADException, RemoteException
      Sets a VisAD ContourControl.
      Specified by:
      setControl in class ContourLevels
      Parameters:
      control - The VisAD ContourControl to be set by this object.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setControl

      public void setControl(ContourControl control, float minimum, float maximum) throws VisADException, RemoteException
      Sets a VisAD ContourControl.
      Specified by:
      setControl in class ContourLevels
      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 - VisAD failure.
      RemoteException - Java RMI failure.