gov.noaa.pmel.sgt.contour
Class ContourLine

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--gov.noaa.pmel.sgt.contour.ContourLine
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable

public class ContourLine
extends java.util.Vector

ContourLine contains a single closed or open contour and a list of its labels. The level, closedness, and path are properties. The path is stored as a Vector of Point2D user coordinate values. ContourLine objects are created by Contour and drawn by GridCartesianRenderer. Time coordinates are stored in the Point2D objects releative to a reference time.

Since:
2.0
Version:
$Revision: 1.15 $, $Date: 2001/12/13 00:16:17 $
Author:
D. W. Denbo
See Also:
Contour, ContourLineAttribute, DefaultContourLineAttribute, GridCartesianRenderer, Serialized Form

Constructor Summary
ContourLine()
          Default constructor.
ContourLine(int size)
          Constructor setting initial size of coordinate Vector.
ContourLine(int size, int extend)
          Constructor setting initial size and extend values of coordinate Vector.
 
Method Summary
 void addLabel(int point, SGLabel lab, double hgt, double wid)
          Add a label to the contour line.
 void draw(java.awt.Graphics g)
          Used internally by sgt.
 ContourLineAttribute getContourLineAttribute()
          Get the ContourLineAttribute
 DefaultContourLineAttribute getDefaultContourLineAttribute()
          Get the DefaultContourLineAttribute
 int getKmax()
          Get the number of points in the contour line.
 double getLevel()
          The level value of the contour line.
 GeoDate getReferenceTime()
          Get reference time for the time point of the Point2D object.
 double[] getXArrayP()
          Get x physical coordinates of the contour line.
 double[] getYArrayP()
          Get y physical coordinates of the contour line.
 boolean isClosed()
          Is the contour line closed?
 boolean isXTime()
          Is the x coordinate time?
 boolean isYTime()
          Is the y coordinate time?
 void removeAllLabels()
          Remove all labels.
 void setAttributes(DefaultContourLineAttribute def, ContourLineAttribute attr)
          Set the attributes for the contour line.
 void setCartesianGraph(CartesianGraph cg)
          Set the parent CartesianGraph.
 void setContourLineAttribute(ContourLineAttribute attr)
          Set the ContourLineAttribute
 void setDefaultContourLineAttribute(DefaultContourLineAttribute def)
          Set the DefaultContourLineAttribute
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

ContourLine

public ContourLine()
Default constructor.

ContourLine

public ContourLine(int size,
                   int extend)
Constructor setting initial size and extend values of coordinate Vector.

ContourLine

public ContourLine(int size)
Constructor setting initial size of coordinate Vector.
Method Detail

setCartesianGraph

public void setCartesianGraph(CartesianGraph cg)
Set the parent CartesianGraph. Used internally by sgt.

setAttributes

public void setAttributes(DefaultContourLineAttribute def,
                          ContourLineAttribute attr)
Set the attributes for the contour line.

setContourLineAttribute

public void setContourLineAttribute(ContourLineAttribute attr)
Set the ContourLineAttribute

getContourLineAttribute

public ContourLineAttribute getContourLineAttribute()
Get the ContourLineAttribute

setDefaultContourLineAttribute

public void setDefaultContourLineAttribute(DefaultContourLineAttribute def)
Set the DefaultContourLineAttribute

getDefaultContourLineAttribute

public DefaultContourLineAttribute getDefaultContourLineAttribute()
Get the DefaultContourLineAttribute

isClosed

public boolean isClosed()
Is the contour line closed?

getLevel

public double getLevel()
The level value of the contour line.

getKmax

public int getKmax()
Get the number of points in the contour line.

getReferenceTime

public GeoDate getReferenceTime()
Get reference time for the time point of the Point2D object.

isXTime

public boolean isXTime()
Is the x coordinate time?

isYTime

public boolean isYTime()
Is the y coordinate time?

addLabel

public void addLabel(int point,
                     SGLabel lab,
                     double hgt,
                     double wid)
Add a label to the contour line.

removeAllLabels

public void removeAllLabels()
Remove all labels.

draw

public void draw(java.awt.Graphics g)
Used internally by sgt.

getXArrayP

public double[] getXArrayP()
Get x physical coordinates of the contour line.

getYArrayP

public double[] getYArrayP()
Get y physical coordinates of the contour line.


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