|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The common interface that all chart objects must implement.
| Method Summary | |
boolean |
contains(java.awt.Point p)
Scans the available segments within the chart in sequence, to see if the Point p is contained within the area of one of those segments. |
java.awt.Rectangle |
getChartSize()
|
java.awt.Font |
getFont()
Returns the current chart font |
java.lang.String |
getLabel(int i)
Fetches a text label from the the array of labels held by the chart |
double |
getRelativeTextSize()
Gets the current text size setting for the chart. |
java.awt.Dimension |
getSize()
Deprecated. Now replaced by getArea() |
double |
getValue(int i)
Fetches a value from the array of values contained within the chart. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Used to send a mouse event to the chart for action when a mouse is moved |
void |
mouseReleased(java.awt.event.MouseEvent e)
An action that is performed by the chart when the mouse button is released within the applet window. |
void |
paint(java.awt.Graphics g)
The paint() method takes a Graphics instance which represents the
screen area
(or an off screen area if double buffering is used. |
void |
setColorArray(java.awt.Color[] colorArray)
Sets the current range of values associated with the segments in the Chart |
void |
setFont(java.awt.Font f)
Sets the font for the current chart |
void |
setRelativeTextSize(double size)
Sets the relative size of the text to be displayed on the chart. |
java.lang.String |
toString()
Returns a string representation of the chart containing key information. |
| Method Detail |
public void paint(java.awt.Graphics g)
paint() method takes a Graphics instance which represents the
screen area
(or an off screen area if double buffering is used. This is passed to the
individual chart segments to enable them to draw themselves.g - A Graphics instance for the current screen display (or an offscreen
buffer if double buffering is used).public boolean contains(java.awt.Point p)
p - A point within the chart areapublic java.awt.Dimension getSize()
public java.lang.String toString()
toString in class java.lang.Objectpublic double getValue(int i)
i - An integer indicating which value to return from the array of values
held by the chart.java.lang.IndexOutOfBoundsException - public java.lang.String getLabel(int i)
i - An integer representing the position within the chart's label arraypublic void mouseMoved(java.awt.event.MouseEvent e)
e - A MouseEvent containing information about the current mouse action.public void mouseReleased(java.awt.event.MouseEvent e)
e - A MouseEvent holding information about the current mouse action.public void setRelativeTextSize(double size)
size - The default setting is 1 which represents a scale of 100%. 0.5
would be 50% and 2 would be 200%.public double getRelativeTextSize()
public java.awt.Font getFont()
public void setFont(java.awt.Font f)
f - The required fontpublic java.awt.Rectangle getChartSize()
public void setColorArray(java.awt.Color[] colorArray)
colorArray[] -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||