org.jfree.chart.plot

Class PiePlot3D

Implemented Interfaces:
Cloneable, EventListener, PublicCloneable, Serializable, AxisChangeListener, DatasetChangeListener, LegendItemSource, MarkerChangeListener

public class PiePlot3D
extends PiePlot
implements Serializable

A plot that displays data in the form of a 3D pie chart, using data from any class that implements the PieDataset interface.

Although this class extends PiePlot, it does not currently support exploded sections.

Field Summary

Fields inherited from class org.jfree.chart.plot.PiePlot

DEFAULT_INTERIOR_GAP, DEFAULT_LABEL_BACKGROUND_PAINT, DEFAULT_LABEL_FONT, DEFAULT_LABEL_OUTLINE_PAINT, DEFAULT_LABEL_OUTLINE_STROKE, DEFAULT_LABEL_PAINT, DEFAULT_LABEL_SHADOW_PAINT, DEFAULT_MINIMUM_ARC_ANGLE_TO_DRAW, DEFAULT_START_ANGLE, MAX_INTERIOR_GAP, localizationResources

Fields inherited from class org.jfree.chart.plot.Plot

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 Summary

PiePlot3D()
Creates a new instance with no dataset.
PiePlot3D(PieDataset dataset)
Creates a pie chart with a three dimensional effect using the specified dataset.

Method Summary

void
draw(Graphics2D g2, Rectangle2D plotArea, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a printer).
protected void
drawSide(Graphics2D g2, Rectangle2D plotArea, Arc2D arc, Area front, Area back, Paint paint, Paint outlinePaint, Stroke outlineStroke, boolean drawFront, boolean drawBack)
Draws the side of a pie section.
boolean
equals(Object obj)
Tests this plot for equality with an arbitrary object.
double
getDepthFactor()
Returns the depth factor for the chart.
String
getPlotType()
Returns a short string describing the type of plot.
void
setDepthFactor(double factor)
Sets the pie depth as a percentage of the height of the plot area, and sends a PlotChangeEvent to all registered listeners.

Methods inherited from class org.jfree.chart.plot.PiePlot

clone, draw, drawItem, drawLabels, drawLeftLabel, drawLeftLabels, drawPie, drawRightLabel, drawRightLabels, equals, getArcBounds, getBaseSectionOutlinePaint, getBaseSectionOutlineStroke, getBaseSectionPaint, getDataset, getDirection, getExplodePercent, getExplodePercent, getIgnoreNullValues, getIgnoreZeroValues, getInteriorGap, getLabelBackgroundPaint, getLabelFont, getLabelGap, getLabelGenerator, getLabelLinkMargin, getLabelLinkPaint, getLabelLinkStroke, getLabelLinksVisible, getLabelOutlinePaint, getLabelOutlineStroke, getLabelPaint, getLabelShadowPaint, getLegendItemShape, getLegendItems, getLegendLabelGenerator, getLegendLabelToolTipGenerator, getLegendLabelURLGenerator, getMaximumExplodePercent, getMaximumLabelWidth, getMinimumArcAngleToDraw, getPieIndex, getPlotType, getSectionKey, getSectionOutlinePaint, getSectionOutlinePaint, getSectionOutlinePaint, getSectionOutlineStroke, getSectionOutlineStroke, getSectionOutlineStroke, getSectionOutlinesVisible, getSectionPaint, getSectionPaint, getSectionPaint, getShadowPaint, getShadowXOffset, getShadowYOffset, getStartAngle, getToolTipGenerator, getURLGenerator, initialise, isCircular, lookupSectionOutlinePaint, lookupSectionOutlinePaint, lookupSectionOutlineStroke, lookupSectionOutlineStroke, lookupSectionPaint, lookupSectionPaint, setBaseSectionOutlinePaint, setBaseSectionOutlineStroke, setBaseSectionPaint, setCircular, setCircular, setDataset, setDirection, setExplodePercent, setExplodePercent, setIgnoreNullValues, setIgnoreZeroValues, setInteriorGap, setLabelBackgroundPaint, setLabelFont, setLabelGap, setLabelGenerator, setLabelLinkMargin, setLabelLinkPaint, setLabelLinkStroke, setLabelLinksVisible, setLabelOutlinePaint, setLabelOutlineStroke, setLabelPaint, setLabelShadowPaint, setLegendItemShape, setLegendLabelGenerator, setLegendLabelToolTipGenerator, setLegendLabelURLGenerator, setMaximumLabelWidth, setMinimumArcAngleToDraw, setPieIndex, setSectionOutlinePaint, setSectionOutlinePaint, setSectionOutlinePaint, setSectionOutlineStroke, setSectionOutlineStroke, setSectionOutlineStroke, setSectionOutlinesVisible, setSectionPaint, setSectionPaint, setSectionPaint, setShadowPaint, setShadowXOffset, setShadowYOffset, setStartAngle, setToolTipGenerator, setURLGenerator, zoom

Methods inherited from class org.jfree.chart.plot.Plot

addChangeListener, axisChanged, clone, datasetChanged, draw, drawBackground, drawBackgroundImage, drawNoDataMessage, drawOutline, equals, fillBackground, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getLegendItems, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getPlotType, getRectX, getRectY, getRootPlot, handleClick, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setDatasetGroup, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setOutlinePaint, setOutlineStroke, setParent, zoom

Constructor Details

PiePlot3D

public PiePlot3D()
Creates a new instance with no dataset.

PiePlot3D

public PiePlot3D(PieDataset dataset)
Creates a pie chart with a three dimensional effect using the specified dataset.
Parameters:
dataset - the dataset (null permitted).

Method Details

draw

public void draw(Graphics2D g2,
                 Rectangle2D plotArea,
                 Point2D anchor,
                 PlotState parentState,
                 PlotRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a printer). This method is called by the JFreeChart class, you don't normally need to call it yourself.
Overrides:
draw in interface PiePlot
Parameters:
g2 - the graphics device.
plotArea - the area within which the plot should be drawn.
anchor - the anchor point.
parentState - the state from the parent plot, if there is one.
info - collects info about the drawing (null permitted).

drawSide

protected void drawSide(Graphics2D g2,
                        Rectangle2D plotArea,
                        Arc2D arc,
                        Area front,
                        Area back,
                        Paint paint,
                        Paint outlinePaint,
                        Stroke outlineStroke,
                        boolean drawFront,
                        boolean drawBack)
Draws the side of a pie section.
Parameters:
g2 - the graphics device.
plotArea - the plot area.
arc - the arc.
front - the front of the pie.
back - the back of the pie.
paint - the color.
outlinePaint - the outline paint.
outlineStroke - the outline stroke.
drawFront - draw the front?
drawBack - draw the back?

equals

public boolean equals(Object obj)
Tests this plot for equality with an arbitrary object.
Overrides:
equals in interface PiePlot
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

getDepthFactor

public double getDepthFactor()
Returns the depth factor for the chart.
Returns:
The depth factor.

getPlotType

public String getPlotType()
Returns a short string describing the type of plot.
Overrides:
getPlotType in interface PiePlot
Returns:
Pie 3D Plot.

setDepthFactor

public void setDepthFactor(double factor)
Sets the pie depth as a percentage of the height of the plot area, and sends a PlotChangeEvent to all registered listeners.
Parameters:
factor - the depth factor (for example, 0.20 is twenty percent).