    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class JSci.awt.PieChart

    java.lang.Object
       |
       +----java.awt.Component
               |
               +----java.awt.Canvas
                       |
                       +----JSci.awt.DoubleBufferedCanvas
                               |
                               +----JSci.awt.CategoryGraph2D
                                       |
                                       +----JSci.awt.PieChart

public class PieChart
extends CategoryGraph2D

A pie chart AWT component.

##

PieChart(CategoryGraph2DModel)
  Constructs a pie chart.

##

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

##

PieChart

     public PieChart(CategoryGraph2DModel cgm)

  Constructs a pie chart.

##

dataChanged

     public void dataChanged(GraphDataEvent e)

  Implementation of GraphDataListener.

  Overrides:
    dataChanged in class CategoryGraph2D

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

getPreferredSize

     public Dimension getPreferredSize()

  Returns the preferred size of this component.

  Overrides:
    getPreferredSize in class Component

getMinimumSize

     public Dimension getMinimumSize()

  Returns the minimum size of this component.

  Overrides:
    getMinimumSize in class Component

setBounds

     public void setBounds(int x,
                           int y,
                           int width,
                           int height)

  Reshapes the PieChart to the specified bounding box.

  Overrides:
    setBounds in class Component

offscreenPaint

     protected void offscreenPaint(Graphics g)

  Paint the graph.

  Overrides:
    offscreenPaint in class DoubleBufferedCanvas

    All Packages  Class Hierarchy  This Package  Previous  Next  Index