sgtplot.contour
Class Contour
- java.lang.Object
-
- sgtplot.contour.Contour
-
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.util.EventListener
public class Contour extends java.lang.Object implements java.beans.PropertyChangeListenerContour constructs a set ofContourLineobjects based on theContourLevels,SGTGrid, and mask supplied. Used byGridCartesianRendererforGridAttributetypes of CONTOUR.- Since:
- 2.0
- See Also:
ContourLine,ContourLevels,GridCartesianRenderer,GridAttribute,ContourLineAttribute,DefaultContourLineAttribute
-
-
Constructor Summary
Constructors Constructor and Description Contour(CartesianGraph cg, SGTGrid grid, ContourLevels conLevels)Construct aContourobject using aContourLevelsobject.Contour(CartesianGraph cg, SGTGrid grid, double[] levels)Construct aContourobject using an array of levels to define theContourLevels.Contour(CartesianGraph cg, SGTGrid grid, Range2D range)Construct aContourobject using a range to define theContourLevels.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.Enumerationelements()Return theEnumerationof aVectorcontaining theContourLineobjects.voidgenerateContourLabels(org.freehep.graphics2d.VectorGraphics g)Given the computedContourLines and theContourLineAttributegenerate the contour labels.voidgenerateContourLines()Given the currentContourLevels, mask, andSGTGridgenerate theContourLines.ContourLevelsgetContourLevels()Get a reference to theContourLevelsobject.SGTGridgetMask()Get the mask.voidpropertyChange(java.beans.PropertyChangeEvent event)Reponds to changes in theContourLevelsobject.voidsetMask(SGTGrid mask)Set aSGTGridobject to be used to mask the data grid.
-
-
-
Constructor Detail
-
Contour
public Contour(CartesianGraph cg, SGTGrid grid, Range2D range)
Construct aContourobject using a range to define theContourLevels.
-
Contour
public Contour(CartesianGraph cg, SGTGrid grid, double[] levels)
Construct aContourobject using an array of levels to define theContourLevels.
-
Contour
public Contour(CartesianGraph cg, SGTGrid grid, ContourLevels conLevels)
Construct aContourobject using aContourLevelsobject.
-
-
Method Detail
-
getContourLevels
public ContourLevels getContourLevels()
Get a reference to theContourLevelsobject.
-
setMask
public void setMask(SGTGrid mask)
Set aSGTGridobject to be used to mask the data grid. The Z values are used to determine the masking, values of NaN and non-zero are set as MISSING.
-
getMask
public SGTGrid getMask()
Get the mask.
-
elements
public java.util.Enumeration elements()
Return theEnumerationof aVectorcontaining theContourLineobjects.
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent event)
Reponds to changes in theContourLevelsobject.- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
generateContourLines
public void generateContourLines()
Given the currentContourLevels, mask, andSGTGridgenerate theContourLines.
-
generateContourLabels
public void generateContourLabels(org.freehep.graphics2d.VectorGraphics g)
Given the computedContourLines and theContourLineAttributegenerate the contour labels. Must be only invoked after generateConourLines().
-
-
DMelt 3.0 © DataMelt by jWork.ORG