sgtplot
Class ContourLevels
- java.lang.Object
-
- sgtplot.ContourLevels
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class ContourLevels extends java.lang.Object implements java.lang.CloneableContains levels and line styles for contour graphics.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor and Description ContourLevels()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddLevel(double val)Add a contour level with defaultContourLineAttribute.voidaddLevel(double val, ContourLineAttribute l)Add a contour level with a specifiedContourLineAttribute.voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)Add listener to changes inColorMapproperties.ContourLevelscopy()Create a deep copy.ContourLineAttributegetContourLineAttribute(double val)Get theContourLineAttributefor a value.ContourLineAttributegetContourLineAttribute(int indx)Get theContourLineAttributefor an index.static ContourLevelsgetDefault(double[] array)Construct a defaultContourLevelsobject from a double[].static ContourLevelsgetDefault(Range2D range)Construct a defaultContourLevelsobject from aRange2D.DefaultContourLineAttributegetDefaultContourLineAttribute()Get theDefaultContourLineAtrributeDefaultContourLineAttributegetDefaultContourLineAttribute(double val)Get theDefaultContourLineAttributefor value.DefaultContourLineAttributegetDefaultContourLineAttribute(int indx)Get theDefaultContourLineAttributefor index.intgetIndex(double val)Get the index of a level by valueintgetIndex(java.lang.Double dval)Get the index of a level by valuedoublegetLevel(int indx)Get the value of level by index.intgetMaximumIndex()Get the maximum level index.Range2DgetRange()Get the range of levelsjava.util.EnumerationlevelElements()Get the contour level elements.voidremoveLevel(double val)Remove a level by value.voidremoveLevel(int indx)Remove a level by index.voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)voidsetContourLineAttribute(double val, ContourLineAttribute l)Set a theContourLineAttributefor a value.voidsetContourLineAttribute(int indx, ContourLineAttribute l)Set a theContourLineAttributefor an index.voidsetDefaultContourLineAttribute(DefaultContourLineAttribute attr)Set theDefaultContourLineAttributeintsize()Get the number of levels.
-
-
-
Method Detail
-
getDefault
public static ContourLevels getDefault(double[] array)
Construct a defaultContourLevelsobject from a double[].
-
getDefault
public static ContourLevels getDefault(Range2D range)
Construct a defaultContourLevelsobject from aRange2D.
-
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 ContourLevelNotFoundExceptionSet a theContourLineAttributefor a value.- Throws:
ContourLevelNotFoundException
-
setContourLineAttribute
public void setContourLineAttribute(int indx, ContourLineAttribute l) throws ContourLevelNotFoundExceptionSet a theContourLineAttributefor an index.- Throws:
ContourLevelNotFoundException
-
getContourLineAttribute
public ContourLineAttribute getContourLineAttribute(double val) throws ContourLevelNotFoundException
Get theContourLineAttributefor a value.- Throws:
ContourLevelNotFoundException
-
getContourLineAttribute
public ContourLineAttribute getContourLineAttribute(int indx) throws ContourLevelNotFoundException
Get theContourLineAttributefor an index.- Throws:
ContourLevelNotFoundException
-
getDefaultContourLineAttribute
public DefaultContourLineAttribute getDefaultContourLineAttribute()
Get theDefaultContourLineAtrribute
-
getDefaultContourLineAttribute
public DefaultContourLineAttribute getDefaultContourLineAttribute(int indx) throws ContourLevelNotFoundException
Get theDefaultContourLineAttributefor index.- Throws:
ContourLevelNotFoundException
-
getDefaultContourLineAttribute
public DefaultContourLineAttribute getDefaultContourLineAttribute(double val) throws ContourLevelNotFoundException
Get theDefaultContourLineAttributefor value.- Throws:
ContourLevelNotFoundException
-
setDefaultContourLineAttribute
public void setDefaultContourLineAttribute(DefaultContourLineAttribute attr)
Set theDefaultContourLineAttribute
-
addLevel
public void addLevel(double val)
Add a contour level with defaultContourLineAttribute.
-
addLevel
public void addLevel(double val, ContourLineAttribute l)Add a contour level with a specifiedContourLineAttribute.
-
getLevel
public double getLevel(int indx) throws ContourLevelNotFoundExceptionGet the value of level by index.- Throws:
ContourLevelNotFoundException
-
removeLevel
public void removeLevel(double val) throws ContourLevelNotFoundExceptionRemove a level by value.- Throws:
ContourLevelNotFoundException
-
removeLevel
public void removeLevel(int indx) throws ContourLevelNotFoundExceptionRemove a level by index.- Throws:
ContourLevelNotFoundException
-
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 inColorMapproperties.
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
-
-
DMelt 3.0 © DataMelt by jWork.ORG