public class

MultiplePiePlot

extends Plot
implements Serializable Cloneable
java.lang.Object
   ↳ org.jfree.chart.plot.Plot
     ↳ org.jfree.chart.plot.MultiplePiePlot

Class Overview

A plot that displays multiple pie plots using data from a CategoryDataset.

Summary

[Expand]
Inherited Constants
From class org.jfree.chart.plot.Plot
[Expand]
Inherited Fields
From class org.jfree.chart.plot.Plot
Public Constructors
MultiplePiePlot()
Creates a new plot with no data.
MultiplePiePlot(CategoryDataset dataset)
Creates a new plot.
Public Methods
Object clone()
Returns a clone of the plot.
void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a printer).
boolean equals(Object obj)
Tests this plot for equality with an arbitrary object.
Comparable getAggregatedItemsKey()
Returns the key for aggregated items in the pie plots, if there are any.
Paint getAggregatedItemsPaint()
Returns the paint used to draw the pie section representing the aggregated items.
TableOrder getDataExtractOrder()
Returns the data extract order (by row or by column).
CategoryDataset getDataset()
Returns the dataset used by the plot.
Shape getLegendItemShape()
Returns the shape used for legend items.
LegendItemCollection getLegendItems()
Returns a collection of legend items for the pie chart.
double getLimit()
Returns the limit (as a percentage) below which small pie sections are aggregated.
JFreeChart getPieChart()
Returns the pie chart that is used to draw the individual pie plots.
String getPlotType()
Returns a short string describing the type of plot.
void setAggregatedItemsKey(Comparable key)
Sets the key for aggregated items in the pie plots.
void setAggregatedItemsPaint(Paint paint)
Sets the paint used to draw the pie section representing the aggregated items and sends a PlotChangeEvent to all registered listeners.
void setDataExtractOrder(TableOrder order)
Sets the data extract order (by row or by column) and sends a PlotChangeEvent to all registered listeners.
void setDataset(CategoryDataset dataset)
Sets the dataset used by the plot and sends a PlotChangeEvent to all registered listeners.
void setLegendItemShape(Shape shape)
Sets the shape used for legend items and sends a PlotChangeEvent to all registered listeners.
void setLimit(double limit)
Sets the limit below which pie sections are aggregated.
void setPieChart(JFreeChart pieChart)
Sets the chart that is used to draw the individual pie plots.
[Expand]
Inherited Methods
From class org.jfree.chart.plot.Plot
From class java.lang.Object
From interface org.jfree.chart.LegendItemSource
From interface org.jfree.chart.event.AxisChangeListener
From interface org.jfree.chart.event.MarkerChangeListener
From interface org.jfree.data.general.DatasetChangeListener

Public Constructors

public MultiplePiePlot ()

Creates a new plot with no data.

public MultiplePiePlot (CategoryDataset dataset)

Creates a new plot.

Parameters
dataset the dataset (null permitted).

Public Methods

public Object clone ()

Returns a clone of the plot.

Returns
  • A clone.
Throws
CloneNotSupportedException if some component of the plot does not support cloning.

public void draw (Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)

Draws the plot on a Java 2D graphics device (such as the screen or a printer).

Parameters
g2 the graphics device.
area the area within which the plot should be drawn.
anchor the anchor point (null permitted).
parentState the state from the parent plot, if there is one.
info collects info about the drawing.

public boolean equals (Object obj)

Tests this plot for equality with an arbitrary object. Note that the plot's dataset is not considered in the equality test.

Parameters
obj the object (null permitted).
Returns
  • true if this plot is equal to obj, and false otherwise.

public Comparable getAggregatedItemsKey ()

Returns the key for aggregated items in the pie plots, if there are any. The default value is "Other".

Returns
  • The aggregated items key.

public Paint getAggregatedItemsPaint ()

Returns the paint used to draw the pie section representing the aggregated items. The default value is Color.lightGray.

Returns
  • The paint.

public TableOrder getDataExtractOrder ()

Returns the data extract order (by row or by column).

Returns
  • The data extract order (never null).

public CategoryDataset getDataset ()

Returns the dataset used by the plot.

Returns
  • The dataset (possibly null).

public Shape getLegendItemShape ()

Returns the shape used for legend items.

Returns
  • The shape (never null).

public LegendItemCollection getLegendItems ()

Returns a collection of legend items for the pie chart.

Returns
  • The legend items.

public double getLimit ()

Returns the limit (as a percentage) below which small pie sections are aggregated.

Returns
  • The limit percentage.

public JFreeChart getPieChart ()

Returns the pie chart that is used to draw the individual pie plots. Note that there are some attributes on this chart instance that will be ignored at rendering time (for example, legend item settings).

Returns
  • The pie chart (never null).

public String getPlotType ()

Returns a short string describing the type of plot.

Returns
  • The plot type.

public void setAggregatedItemsKey (Comparable key)

Sets the key for aggregated items in the pie plots. You must ensure that this doesn't clash with any keys in the dataset.

Parameters
key the key (null not permitted).

public void setAggregatedItemsPaint (Paint paint)

Sets the paint used to draw the pie section representing the aggregated items and sends a PlotChangeEvent to all registered listeners.

Parameters
paint the paint (null not permitted).

public void setDataExtractOrder (TableOrder order)

Sets the data extract order (by row or by column) and sends a PlotChangeEvent to all registered listeners.

Parameters
order the order (null not permitted).

public void setDataset (CategoryDataset dataset)

Sets the dataset used by the plot and sends a PlotChangeEvent to all registered listeners.

Parameters
dataset the dataset (null permitted).

public void setLegendItemShape (Shape shape)

Sets the shape used for legend items and sends a PlotChangeEvent to all registered listeners.

Parameters
shape the shape (null not permitted).

public void setLimit (double limit)

Sets the limit below which pie sections are aggregated. Set this to 0.0 if you don't want any aggregation to occur.

Parameters
limit the limit percent.

public void setPieChart (JFreeChart pieChart)

Sets the chart that is used to draw the individual pie plots. The chart's plot must be an instance of PiePlot.

Parameters
pieChart the pie chart (null not permitted).
See Also