public class MultiplePiePlot extends Plot implements java.lang.Cloneable, java.io.Serializable
CategoryDataset.| Modifier and Type | Field and Description |
|---|---|
private java.lang.Comparable |
aggregatedItemsKey
The key for the aggregated items.
|
private java.awt.Paint |
aggregatedItemsPaint
The paint for the aggregated items.
|
private org.jfree.util.TableOrder |
dataExtractOrder
The data extract order (by row or by column).
|
private CategoryDataset |
dataset
The dataset.
|
private java.awt.Shape |
legendItemShape
The legend item shape (never null).
|
private double |
limit
The pie section limit percentage.
|
private JFreeChart |
pieChart
The chart object that draws the individual pie charts.
|
private java.util.Map |
sectionPaints
The colors to use for each section.
|
private static long |
serialVersionUID
For serialization.
|
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_LEGEND_ITEM_BOX, DEFAULT_LEGEND_ITEM_CIRCLE, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO| Constructor and Description |
|---|
MultiplePiePlot()
Creates a new plot with no data.
|
MultiplePiePlot(CategoryDataset dataset)
Creates a new plot.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a clone of the plot.
|
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area,
java.awt.geom.Point2D anchor,
PlotState parentState,
PlotRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a
printer).
|
boolean |
equals(java.lang.Object obj)
Tests this plot for equality with an arbitrary object.
|
java.lang.Comparable |
getAggregatedItemsKey()
Returns the key for aggregated items in the pie plots, if there are any.
|
java.awt.Paint |
getAggregatedItemsPaint()
Returns the paint used to draw the pie section representing the
aggregated items.
|
org.jfree.util.TableOrder |
getDataExtractOrder()
Returns the data extract order (by row or by column).
|
CategoryDataset |
getDataset()
Returns the dataset used by the plot.
|
LegendItemCollection |
getLegendItems()
Returns a collection of legend items for the pie chart.
|
java.awt.Shape |
getLegendItemShape()
Returns the shape used for legend items.
|
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.
|
java.lang.String |
getPlotType()
Returns a short string describing the type of plot.
|
private void |
prefetchSectionPaints()
For each key in the dataset, check the
sectionPaints
cache to see if a paint is associated with that key and, if not,
fetch one from the drawing supplier. |
private void |
readObject(java.io.ObjectInputStream stream)
Provides serialization support.
|
void |
setAggregatedItemsKey(java.lang.Comparable key)
Sets the key for aggregated items in the pie plots.
|
void |
setAggregatedItemsPaint(java.awt.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(org.jfree.util.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(java.awt.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.
|
private void |
writeObject(java.io.ObjectOutputStream stream)
Provides serialization support.
|
addChangeListener, annotationChanged, axisChanged, createAndAddEntity, datasetChanged, drawBackground, drawBackgroundImage, drawNoDataMessage, drawOutline, fillBackground, fillBackground, fireChangeEvent, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRectX, getRectY, getRootPlot, handleClick, isNotify, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setDatasetGroup, setDrawingSupplier, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setNotify, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent, zoomprivate static final long serialVersionUID
private JFreeChart pieChart
private CategoryDataset dataset
private org.jfree.util.TableOrder dataExtractOrder
private double limit
private java.lang.Comparable aggregatedItemsKey
private transient java.awt.Paint aggregatedItemsPaint
private transient java.util.Map sectionPaints
private transient java.awt.Shape legendItemShape
public MultiplePiePlot()
public MultiplePiePlot(CategoryDataset dataset)
dataset - the dataset (null permitted).public CategoryDataset getDataset()
null).public void setDataset(CategoryDataset dataset)
PlotChangeEvent
to all registered listeners.dataset - the dataset (null permitted).public JFreeChart getPieChart()
null).setPieChart(JFreeChart)public void setPieChart(JFreeChart pieChart)
PiePlot.pieChart - the pie chart (null not permitted).getPieChart()public org.jfree.util.TableOrder getDataExtractOrder()
null).public void setDataExtractOrder(org.jfree.util.TableOrder order)
PlotChangeEvent to all registered listeners.order - the order (null not permitted).public double getLimit()
public void setLimit(double limit)
limit - the limit percent.public java.lang.Comparable getAggregatedItemsKey()
public void setAggregatedItemsKey(java.lang.Comparable key)
key - the key (null not permitted).public java.awt.Paint getAggregatedItemsPaint()
Color.lightGray.public void setAggregatedItemsPaint(java.awt.Paint paint)
PlotChangeEvent to all registered listeners.paint - the paint (null not permitted).public java.lang.String getPlotType()
getPlotType in class Plotpublic java.awt.Shape getLegendItemShape()
null).setLegendItemShape(Shape)public void setLegendItemShape(java.awt.Shape shape)
PlotChangeEvent
to all registered listeners.shape - the shape (null not permitted).getLegendItemShape()public void draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area,
java.awt.geom.Point2D anchor,
PlotState parentState,
PlotRenderingInfo info)
private void prefetchSectionPaints()
sectionPaints
cache to see if a paint is associated with that key and, if not,
fetch one from the drawing supplier. These colors are cached so that
the legend and all the subplots use consistent colors.public LegendItemCollection getLegendItems()
getLegendItems in interface LegendItemSourcegetLegendItems in class Plotpublic boolean equals(java.lang.Object obj)
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
private void writeObject(java.io.ObjectOutputStream stream)
throws java.io.IOException
stream - the output stream.java.io.IOException - if there is an I/O error.private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
stream - the input stream.java.io.IOException - if there is an I/O error.java.lang.ClassNotFoundException - if there is a classpath problem.