Class ContourLines

Direct Known Subclasses:
BackgroundContours, Contour2DDisplayable

public abstract class ContourLines extends LineDrawing
Provides support for a Displayable that comprises a set of contour lines.

Instances of this class have the following bound properties:

Name Type Access Default Description
contourLevels ContourLevels set/get no contour levels The displayed contour levels associated with this instance.
labeling boolean set/is false Whether or not the contour lines should be labeled.
contourRealType visad.RealType set/get null The VisAD type of the contoured quantity.
colorFill boolean set/get null Whether or not the contour lines are color filled.
Version:
$Revision: 1.30 $
Author:
Steven R. Emmerson
  • Field Details

  • Constructor Details

    • ContourLines

      public ContourLines(String name, RealType contourRealType) throws VisADException, RemoteException
      Constructs from a name for the Displayable and the type of the contour parameter. The contour levels will be the VisAD default and the lines will not be labeled.
      Parameters:
      name - The name for the displayable.
      contourRealType - The type of the contour parameter. May be null.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • ContourLines

      public ContourLines(ContourLines that) throws VisADException, RemoteException
      Constructs from another instance. The following attributes are set from the other instance: contour levels, labeling, the contour RealType, the range minimum, and the range maximum.
      Parameters:
      that - The other instance.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
  • Method Details

    • setContourRealType

      protected void setContourRealType(RealType realType) throws RemoteException, VisADException
      Sets the RealType of the contoured parameter.
      Parameters:
      realType - The RealType of the contoured parameter. May not be null.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getContourRealType

      public RealType getContourRealType()
      Returns the RealType of the contoured parameter.
      Returns:
      The RealType of the contoured parameter. May be null.
    • setRange

      protected void setRange(float min, float max) throws RemoteException, VisADException
      Sets the range of contour values.
      Parameters:
      min - The minimum contour value.
      max - The maximum contour value.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setContourLevels

      public final void setContourLevels(ContourLevels contourLevels) throws RemoteException, VisADException
      Sets the contour values. This method fires a PropertyChangeEvent for CONTOUR_LEVELS.
      Parameters:
      contourLevels - The contour values.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
      See Also:
    • setContourInterval

      public final void setContourInterval(float inter, float base, float min, float max) throws RemoteException, VisADException
      Sets the contour values, with interval, min, max, base. This method fires a PropertyChangeEvent for CONTOUR_LEVELS.
      Parameters:
      inter - The contour interval.
      base - The base contour value.
      min - The minimum contour value.
      max - The maximum contour value.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
      See Also:
    • setContourInterval

      public final void setContourInterval(float inter, float base, float min, float max, boolean dash) throws RemoteException, VisADException
      Sets the contour values, with interval, min, max, base and dash. This method fires a PropertyChangeEvent for CONTOUR_LEVELS.
      Parameters:
      inter - The contour interval.
      base - The base contour value.
      min - The minimum contour value.
      max - The maximum contour value.
      dash - Whether or not to draw dashed lines for contours less than the base contour value.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
      See Also:
    • setScalarMaps

      protected void setScalarMaps(ScalarMapSet maps) throws BadMappingException
      Sets the set of ScalarMap-s of this instance. The ScalarMap-s of this instance will be added to the set before the SCALAR_MAP_SET property is set. This method fires a PropertyChangeEvent for SCALAR_MAP_SET with null for the old value and the new set of ScalarMap-s for the new Value. Intermediate subclasses that have their own ScalarMap-s should override this method and invoke super.setScalarMaps(ScalarMapSet).
      Parameters:
      maps - The set of ScalarMap-s to be added.
      Throws:
      BadMappingException - The RealType of the contour parameter has not been set or its ScalarMap is already in the set.
    • getContourLevels

      public final ContourLevels getContourLevels()
      Returns the contour levels.
      Returns:
      The Contour levels. The default value is an empty set of levels.
    • getContourValues

      public final float[] getContourValues() throws VisADException
      Gets the contour values.
      Returns:
      The contour values.
      Throws:
      VisADException - VisAD failure.
    • setContourInfo

      public void setContourInfo(ContourInfo contourInfo) throws VisADException, RemoteException
      Set appropriate contour levels info
      Overrides:
      setContourInfo in class Displayable
      Parameters:
      contourInfo - Contains contour and labeling information
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setColorFill

      public void setColorFill(boolean yesorno) throws VisADException, RemoteException
      Set whether the contours should be displayed as color-filled contours.
      Parameters:
      yesorno - true for color fill
      Throws:
      VisADException - unable to set this
      RemoteException - unable to set this on remote display
    • getColorFillEnabled

      public boolean getColorFillEnabled()
      Ask if color filled contours are enabled.
      Returns:
      true if using color-filled contours.
    • setLabeling

      public final void setLabeling(boolean on) throws VisADException, RemoteException
      Sets the labeling of contour lines.
      Parameters:
      on - Whether or not the contour lines should be labeled.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • isLabeling

      public final boolean isLabeling()
      Returns the labeling of contour lines.
      Returns:
      true if and only if the contour lines should be labeled.
    • setDisplayUnit

      public void setDisplayUnit(Unit unit) throws VisADException, RemoteException
      Set the units for the displayed range
      Overrides:
      setDisplayUnit in class Displayable
      Parameters:
      unit - Unit for display
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setLabelFreq

      public void setLabelFreq(int freq) throws RemoteException, VisADException
      Set the label frequency
      Parameters:
      freq - label frequency
      Throws:
      RemoteException - Java RMI Exception
      VisADException - Problem setting the dashed style
    • setLabelSkip

      public void setLabelSkip(int skip) throws RemoteException, VisADException
      Set the label skip
      Parameters:
      skip - label skip
      Throws:
      RemoteException - Java RMI Exception
      VisADException - Problem setting the dashed style
    • setDashedStyle

      public void setDashedStyle(int style) throws RemoteException, VisADException
      Set the dashed style.
      Parameters:
      style - dashed line style
      Throws:
      RemoteException - Java RMI Exception
      VisADException - Problem setting the dashed style
    • setFont

      public void setFont(Object font, int size, boolean align) throws RemoteException, VisADException
      Set the font
      Parameters:
      font - the font name/weight
      size - the label (font) size
      align - _more_
      Throws:
      RemoteException - Java RMI Exception
      VisADException - Problem setting the dashed style
    • getDashedStyle

      public int getDashedStyle()
      Set the dashed style.
      Returns:
      dashed line style