gov.noaa.pmel.sgt
Class ContourLevels

java.lang.Object
  |
  +--gov.noaa.pmel.sgt.ContourLevels
All Implemented Interfaces:
java.lang.Cloneable

public class ContourLevels
extends java.lang.Object
implements java.lang.Cloneable

Contains levels and line styles for contour graphics.

Since:
2.0
Version:
$Revision: 1.19 $, $Date: 2001/12/11 23:50:09 $
Author:
Donald Denbo

Constructor Summary
ContourLevels()
           
 
Method Summary
 void addLevel(double val)
          Add a contour level with default ContourLineAttribute.
 void addLevel(double val, ContourLineAttribute l)
          Add a contour level with a specified ContourLineAttribute.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add listener to changes in ColorMap properties.
 ContourLevels copy()
          Create a deep copy.
 ContourLineAttribute getContourLineAttribute(double val)
          Get the ContourLineAttribute for a value.
 ContourLineAttribute getContourLineAttribute(int indx)
          Get the ContourLineAttribute for an index.
static ContourLevels getDefault(double[] array)
          Construct a default ContourLevels object from a double[].
static ContourLevels getDefault(Range2D range)
          Construct a default ContourLevels object from a Range2D.
 DefaultContourLineAttribute getDefaultContourLineAttribute()
          Get the DefaultContourLineAtrribute
 DefaultContourLineAttribute getDefaultContourLineAttribute(double val)
          Get the DefaultContourLineAttribute for value.
 DefaultContourLineAttribute getDefaultContourLineAttribute(int indx)
          Get the DefaultContourLineAttribute for index.
 int getIndex(double val)
          Get the index of a level by value
 int getIndex(java.lang.Double dval)
          Get the index of a level by value
 double getLevel(int indx)
          Get the value of level by index.
 int getMaximumIndex()
          Get the maximum level index.
 Range2D getRange()
          Get the range of levels
 java.util.Enumeration levelElements()
          Get the contour level elements.
 void removeLevel(double val)
          Remove a level by value.
 void removeLevel(int indx)
          Remove a level by index.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void setContourLineAttribute(double val, ContourLineAttribute l)
          Set a the ContourLineAttribute for a value.
 void setContourLineAttribute(int indx, ContourLineAttribute l)
          Set a the ContourLineAttribute for an index.
 void setDefaultContourLineAttribute(DefaultContourLineAttribute attr)
          Set the DefaultContourLineAttribute
 int size()
          Get the number of levels.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContourLevels

public ContourLevels()
Method Detail

getDefault

public static ContourLevels getDefault(double[] array)
Construct a default ContourLevels object from a double[].

getDefault

public static ContourLevels getDefault(Range2D range)
Construct a default ContourLevels object from a Range2D.

copy

public ContourLevels copy()
Create a deep copy.

levelElements

public java.util.Enumeration levelElements()
Get the contour level elements.

setContourLineAttribute

public void setContourLineAttribute(double val,
                                    ContourLineAttribute l)
                             throws ContourLevelNotFoundException
Set a the ContourLineAttribute for a value.

setContourLineAttribute

public void setContourLineAttribute(int indx,
                                    ContourLineAttribute l)
                             throws ContourLevelNotFoundException
Set a the ContourLineAttribute for an index.

getContourLineAttribute

public ContourLineAttribute getContourLineAttribute(double val)
                                             throws ContourLevelNotFoundException
Get the ContourLineAttribute for a value.

getContourLineAttribute

public ContourLineAttribute getContourLineAttribute(int indx)
                                             throws ContourLevelNotFoundException
Get the ContourLineAttribute for an index.

getDefaultContourLineAttribute

public DefaultContourLineAttribute getDefaultContourLineAttribute()
Get the DefaultContourLineAtrribute

getDefaultContourLineAttribute

public DefaultContourLineAttribute getDefaultContourLineAttribute(int indx)
                                                           throws ContourLevelNotFoundException
Get the DefaultContourLineAttribute for index.

getDefaultContourLineAttribute

public DefaultContourLineAttribute getDefaultContourLineAttribute(double val)
                                                           throws ContourLevelNotFoundException
Get the DefaultContourLineAttribute for value.

setDefaultContourLineAttribute

public void setDefaultContourLineAttribute(DefaultContourLineAttribute attr)
Set the DefaultContourLineAttribute

addLevel

public void addLevel(double val)
Add a contour level with default ContourLineAttribute.

addLevel

public void addLevel(double val,
                     ContourLineAttribute l)
Add a contour level with a specified ContourLineAttribute.

getLevel

public double getLevel(int indx)
                throws ContourLevelNotFoundException
Get the value of level by index.

removeLevel

public void removeLevel(double val)
                 throws ContourLevelNotFoundException
Remove a level by value.

removeLevel

public void removeLevel(int indx)
                 throws ContourLevelNotFoundException
Remove a level by index.

getIndex

public int getIndex(java.lang.Double dval)
Get the index of a level by value

getIndex

public int getIndex(double val)
Get the index of a level by value

getMaximumIndex

public int getMaximumIndex()
Get the maximum level index.

getRange

public Range2D getRange()
Get the range of levels

size

public int size()
Get the number of levels.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add listener to changes in ColorMap properties.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)


Send comments about the Scientific Graphics toolkit to dwd@pmel.noaa.gov. For more information about Java Development in the EPIC Group see the EPIC Software Page
Generated on December 13 2001