|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.quinncurtis.chart3djava.ChartObj
com.quinncurtis.chart3djava.GraphObj
com.quinncurtis.chart3djava.ChartPlot
public abstract class ChartPlot
The ChartPlot class extends the GraphObj class and is the abstract base class for all plot chart objects in the QCChart2D class library.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
ChartPlot()
The default ChartPlot constructor. |
|
| Method Summary | |
|---|---|
abstract boolean |
calcNearestPoint(ChartPoint3D testpoint,
int nmode,
NearestPointData nearestpoint)
An abstract method that must compare a test point against all of the xy points in a dataset and calculates which point in the dataset is nearest the test point. |
boolean |
checkIntersection(ChartPoint3D testpoint,
NearestPointData np)
Returns true if the test point is near one of the data points. |
boolean |
checkValidPoint(double x,
double y,
boolean valid)
This method checks to see if the current data point is valid |
void |
copy(ChartPlot source)
Copies the source plot object. |
int |
createLineFillArrays(double[] xdest,
double[] ydest,
double[] xsource,
double[] ysource,
boolean[] valid,
int numpoints,
int norient)
This method creates a closed polygon that can be filled. |
int |
createLineFillArrays(double[] xdest,
double[] ydest,
double[] zdest,
double[] xsource,
double[] ysource,
double[] zsource,
boolean[] valid,
int numpoints,
int norient)
This method creates a closed polygon that can be filled. |
void |
drawBarDatapointValue(java.awt.Graphics2D g2,
double x,
double y,
ChartRectangle3D barrect)
This method draws a bar data point value, based on the bar position and orientation. |
void |
drawBarDatapointValue(java.awt.Graphics2D g2,
double x,
double y,
double z,
ChartRectangle3D barrect)
This method draws a bar data point value, based on the bar position and orientation. |
void |
drawSimpleDatapointValue(java.awt.Graphics2D g2,
double x,
double y,
double displayvalue1)
This method draws a data point value, based on the point position. |
void |
drawSimpleDatapointValue(java.awt.Graphics2D g2,
double x,
double y,
double z,
double displayvalue1)
This method draws a data point value, based on the point position. |
int |
errorCheck(int nerror)
Checks the plot object for common errors. |
void |
freeSegmentColors()
This method frees the memory associated with the segmentAttributesVector vector and turns the segment color mode off. |
int |
getBarDatapointLabelPosition()
Returns the bar data point label position. |
int |
getBarJust()
Returns the justification of bars in bar graph plot objects. |
int |
getBarOrient()
Returns the orientation for bar plots. |
int |
getBarShapeOption()
Returns the plot objects bar shape option: CUBE3D, CYLINDER3D, CONE3D. |
double |
getBarWidth()
Returns the width of bars, in physical coordinates, for bar plots. |
boolean |
getCoordinateSwap()
Returns the plot objects coordinate swap mode. |
double |
getcurvedSurfaceAngleIncrement()
Returns the angle increment for the sides of the cone and cylinder options. |
double |
getCurvedSurfaceAngleStart()
Returns the starting offset degrees for the cone and cylinder option. |
abstract ChartDataset |
getDataset()
An abstract method that must returns a reference to the current dataset. |
int |
getFastClipMode()
Returns the plot objects fast clip mode. |
double |
getFillBaseValue()
Returns the base value, in physical coordinates, of solid (bars and filled areas) plot objects. |
boolean |
getFlatDrawingMode()
Returns the flat drawing mode flag for the object. |
int |
getLabelTemplateDecimalPos()
Returns number of digits to the right of the decimal point in the plotLabelTemplate property. |
int |
getLabelTemplateNumericFormat()
Returns the numeric format of the plotLabelTemplate property. |
int |
getObjectSelectionMode()
Returns the method used to select an object for the mouse listener classes. |
NumericLabel |
getPlotLabelTemplate()
Returns the plot objects data point template. |
ChartAttribute |
getSegmentAttributes(int nsegment)
This method returns a reference to the segment attribute object at the index nsegment. |
boolean |
getSegmentAttributesMode()
This method returns the state of the segment attribute mode. |
ChartAttribute |
getSegmentSymbolAttributes(int index,
ChartSymbol3D chartsymbol)
Gets the graphics attributes for a symbol to the attributes associated with a specific ChartAttribute object in the segmentAttributesArrayList vector. |
boolean |
getShowDatapointValue()
Returns true if the showDatapointValue flag is set true. |
int |
getStepMode()
Returns the plot objects step mode. |
int |
getTargetSymbol()
Returns the symbol type for chart objects that use symbol targets for intersection testing. |
double |
getTargetSymbolSize()
Returns the symbol target size for chart objects that use symbol targets for intersection testing. |
void |
initSegmentAttributes()
Sets all attribute objects in the segmentAttributesVector vector to a copy of the current object attributes. |
void |
initSegmentAttributes(ChartAttribute attrib)
Sets all attribute objects in the segmentAttributesVector vector to a copy of the specified ChartAttribute object. |
void |
initSegmentAttributes(ChartAttribute[] attribs,
GroupDataset dataset)
Sets the size of the segmentAttributesVector vector and initializes it with the specified ChartAttribute objects. |
void |
initSegmentAttributes(ChartAttribute[] attribs,
int nnumsegments)
Sets the size of the segmentAttributesVector vector and initializes it with the specified ChartAttribute objects. |
void |
initSegmentAttributes(ChartAttribute attribs,
GroupDataset dataset)
Sets the size of the segmentAttributesVector vector and initializes it with the specified ChartAttribute object. |
void |
initSegmentAttributes(ChartAttribute attrib,
int nnumsegments)
Sets all attribute objects in the segmentAttributesVector vector to a copy of the specified ChartAttribute object. |
boolean |
isPolygonSelectable()
Returns true if the plot object is polygon selectable. |
void |
prePlot(java.awt.Graphics2D g2)
The prePlot method is called prior to the actual drawing of a plot object. |
void |
resizeSegmentAttributes(int numsegments)
This method resizes the segment attributes vector, usually in response to in a change in the underlying group dataset. |
void |
segmentAttributesSet(int index)
Sets the graphics attributes for the current graphics context to the attributes associated with a specific ChartAttribute object in the segmentAttributesVector vector. |
void |
segmentSymbolAttributesSet(int index,
ChartSymbol chartsymbol)
Sets the graphics attributes for a symbol to the attributes associated with a specific ChartAttribute object in the segmentAttributesVector vector. |
void |
setBarDatapointLabelPosition(int pos)
Bar plots that support the display of data point values have the option of displaying the data points numeric values above the bar, below the bar, or centered in the bar. |
void |
setBarJust(int barjust)
Sets the justification of bars in bar graph plot objects. |
void |
setBarOrient(int barorient)
Sets the orientation for bar plots. |
void |
setBarShapeOption(int value)
Set the plot objects fast clip mode: : CUBE3D, CYLINDER3D, CONE3D. |
void |
setBarWidth(double rwidth)
Sets the width of bars, in physical coordinates, for bar plots. |
void |
setcurvedSurfaceAngleIncrement(double value)
Set the angle increment for the sides of the cone and cylinder options. |
void |
setCurvedSurfaceAngleStart(double value)
Set the starting offset degrees for the cone and cylinder option. |
void |
setFastClipMode(int fastclip)
Sets the plot objects fast clip mode. |
void |
setFillBaseValue(double rbase)
Sets the base value, in physical coordinates, of solid (bars and filled areas) plot objects. |
void |
setFlatDrawingMode(boolean value)
Sets the flat drawing mode flag for the object. |
void |
setLabelTemplateDecimalPos(int ndecplace)
Sets number of digits to the right of the decimal point in the plotLabelTemplate property. |
void |
setLabelTemplateNumericFormat(int nformat)
Sets the numeric format of the plotLabelTemplate property. |
void |
setObjectSelectionMode(int value)
Specifies the method used to select an object for the mouse listener classes. |
void |
setPlotLabelTemplate(NumericLabel numlabel)
Sets the plot objects data point template. |
void |
setSegmentAttributes(int nsegment,
ChartAttribute attrib)
Sets the attribute object at the index nsegment to a copy of the specified ChartAttribute object. |
void |
setSegmentAttributesMode(boolean bmode)
This method turns the segment attribute mode on and off. |
void |
setSegmentColor(int nsegment,
java.awt.Color rgbcolor)
Sets the line and fill color of the attribute object at the index nsegment. |
void |
setSegmentFillColor(int nsegment,
java.awt.Color rgbcolor)
Sets the fill color of the attribute object at the index nsegment. |
void |
setSegmentLineColor(int nsegment,
java.awt.Color rgbcolor)
Sets the line color of the attribute object at the index nsegment. |
void |
setShowDatapointValue(boolean show)
If the plot supports it, this method will turn on the display of data values next to the associated data point. |
void |
setStepMode(int stepmode)
Sets the plot objects step mode. |
void |
setTargetSymbol(int value)
Sets the symbol type for chart objects that use symbol targets for intersection testing. |
void |
setTargetSymbolSize(double value)
Sets the symbol target size for chart objects that use symbol targets for intersection testing. |
| Methods inherited from class com.quinncurtis.chart3djava.ChartObj |
|---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChartPlot()
| Method Detail |
|---|
public int errorCheck(int nerror)
errorCheck in class GraphObjnerror - Current error state
public void copy(ChartPlot source)
source - The source plot object.public void segmentAttributesSet(int index)
index - The index of the ChartAttribute object in the segmentAttributesVector vector.
public void segmentSymbolAttributesSet(int index,
ChartSymbol chartsymbol)
index - The index of the ChartAttribute object in the segmentAttributesVector vector.chartsymbol - The symbol that has its attributes set.
public int createLineFillArrays(double[] xdest,
double[] ydest,
double[] xsource,
double[] ysource,
boolean[] valid,
int numpoints,
int norient)
xdest - Returns an array of x-coordinates for the closed polygon.ydest - Returns an array of y-coordinates for the closed polygon.xsource - The source array for the x-coordinates.ysource - The source array for the y-coordinates.valid - The valid array for the line plot object.numpoints - The number of points in the xsource and ysource arrays.norient - The orientation of the fill. The fill polygon is created using the
fillBaseValue property as either the base of the filled polygon for the y-dimension (VERT_DIR) or
the x-dimension (HORIZ_DIR).
public int createLineFillArrays(double[] xdest,
double[] ydest,
double[] zdest,
double[] xsource,
double[] ysource,
double[] zsource,
boolean[] valid,
int numpoints,
int norient)
xdest - Returns an array of x-coordinates for the closed polygon.ydest - Returns an array of y-coordinates for the closed polygon.zdest - Returns an array of z-coordinates for the closed polygon.xsource - The source array for the x-coordinates.ysource - The source array for the y-coordinates.zsource - The source array for the z-coordinates.valid - The valid array for the line plot object.numpoints - The number of points in the xsource and ysource arrays.norient - The orientation of the fill. The fill polygon is created using the
fillBaseValue property as either the base of the filled polygon for the y-dimension (VERT_DIR) or
the x-dimension (HORIZ_DIR).
public void initSegmentAttributes(ChartAttribute[] attribs,
int nnumsegments)
attribs - An array of ChartAttribute objects, size nnumsegments.nnumsegments - The number of segments. For group plot objects this should be set
to the number of groups. For simple plot objects using the segment color mode this should be set to the number
of data points.
public void initSegmentAttributes(ChartAttribute[] attribs,
GroupDataset dataset)
attribs - An array of ChartAttribute objects, size nnumsegments.dataset - The dataset for the group plot
public void initSegmentAttributes(ChartAttribute attribs,
GroupDataset dataset)
attribs - A ChartAttribute object.dataset - The dataset for the group plotpublic void initSegmentAttributes(ChartAttribute attrib)
attrib - All ChartAttribute objects in the segmentAttrib vector are set equal to a
copy of this attribute.public void initSegmentAttributes()
public void initSegmentAttributes(ChartAttribute attrib,
int nnumsegments)
attrib - All ChartAttribute objects in the segmentAttrib vector are set equal to a
copy of this attribute.nnumsegments - The number of segments. For group plot objects this should be set to
the number of groups. For simple plot objects using the segment color mode this should be set
to the number of data points.public void resizeSegmentAttributes(int numsegments)
numsegments - The number of segments. For group plot objects this should be set to
the number of groups in the new dataset.public ChartAttribute getSegmentAttributes(int nsegment)
nsegment - The index in the segmentAttributesVector vector of the attribute object.
public ChartAttribute getSegmentSymbolAttributes(int index,
ChartSymbol3D chartsymbol)
index - The index of the ChartAttribute object in the segmentAttributesArrayList vector.chartsymbol - The symbol that has its attributes set.
public void setSegmentAttributes(int nsegment,
ChartAttribute attrib)
nsegment - The index in the segmentAttributesVector vector of the attribute object.attrib - The ChartAttribute object at the index nsegment is set to a copy of this object.
public void setSegmentFillColor(int nsegment,
java.awt.Color rgbcolor)
nsegment - The index in the segmentAttributesVector vector of the attribute object.rgbcolor - The fill color of the ChartAttribute object at the index nsegment is set to this value.
public void setSegmentLineColor(int nsegment,
java.awt.Color rgbcolor)
nsegment - The index in the segmentAttributesVector vector of the attribute object.rgbcolor - The line color of the ChartAttribute object at the index nsegment is set to this value.
public void setSegmentColor(int nsegment,
java.awt.Color rgbcolor)
nsegment - The index in the segmentAttributesVector vector of the attribute object.rgbcolor - The line and fill color of the ChartAttribute object at the index nsegment is
set to this value.public void freeSegmentColors()
public void setSegmentAttributesMode(boolean bmode)
bmode - True turns the segment attributes on, false turns it off.public boolean getSegmentAttributesMode()
public void drawBarDatapointValue(java.awt.Graphics2D g2,
double x,
double y,
double z,
ChartRectangle3D barrect)
g2 - Specifies the graphics context.x - The x-value of the datapoint represented by the bar.y - The y-value of the datapoint represented by the barz - The z-value of the datapoint represented by the barbarrect - The rectangle of the bar.
public void drawBarDatapointValue(java.awt.Graphics2D g2,
double x,
double y,
ChartRectangle3D barrect)
g2 - Specifies the graphics context.x - The x-value of the datapoint represented by the bar.y - The y-value of the datapoint represented by the barbarrect - The rectangle of the bar.
public void drawSimpleDatapointValue(java.awt.Graphics2D g2,
double x,
double y,
double z,
double displayvalue1)
g2 - Specifies the graphics context.x - The x-value of the datapoint represented by the bar.y - The y-value of the datapoint represented by the barz - The z-value of the datapoint represented by the bardisplayvalue1 - The numeric value that is displayed next to the data point.
public void drawSimpleDatapointValue(java.awt.Graphics2D g2,
double x,
double y,
double displayvalue1)
g2 - Specifies the graphics context.x - The x-value of the datapoint represented by the bar.y - The y-value of the datapoint represented by the bardisplayvalue1 - The numeric value that is displayed next to the data point.
public boolean checkValidPoint(double x,
double y,
boolean valid)
x - The x-value of the data point.y - The y-value of the data point.valid - The valid data flag of the data point.
public boolean checkIntersection(ChartPoint3D testpoint,
NearestPointData np)
checkIntersection in class GraphObjtestpoint - The test pointnp - Returns nearest point data for assoicated test. *
public void prePlot(java.awt.Graphics2D g2)
prePlot in class GraphObjg2 - The graphics context.
public abstract boolean calcNearestPoint(ChartPoint3D testpoint,
int nmode,
NearestPointData nearestpoint)
testpoint - The test point for the nearness calculation.nmode - Specifies the algorithm used in the nearness calculation.nearestpoint - Returns the xy values of the dataset point nearest the test point.
public abstract ChartDataset getDataset()
public void setBarOrient(int barorient)
barorient - Sets the orientation for bar graphs. Use one of the orientation constants:
HORIZ_DIR or VERT_DIR.public int getBarOrient()
public void setBarWidth(double rwidth)
rwidth - Sets the width of bars, in physical coordinates, for bar plots.public double getBarWidth()
public void setFillBaseValue(double rbase)
rbase - Sets the base value, in physical coordinates, of solid (bars and filled areas)
plot objects.public double getFillBaseValue()
public void setBarJust(int barjust)
barjust - Sets justification of bars in bar graph plot objects. Use one of the
justification constants: JUSTIFY_MIN,JUSTIFY_CENTER,JUSTIFY_MAX.public int getBarJust()
public void setPlotLabelTemplate(NumericLabel numlabel)
numlabel - An instance of an NumericLabel object that has been initialized so that
the font, font size, color and numeric format represent a template for the display of data point
numeric values.public NumericLabel getPlotLabelTemplate()
public void setShowDatapointValue(boolean show)
show - Set to true to turn on the display of data point values.
public boolean getShowDatapointValue()
public void setBarDatapointLabelPosition(int pos)
pos - Sets the bar data point label position.public int getBarDatapointLabelPosition()
public int getLabelTemplateDecimalPos()
public void setLabelTemplateDecimalPos(int ndecplace)
ndecplace - Sets number of digits to the right of the decimal point in the
plotLabelTemplate property.public int getLabelTemplateNumericFormat()
public void setLabelTemplateNumericFormat(int nformat)
nformat - Sets the numeric format of the plotLabelTemplate property.
public int getStepMode()
public void setStepMode(int stepmode)
stepmode - Sets the plot objects step mode. Use one of the line plot
step constants: NO_STEP, STEP_START, STEP_END, or STEP_NO_RISE_LINE.public boolean getCoordinateSwap()
public int getFastClipMode()
public void setFastClipMode(int fastclip)
fastclip - Sets the plot objects step mode. Use one of the fast clip plot constants:
NO_FASTCLIP, FASTCLIP_X, FASTCLIP_Y.public int getBarShapeOption()
public void setBarShapeOption(int value)
value - Set the plot objects bar shape option: CUBE3D, CYLINDER3D, CONE3D.public double getCurvedSurfaceAngleStart()
public void setCurvedSurfaceAngleStart(double value)
value - Sets the starting offset degrees for the cone and cylinder option.public double getcurvedSurfaceAngleIncrement()
public void setcurvedSurfaceAngleIncrement(double value)
value - Set the angle increment for the sides of the cone and cylinder options.public boolean getFlatDrawingMode()
public void setFlatDrawingMode(boolean value)
value - Sets the flat drawing mode flag for the object.public int getObjectSelectionMode()
public void setObjectSelectionMode(int value)
value - Sets the method used to select an object for the mouse listener classes.public boolean isPolygonSelectable()
public double getTargetSymbolSize()
public void setTargetSymbolSize(double value)
value - Sets the symbol target size for chart objects that use symbol targets.public int getTargetSymbol()
public void setTargetSymbol(int value)
value - Sets the symbol type for chart objects that use symbol targets.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||