All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.swing.JPieChart

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----javax.swing.JComponent
                           |
                           +----JSci.swing.JDoubleBufferedComponent
                                   |
                                   +----JSci.swing.JCategoryGraph2D
                                           |
                                           +----JSci.swing.JPieChart

public class JPieChart
extends JCategoryGraph2D
A pie chart Swing component.


Constructor Index

 o JPieChart(CategoryGraph2DModel)
Constructs a pie chart.

Method Index

 o dataChanged(GraphDataEvent)
Implementation of GraphDataListener.
 o getMinimumSize()
Returns the minimum size of this component.
 o getPreferredSize()
Returns the preferred size of this component.
 o offscreenPaint(Graphics)
Paint the graph.
 o setBounds(int, int, int, int)
Reshapes the JPieChart to the specified bounding box.
 o setColor(int, Color)
Sets the slice color of the nth slice.

Constructors

 o JPieChart
 public JPieChart(CategoryGraph2DModel cgm)
Constructs a pie chart.

Methods

 o dataChanged
 public void dataChanged(GraphDataEvent e)
Implementation of GraphDataListener.

Overrides:
dataChanged in class JCategoryGraph2D
 o setColor
 public void setColor(int n,
                      Color c)
Sets the slice color of the nth slice.

Parameters:
n - the index of the slice
c - the slice color
 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of this component.

Overrides:
getPreferredSize in class JComponent
 o getMinimumSize
 public Dimension getMinimumSize()
Returns the minimum size of this component.

Overrides:
getMinimumSize in class JComponent
 o setBounds
 public void setBounds(int x,
                       int y,
                       int width,
                       int height)
Reshapes the JPieChart to the specified bounding box.

Overrides:
setBounds in class Component
 o offscreenPaint
 protected void offscreenPaint(Graphics g)
Paint the graph.

Overrides:
offscreenPaint in class JDoubleBufferedComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index