khartzToolz
Class Khartz3DPie

java.lang.Object
  |
  +--khartzToolz.KhartzBaseChart
        |
        +--khartzToolz.KhartzPie
              |
              +--khartzToolz.Khartz3DPie
All Implemented Interfaces:
KhartzChart

public class Khartz3DPie
extends khartzToolz.KhartzPie


Field Summary
 khartzToolz.PieSegment[] pieSegments
           
 
Constructor Summary
Khartz3DPie(double[] v, java.lang.String[] l, java.util.Date[] date, java.awt.Rectangle size, java.lang.String title, java.awt.Color[] colorArray)
           
 
Method Summary
 void addSegment(int i, int angleCurrent, int ang)
           
 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.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()
 void mouseMoved(java.awt.event.MouseEvent e)
          Called by the host application when the mouse is moved within the chart.
 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 moveTo(java.awt.Point p)
           
 void paint(java.awt.Graphics g)
          Draws the current chart to the Graphics object g.
 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.
 void sortSegments()
          Sorts the segments into a drawing order.
 java.lang.String toString()
          Returns a String representation of the current pie chart object.
 
Methods inherited from class khartzToolz.KhartzBaseChart
getBottomMargin, getChartMargin, getChartSize, getChartTitle, getColorArray, getLabels, getLeftMargin, getMaxValue, getMinValue, getRightMargin, getTextFont, getTopMargin, getValue, getValues, getVersionMessage, setBottomMargin, setChartMargin, setChartSize, setChartTitle, setLabels, setLeftMargin, setRightMargin, setTextFont, setTopMargin, setValues, setVersionMessage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface khartzToolz.KhartzChart
getChartSize, getValue
 

Field Detail

pieSegments

public khartzToolz.PieSegment[] pieSegments
Constructor Detail

Khartz3DPie

public Khartz3DPie(double[] v,
                   java.lang.String[] l,
                   java.util.Date[] date,
                   java.awt.Rectangle size,
                   java.lang.String title,
                   java.awt.Color[] colorArray)
Parameters:
v[] -  
l[] -  
date[] -  
size -  
title -  
colorArray[] -  
Since:
30/12/2002
Method Detail

paint

public void paint(java.awt.Graphics g)
Description copied from class: khartzToolz.KhartzPie
Draws the current chart to the Graphics object g.
Overrides:
paint in class khartzToolz.KhartzPie
Parameters:
g -  
Since:
30/12/2002

addSegment

public void addSegment(int i,
                       int angleCurrent,
                       int ang)
Overrides:
addSegment in class khartzToolz.KhartzPie
Parameters:
i -  
angleCurrent -  
ang -  
Since:
30/12/2002

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Description copied from class: khartzToolz.KhartzPie
Called by the host application when the mouse is moved within the chart.
Overrides:
mouseMoved in class khartzToolz.KhartzPie
Parameters:
e -  
Since:
30/12/2002

moveTo

public void moveTo(java.awt.Point p)
Parameters:
p - The new location to move a chart segment to.
Since:
30/12/2002

contains

public boolean contains(java.awt.Point p)
Description copied from interface: KhartzChart
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.
Specified by:
contains in interface KhartzChart
Parameters:
p - An x,y coordinate on the screen area.
Returns:
boolean
Since:
30/12/2002

toString

public java.lang.String toString()
Returns a String representation of the current pie chart object.
Specified by:
toString in interface KhartzChart
Overrides:
toString in class java.lang.Object
Returns:
A String containing the number of values and the position of the chart.
Since:
30/12/2002

getSize

public java.awt.Dimension getSize()
Deprecated. Now replaced by getArea()

Specified by:
getSize in interface KhartzChart
Returns:
java.awt.Dimension
Since:
30/12/2002

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Description copied from interface: KhartzChart
An action that is performed by the chart when the mouse button is released within the applet window.
Specified by:
mouseReleased in interface KhartzChart
Parameters:
e -  
Since:
30/12/2002

setRelativeTextSize

public void setRelativeTextSize(double size)
Sets the relative size of the text to be displayed on the chart. Font sizes are set by the chart relative to it's width and height in pixels. This gives the additional control required where very large or small charts are being used.
Specified by:
setRelativeTextSize in interface KhartzChart
Parameters:
size - Sets the relative text size to be displayed on the chart. 1 represents 100% and 0.5 and 2 would be 50% and 200% reprectively.
Since:
30/12/2002

getRelativeTextSize

public double getRelativeTextSize()
Description copied from interface: KhartzChart
Gets the current text size setting for the chart. 1 is the default.
Specified by:
getRelativeTextSize in interface KhartzChart
Returns:
double
Since:
30/12/2002

sortSegments

public void sortSegments()
Sorts the segments into a drawing order. This is necessary with pie charts to ensure that the segments do not overdraw each other on the screen and that the segments are drawn from the back to the front within the chart.
Since:
30/12/2002

getLabel

public java.lang.String getLabel(int i)
Description copied from interface: KhartzChart
Fetches a text label from the the array of labels held by the chart
Specified by:
getLabel in interface KhartzChart
Overrides:
getLabel in class KhartzBaseChart
Parameters:
i -  
Returns:
String
Since:
30/12/2002

getFont

public java.awt.Font getFont()
Description copied from interface: KhartzChart
Returns the current chart font
Specified by:
getFont in interface KhartzChart
Returns:
java.awt.Font
Since:
30/12/2002

setFont

public void setFont(java.awt.Font f)
Description copied from interface: KhartzChart
Sets the font for the current chart
Specified by:
setFont in interface KhartzChart
Parameters:
f -  
Since:
30/12/2002

setColorArray

public void setColorArray(java.awt.Color[] colorArray)
Description copied from interface: KhartzChart
Sets the current range of values associated with the segments in the Chart
Specified by:
setColorArray in interface KhartzChart
Overrides:
setColorArray in class KhartzBaseChart
Parameters:
colorArray[] -  
Since:
30/12/2002