All Packages Class Hierarchy This Package Previous Next Index
Class jclass.chart.JCShape
java.lang.Object
|
+----jclass.chart.JCShape
- public abstract class JCShape
- extends Object
JCShape is an abstract base class used for defining custom
point styles in Chart. To create a new shape class, extend
JCShape and provide a resize) method. The resize() method
must populate the x[] and y[] arrays with point values for
the shape to be drawn. The point values are relative to
(0,0). Chart will automatically move the shape to the
appropriate location.
-
size
- Size of the point.
-
x
- Array of x values
-
y
- Array of y values
-
JCShape()
-
-
draw(Graphics, int, int)
- Draws the point at the specified coordinates
-
resize(int)
-
Method used for populating the x[] and y[] arrays based on the
provided size.
size
protected int size
- Size of the point. Used inside resize() to populate x[] and y[]
x
protected int x[]
- Array of x values
y
protected int y[]
- Array of y values
JCShape
public JCShape()
resize
protected abstract void resize(int sz)
- Method used for populating the x[] and y[] arrays based on the
provided size.
- Parameters:
- sz - value to be assigned to size member variable.
draw
public void draw(Graphics gc,
int xorg,
int yorg)
- Draws the point at the specified coordinates
- Parameters:
- gc - graphics context to use for drawing
- xorg - x origin point
- yorg - y origin point
All Packages Class Hierarchy This Package Previous Next Index