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.


Variable Index

 o size
Size of the point.
 o x
Array of x values
 o y
Array of y values

Constructor Index

 o JCShape()

Method Index

 o draw(Graphics, int, int)
Draws the point at the specified coordinates
 o resize(int)
Method used for populating the x[] and y[] arrays based on the provided size.

Variables

 o size
 protected int size
Size of the point. Used inside resize() to populate x[] and y[]

 o x
 protected int x[]
Array of x values

 o y
 protected int y[]
Array of y values

Constructors

 o JCShape
 public JCShape()

Methods

 o 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.
 o 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