|
|||||||||
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.ChartSymbol
public class ChartSymbol
The ChartSymbol class creates scatter plot symbols in the SimpleScatterPlot, LineMarkerPlot, PolarScatterPlot, and DataCursor plot types. The symbols are create as GeneralPath objects.
Field Summary |
---|
Constructor Summary | |
---|---|
ChartSymbol()
The default ChartSymbol constructor. |
|
ChartSymbol(PhysicalCoordinates transform)
This constructor creates a new ChartSymbol object using the specified scale, GeneralPath and attributes. |
|
ChartSymbol(PhysicalCoordinates transform,
java.awt.geom.GeneralPath symbolshape,
ChartAttribute attrib)
This constructor creates a new ChartSymbol object using the specified scale, GeneralPath and attributes. |
|
ChartSymbol(PhysicalCoordinates transform,
int nsymbol,
ChartAttribute attrib)
This constructor creates a new ChartSymbol object using the specified scale, symbol and attributes. |
Method Summary | |
---|---|
java.awt.Shape |
calcSymbolShape(int nsymbol)
Returns the GeneralPath object represented by the specified symbol value. |
boolean |
checkIntersection(ChartPoint2D testpoint,
NearestPointData np)
The checkIntersection method. |
java.lang.Object |
clone()
Returns an object that is a clone of this ChartSymbol object. |
void |
copy(ChartSymbol source)
Copies the source ChartSymbol object. |
void |
draw(java.awt.Graphics2D g2)
The draw method for this class. |
int |
errorCheck(int nerror)
Checks the ChartSymbol object for common errors. |
java.awt.Shape |
getCircleShape()
Returns the shape object represented by the symbol value CIRCLE. |
java.awt.Shape |
getCrossShape()
Returns the shape object represented by the symbol value CROSS. |
java.awt.Shape |
getDiamondShape()
Returns the shape object represented by the symbol value DIAMOND. |
java.awt.Shape |
getDownTriangleShape()
Returns the shape object represented by the symbol value DOWNTRIANGLE. |
java.awt.Shape |
getHBarShape()
Returns the shape object represented by the symbol value HBAR. |
java.awt.geom.Line2D |
getLineShape()
Returns the shape object represented by the symbol value LINE. |
java.awt.Shape |
getNoSymbolShape()
Returns the shape object represented by the symbol value NOSYMBOL. |
java.awt.Shape |
getPlusShape()
Returns the shape object represented by the symbol value PULSE. |
java.awt.Shape |
getSquareShape()
Returns the shape object represented by the symbol value SQUARE. |
java.awt.Shape |
getStarShape()
Returns the shape object represented by the symbol value STAR. |
int |
getSymbolNumber()
Returns the symbol number. |
double |
getSymbolRotation()
Returns the symbol rotation of an ChartSymbol object. |
java.awt.Shape |
getSymbolShape()
Returns the GeneralPath of the current symbol. |
double |
getSymbolSize()
Returns the symbol size of an ChartSymbol object. |
java.awt.Shape |
getUpTriangleShape()
Returns the shape object represented by the symbol value UPTRIANGLE. |
java.awt.Shape |
getVBarShape()
Returns the shape object represented by the symbol value VBAR. |
void |
initChartSymbol(int nsymbol,
ChartAttribute attrib)
This method initializes the properties of a chart symbol. |
void |
setSymbolNumber(int symbol)
Sets the symbol number. |
void |
setSymbolRotation(double value)
Sets the symbol rotation of an ChartSymbol object. |
void |
setSymbolShape(java.awt.geom.GeneralPath shape)
Sets the GeneralPath of the current symbol. |
void |
setSymbolSize(double size)
Sets the symbol size of an ChartSymbol object. |
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 ChartSymbol()
public ChartSymbol(PhysicalCoordinates transform)
transform
- The symbol object is placed in the coordinate system defined by transform.public ChartSymbol(PhysicalCoordinates transform, java.awt.geom.GeneralPath symbolshape, ChartAttribute attrib)
transform
- The symbol object is placed in the coordinate system defined by transform.symbolshape
- A reference to a GeneralPath object.attrib
- Specifies the attributes (line and fill color) for the symbol.public ChartSymbol(PhysicalCoordinates transform, int nsymbol, ChartAttribute attrib)
transform
- The symbol object is placed in the coordinate system defined by transform.nsymbol
- The symbol number. Use one of chart symbol constants: NOSYMBOL, SQUARE, TRIANGLE,
DIAMOND,CROSS , PLUS,STAR ,LINE,HBAR, VBAR,BAR3D, and CIRCLE.attrib
- Specifies the attributes (line and fill color) for the symbol.Method Detail |
---|
public java.awt.Shape calcSymbolShape(int nsymbol)
nsymbol
- The symbol number.
public boolean checkIntersection(ChartPoint2D testpoint, NearestPointData np)
checkIntersection
in class GraphObj
testpoint
- The test pointnp
- Nearest point information for data based objects.
public java.lang.Object clone()
clone
in class GraphObj
public void copy(ChartSymbol source)
source
- The source ChartSymbol object.public void draw(java.awt.Graphics2D g2)
draw
in class GraphObj
g2
- The graphics context.public int errorCheck(int nerror)
errorCheck
in class GraphObj
nerror
- Current error state
public java.awt.Shape getCircleShape()
public java.awt.Shape getCrossShape()
public java.awt.Shape getDiamondShape()
public java.awt.Shape getDownTriangleShape()
public java.awt.Shape getHBarShape()
public java.awt.geom.Line2D getLineShape()
public java.awt.Shape getNoSymbolShape()
public java.awt.Shape getPlusShape()
public java.awt.Shape getSquareShape()
public java.awt.Shape getStarShape()
public int getSymbolNumber()
public double getSymbolRotation()
public java.awt.Shape getSymbolShape()
public double getSymbolSize()
public java.awt.Shape getUpTriangleShape()
public java.awt.Shape getVBarShape()
public void initChartSymbol(int nsymbol, ChartAttribute attrib)
nsymbol
- The symbol number. Use one of chart symbol constants: NOSYMBOL, SQUARE, TRIANGLE,
DIAMOND,CROSS , PLUS,STAR ,LINE,HBAR, VBAR,BAR3D, and CIRCLE.attrib
- Specifies the attributes (line and fill color) for the symbol.public void setSymbolNumber(int symbol)
symbol
- Sets the symbol number.public void setSymbolRotation(double value)
value
- The symbol rotation, measured in degrees.public void setSymbolShape(java.awt.geom.GeneralPath shape)
shape
- Sets the GeneralPath of the current symbol.public void setSymbolSize(double size)
size
- The symbol size, measured in window device coordinates, sets the field symbolSize.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |