|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart2djava.ChartObj
com.quinncurtis.chart2djava.GraphObj
com.quinncurtis.chart2djava.ChartPlot
com.quinncurtis.chart2djava.ContourPlot
public class ContourPlot
The ContourPlot class extends the ChartPlot class and displays contour datasets in contour plot format.
Field Summary |
---|
Constructor Summary | |
---|---|
ContourPlot()
The ContourPlot default constructor. |
|
ContourPlot(PhysicalCoordinates transform)
This constructor creates a new ContourPlot object that will reside in the specified coordinate system. |
|
ContourPlot(PhysicalCoordinates transform,
ContourDataset dataset,
double[] contourlevels,
ChartAttribute[] attribs,
boolean[] blineflags,
boolean[] blabelflags,
int numcontourlevels,
int contourtype)
This constructor creates a new ContourPlot object that will reside in the specified coordinate system. |
|
ContourPlot(PhysicalCoordinates transform,
ContourDataset dataset,
double[] contourlevels,
ChartAttribute[] attribs,
int numcontourlevels,
int contourtype)
This constructor creates a new ContourPlot object that will reside in the specified coordinate system. |
Method Summary | |
---|---|
boolean |
calcNearestPoint(ChartPoint2D testpoint,
int nmode,
NearestPointData nearestpoint)
This method compares a test point against all of the xy points in a simple dataset and calculates which point in the dataset is nearest the test point. |
java.lang.Object |
clone()
Returns an object that is a clone of this ContourPlot object. |
void |
copy(ContourPlot source)
Copies the source contour object. |
void |
draw(java.awt.Graphics2D g2)
The draw method for this class. |
int |
errorCheck(int nerror)
Checks the contour plot object for common errors. |
boolean |
getContourLabelFlag(int index)
Returns a specific contour label flag. |
double |
getContourLevel(int index)
Returns a specific contour level. |
int |
getContourLineAlgorithm()
Returns the contour line drawing algorithm. |
boolean |
getContourLineFlag(int index)
Returns a specific contour line flag. |
int |
getContourType()
Returns the contour plot type. |
ChartDataset |
getDataset()
Returns a reference to the current ContourDataset. |
int |
getNumContourLevels()
Returns the number of contour levels. |
boolean |
getPolygonGridOn()
Returns the state of the polygonGridOn flag. |
void |
initContourPlot(ContourDataset dataset,
double[] contourlevels,
ChartAttribute[] attribs,
boolean[] blineflags,
boolean[] blabelflags,
int numcontourlevels,
int contourtype)
Sets the properties of a contour plot. |
void |
initContourPlot(ContourDataset dataset,
double[] contourlevels,
ChartAttribute[] attribs,
int numcontourlevels,
int contourtype)
Sets the properties of a contour plot. |
void |
setContourLabelFlag(int index,
boolean bvalue)
Sets a specific contour label flag. |
void |
setContourLevel(int index,
double value)
Sets a specific contour level. |
void |
setContourLineAlgorithm(int contourlinealgorithm)
Sets the contour line drawing algorithm. |
void |
setContourLineFlag(int index,
boolean bvalue)
Sets a specific contour line flag. |
void |
setContourPlotAttributes(double[] contourlevels,
ChartAttribute[] attribs,
boolean[] blineflags,
boolean[] blabelflags,
int numcontourlevels,
int contourtype)
Sets the properties of a contour plot. |
void |
setContourPlotAttributes(double[] contourlevels,
ChartAttribute[] attribs,
int numcontourlevels,
int contourtype)
Sets the properties of a contour plot. |
void |
setContourType(int contourtype)
Sets the contour plot type. |
void |
setDataset(ContourDataset dataset)
Replaces the current ContourDataset object with a new one. |
void |
setPolygonGridOn(boolean bvalue)
Sets the state of the polygonGridOn flag. |
Methods inherited from class com.quinncurtis.chart2djava.ChartObj |
---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID, TypeSafeVectorCopy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContourPlot()
public ContourPlot(PhysicalCoordinates transform)
transform
- The coordinate system for the new ContourPlot object.public ContourPlot(PhysicalCoordinates transform, ContourDataset dataset, double[] contourlevels, ChartAttribute[] attribs, boolean[] blineflags, boolean[] blabelflags, int numcontourlevels, int contourtype)
transform
- The coordinate system for the new ContourPlot object.dataset
- The ContourDataset plot will represent the xyz
values in this contour data set.contourlevels
- An array, size [numcontourlevels], of the contour levels used in the contour plot.attribs
- An array of color and fill attributes, one for each contour level.blineflags
- An array, size [numcontourlevels], of boolean flags specifying whether a contour line should be displayed.blabelflags
- An array, size [numcontourlevels], of boolean flags specifying whether a contour line should be labeled with
the numeric value of the associated contour level.numcontourlevels
- The number of contour levels.contourtype
- Specifies if the contour plot uses contour lines (CONTOUR_LINE),
filled contour regions (CONTOUR_FILL) or both (CONTOUR_LINEANDFILL).public ContourPlot(PhysicalCoordinates transform, ContourDataset dataset, double[] contourlevels, ChartAttribute[] attribs, int numcontourlevels, int contourtype)
transform
- The coordinate system for the new ContourPlot object.dataset
- The ContourDataset plot will represent the xyz
values in this contour data set.contourlevels
- An array, size [numcontourlevels], of the contour levels used in the contour plot.attribs
- An array of color and fill attributes, size [numcontourlevels+1]. If
the contourtype is CONTOUR_LINE, the colors of elements 0..numcontourlevels-1 set
the colors of the contour lines. If the contourtype is CONTOUR_FILL, elements
0..numcontourlevels set the color of the contour regions.numcontourlevels
- The number of contour levels.contourtype
- Specifies if the contour plot uses contour lines (CONTOUR_LINE),
filled contour regions (CONTOUR_FILL) or both (CONTOUR_LINEANDFILL).Method Detail |
---|
public boolean calcNearestPoint(ChartPoint2D testpoint, int nmode, NearestPointData nearestpoint)
calcNearestPoint
in class ChartPlot
testpoint
- The test point for the nearness calculation.nmode
- Specifies the algorithm used in the nearness calculation.nearestpoint
- Returns the parameters of the nearest point.
public java.lang.Object clone()
clone
in class GraphObj
public void copy(ContourPlot source)
source
- The source contour object.public void draw(java.awt.Graphics2D g2)
draw
in class GraphObj
g2
- The graphics context.public int errorCheck(int nerror)
errorCheck
in class ChartPlot
nerror
- Current error state.
public boolean getContourLabelFlag(int index)
index
- The specific contour label flag to return.
public double getContourLevel(int index)
index
- The specific contour level to return.
public int getContourLineAlgorithm()
public boolean getContourLineFlag(int index)
index
- The specific contour line flag to return.
public int getContourType()
public ChartDataset getDataset()
getDataset
in class ChartPlot
public int getNumContourLevels()
public boolean getPolygonGridOn()
public void initContourPlot(ContourDataset dataset, double[] contourlevels, ChartAttribute[] attribs, boolean[] blineflags, boolean[] blabelflags, int numcontourlevels, int contourtype)
dataset
- The ContourDataset plot will represent the xyz
values in this contour data set.contourlevels
- An array, size [numcontourlevels], of the contour levels used in the contour plot.attribs
- An array of color and fill attributes, one for each contour level.blineflags
- An array, size [numcontourlevels], of boolean flags specifying whether a contour line should be displayed.blabelflags
- An array, size [numcontourlevels], of boolean flags specifying whether a contour line should be labeled with
the numeric value of the associated contour level.numcontourlevels
- The number of contour levels.contourtype
- Specifies if the contour plot uses contour lines (CONTOUR_LINE),
filled contour regions (CONTOUR_FILL) or both (CONTOUR_LINEANDFILL).public void initContourPlot(ContourDataset dataset, double[] contourlevels, ChartAttribute[] attribs, int numcontourlevels, int contourtype)
dataset
- The ContourDataset plot will represent the xyz
values in this contour data set.contourlevels
- An array, size [numcontourlevels], of the contour levels used in the contour plot.attribs
- An array of color and fill attributes, one for each contour level.numcontourlevels
- The number of contour levels.contourtype
- Specifies if the contour plot uses contour lines (CONTOUR_LINE),
filled contour regions (CONTOUR_FILL) or both (CONTOUR_LINEANDFILL).public void setContourLabelFlag(int index, boolean bvalue)
index
- The specific contour label flag to set.bvalue
- Sets the contour label flag at contourLabelFlags[index].public void setContourLevel(int index, double value)
index
- The specific contour level to set.value
- Sets the contour level at contourLevels[index].public void setContourLineAlgorithm(int contourlinealgorithm)
contourlinealgorithm
- Sets the contour line drawing algorithm.
User one of the contour line algorithm constants: CONTOUR_LINEPOLYGON or CONTOUR_LINEWALK.public void setContourLineFlag(int index, boolean bvalue)
index
- The specific contour line flag to set.bvalue
- Sets the contour line flag at contourLineFlags[index].public void setContourPlotAttributes(double[] contourlevels, ChartAttribute[] attribs, boolean[] blineflags, boolean[] blabelflags, int numcontourlevels, int contourtype)
contourlevels
- An array, size [numcontourlevels], of the contour levels used in the contour plot.attribs
- An array of color and fill attributes, one for each contour level.blineflags
- An array, size [numcontourlevels], of boolean flags specifying whether a contour line should be displayed.blabelflags
- An array, size [numcontourlevels], of boolean flags specifying whether a contour line should be labeled with
the numeric value of the associated contour level.numcontourlevels
- The number of contour levels.contourtype
- Controls the contour interpolation algorithm. Use one of the contour algorithm
constants: CONTOUR_LINEPOLYGON, CONTOUR_LINEWALK.public void setContourPlotAttributes(double[] contourlevels, ChartAttribute[] attribs, int numcontourlevels, int contourtype)
contourlevels
- An array, size [numcontourlevels], of the contour levels used in the contour plot.attribs
- An array of color and fill attributes, one for each contour level.numcontourlevels
- The number of contour levels.contourtype
- Controls the contour interpolation algorithm. Use one of the contour algorithm
constants: CONTOUR_LINEPOLYGON, CONTOUR_LINEWALK.public void setContourType(int contourtype)
contourtype
- Sets the contour plot type. Use one of the contour
plot type constants: CONTOUR_FILL, CONTOUR_LINE or CONTOUR_LINEANDFILL.public void setDataset(ContourDataset dataset)
dataset
- Specifies the new ContourDataset object.public void setPolygonGridOn(boolean bvalue)
bvalue
- Sets the state of the polygonGridOn flag.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |