|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.klg.jclass.chart3d.ParentTrackChange
|
+--com.klg.jclass.chart3d.ParentFormatter
|
+--com.klg.jclass.chart3d.JCContourLevels
This object deals with contour levels(distribution table). It
calculates default levels (if isDefault is true), but also
allows the user to set their own levels.
| Field Summary | |
static int |
DEFAULT_NUM_LEVELS
The default number of contour levels. |
protected boolean |
isDefault
Asks if linear contour levels are generated automatically (based on numLevels). |
protected double[] |
levels
A strictly increasing array of contour levels. |
protected double |
max
The contour minimum, calculated from the data. |
protected double |
min
The contour minimum, calculated from the data. |
protected int |
numLevels
The number of contour levels. |
protected int |
numLevelsInternal
|
| Fields inherited from class com.klg.jclass.chart3d.ParentFormatter |
decimalPadded, groupingUsed, nFrac, numberLocalization |
| Fields inherited from class com.klg.jclass.chart3d.ParentTrackChange |
parents |
| Constructor Summary | |
JCContourLevels()
No args constructor. |
|
JCContourLevels(double[] levels)
Constructor that sets the contour levels array. |
|
JCContourLevels(int numLevels)
Constructor that sets the number of levels. |
|
| Method Summary | |
void |
addLevel(double value)
Adds a level at the given value. |
protected void |
calcLevels()
Cacluates default contour levels. |
protected void |
calcLimits(com.klg.jclass.chart3d.Chart3dDataView dataView,
com.klg.jclass.chart3d.Chart3dGridData elevationData,
com.klg.jclass.chart3d.Chart3dGridData zoneData)
Computes the contour limits (from the data). |
int |
getLevelFromValue(double value)
Calculates the contour level for this value. |
double[] |
getLevels()
Returns the current contour levels array (distribution table). |
double |
getMax()
Returns the contour max. |
double |
getMin()
Returns the contour min. |
int |
getNumLevels()
Returns the current number of levels property as specified by the user. |
int |
getNumLevelsInternal()
Returns the actual number of levels used. |
boolean |
isDefault()
Are default distribution levels being used? This value defaults to true, but is automatically set to false if the user
sets the levels array, or calls methods addLevel()
or removeLevel(). |
void |
removeLevel(double value)
Removes the level closest to the give value. |
void |
removeLevel(int level)
Removes the level at index level. |
void |
setDefault(boolean isDefault)
Sets the isDefault flag. |
void |
setLevels(double[] levels)
Sets a new levels array. |
void |
setNumLevels(int numLevels)
Sets the current number of levels. |
| Methods inherited from class com.klg.jclass.chart3d.ParentFormatter |
getGroupingUsed, getNFrac, getNumberFormatter, getNumberLocalization, isDecimalPadded, setDecimalPadded, setGroupingUsed, setNFrac, setNumberFormatterLocale, setNumberLocalization |
| Methods inherited from class com.klg.jclass.chart3d.ParentTrackChange |
addParent, clearParents, removeParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DEFAULT_NUM_LEVELS
protected boolean isDefault
numLevels).
protected double[] levels
protected int numLevels
protected int numLevelsInternal
protected double min
protected double max
| Constructor Detail |
public JCContourLevels()
public JCContourLevels(int numLevels)
numLevels - the number of contour levelspublic JCContourLevels(double[] levels)
isDefault
flag is set to false.
levels - a strictly increasing array of contour levels| Method Detail |
public double[] getLevels()
public void setLevels(double[] levels)
levels array. This has a side effect of turning
isDefault to false. Also, numLevels
will be adjusted to be the size of the inputted array.
levels - the new set of contour levelspublic int getNumLevelsInternal()
isDefault is
false. In this case the actual number of levels used is the size
of the specified levels array.
public int getNumLevels()
isDefault is false.
public void setNumLevels(int numLevels)
numLevels is
ignored if isDefault is false (with actual value
used equal to the size of the levels array). Also note that
numLevels must be non-negative.
numLevels - the new number of contour levelspublic boolean isDefault()
true, but is automatically set to false if the user
sets the levels array, or calls methods addLevel()
or removeLevel().
public void setDefault(boolean isDefault)
isDefault flag. If set to true, JClass
Chart 3D will automatically calculate a default set of levels based on the
numLevels property. If set to false, the current
levels array is used and numLevels becomes read-only.
isDefault - the new value os the isDefault flagpublic double getMin()
min.
minpublic double getMax()
max.
maxpublic void addLevel(double value)
isDefault to false.
value - the new contour level valuepublic void removeLevel(int level)
level. Calling this method has the
side effect of setting isDefault to false.
level - the level number to be removedpublic void removeLevel(double value)
isDefault to false.
value - the value that determines which level to removepublic int getLevelFromValue(double value)
Note: A value between 0 and numLevels (inclusive - there
should be one more contourStyle than contour level) is returned.
value - the data value from which a contour level is calculated
protected void calcLimits(com.klg.jclass.chart3d.Chart3dDataView dataView,
com.klg.jclass.chart3d.Chart3dGridData elevationData,
com.klg.jclass.chart3d.Chart3dGridData zoneData)
dataView - the dataView for which to calculated the contour
limitselevationData - the elevation data to use to calculate the contour
limitszoneData - the zone data to use to calculate the contour limitsprotected void calcLevels()
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||