org.jfree.chart.plot

## Class PiePlot3D

- java.lang.Object
- - org.jfree.chart.plot.Plot
  - - org.jfree.chart.plot.PiePlot
    - - org.jfree.chart.plot.PiePlot3D

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.util.EventListener, AnnotationChangeListener, AxisChangeListener, MarkerChangeListener, LegendItemSource, DatasetChangeListener, org.jfree.util.PublicCloneable

    public class PiePlot3D
    extends PiePlot
    implements java.io.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.

See Also:
  Serialized Form

### 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, localizationResources, MAX_INTERIOR_GAP`

### 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

Constructors
Constructor and Description
`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

Methods
`void` `draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, 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).
`protected void` `drawSide(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Arc2D arc, java.awt.geom.Area front, java.awt.geom.Area back, java.awt.Paint paint, java.awt.Paint outlinePaint, java.awt.Stroke outlineStroke, boolean drawFront, boolean drawBack)` Draws the side of a pie section.
`boolean` `equals(java.lang.Object obj)` Tests this plot for equality with an arbitrary object.
`boolean` `getDarkerSides()` Returns a flag that controls whether or not the sides of the pie chart are rendered using a darker colour.
`double` `getDepthFactor()` Returns the depth factor for the chart.
`java.lang.String` `getPlotType()` Returns a short string describing the type of plot.
`void` `setDarkerSides(boolean darker)` Sets a flag that controls whether or not the sides of the pie chart are rendered using a darker colour, and sends a `PlotChangeEvent` to all registered listeners.
`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

`clearSectionOutlinePaints, clearSectionOutlineStrokes, clearSectionPaints, clone, drawItem, drawLabels, drawLeftLabel, drawLeftLabels, drawPie, drawRightLabel, drawRightLabels, drawSimpleLabels, getArcBounds, getArcCenter, getAutoPopulateSectionOutlinePaint, getAutoPopulateSectionOutlineStroke, getAutoPopulateSectionPaint, getBaseSectionOutlinePaint, getBaseSectionOutlineStroke, getBaseSectionPaint, getDataset, getDirection, getExplodePercent, getExplodePercent, getIgnoreNullValues, getIgnoreZeroValues, getInteriorGap, getLabelBackgroundPaint, getLabelDistributor, getLabelFont, getLabelGap, getLabelGenerator, getLabelLinkDepth, getLabelLinkMargin, getLabelLinkPaint, getLabelLinkStroke, getLabelLinkStyle, getLabelLinksVisible, getLabelOutlinePaint, getLabelOutlineStroke, getLabelPadding, getLabelPaint, getLabelShadowPaint, getLegendItems, getLegendItemShape, getLegendLabelGenerator, getLegendLabelToolTipGenerator, getLegendLabelURLGenerator, getMaximumExplodePercent, getMaximumLabelWidth, getMinimumArcAngleToDraw, getPieIndex, getSectionKey, getSectionOutlinePaint, getSectionOutlinePaint, getSectionOutlinePaint, getSectionOutlineStroke, getSectionOutlineStroke, getSectionOutlineStroke, getSectionOutlinesVisible, getSectionPaint, getSectionPaint, getSectionPaint, getShadowGenerator, getShadowPaint, getShadowXOffset, getShadowYOffset, getSimpleLabelOffset, getSimpleLabels, getStartAngle, getToolTipGenerator, getURLGenerator, handleMouseWheelRotation, initialise, isCircular, lookupSectionOutlinePaint, lookupSectionOutlinePaint, lookupSectionOutlineStroke, lookupSectionOutlineStroke, lookupSectionPaint, lookupSectionPaint, lookupSectionPaint, setAutoPopulateSectionOutlinePaint, setAutoPopulateSectionOutlineStroke, setAutoPopulateSectionPaint, setBaseSectionOutlinePaint, setBaseSectionOutlineStroke, setBaseSectionPaint, setCircular, setCircular, setDataset, setDirection, setExplodePercent, setExplodePercent, setIgnoreNullValues, setIgnoreZeroValues, setInteriorGap, setLabelBackgroundPaint, setLabelDistributor, setLabelFont, setLabelGap, setLabelGenerator, setLabelLinkMargin, setLabelLinkPaint, setLabelLinkStroke, setLabelLinkStyle, setLabelLinksVisible, setLabelOutlinePaint, setLabelOutlineStroke, setLabelPadding, setLabelPaint, setLabelShadowPaint, setLegendItemShape, setLegendLabelGenerator, setLegendLabelToolTipGenerator, setLegendLabelURLGenerator, setMaximumLabelWidth, setMinimumArcAngleToDraw, setPieIndex, setSectionOutlinePaint, setSectionOutlinePaint, setSectionOutlinePaint, setSectionOutlineStroke, setSectionOutlineStroke, setSectionOutlineStroke, setSectionOutlinesVisible, setSectionPaint, setSectionPaint, setSectionPaint, setShadowGenerator, setShadowPaint, setShadowXOffset, setShadowYOffset, setSimpleLabelOffset, setSimpleLabels, setStartAngle, setToolTipGenerator, setURLGenerator`

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

`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, zoom`

### Methods inherited from class java.lang.Object

`finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### 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 Detail

#### getDepthFactor

    public double getDepthFactor()

Returns the depth factor for the chart.

Returns:
  The depth factor.
See Also:
  `setDepthFactor(double)`

#### 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).
See Also:
  `getDepthFactor()`

#### getDarkerSides

    public boolean getDarkerSides()

Returns a flag that controls whether or not the sides of the pie chart are rendered using a darker colour. This is only applied if the section colour is an instance of `Color`.

Returns:
  A boolean.
Since:
  1.0.7
See Also:
  `setDarkerSides(boolean)`

#### setDarkerSides

    public void setDarkerSides(boolean darker)

Sets a flag that controls whether or not the sides of the pie chart are rendered using a darker colour, and sends a `PlotChangeEvent` to all registered listeners. This is only applied if the section colour is an instance of `Color`.

Parameters:
  `darker` - true to darken the sides, false to use the default behaviour.
Since:
  1.0.7.
See Also:
  `getDarkerSides()`

#### draw

    public void draw(java.awt.Graphics2D g2,
            java.awt.geom.Rectangle2D plotArea,
            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). This method is called by the `JFreeChart` class, you don't normally need to call it yourself.

Overrides:
  `draw` in class `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(java.awt.Graphics2D g2,
                java.awt.geom.Rectangle2D plotArea,
                java.awt.geom.Arc2D arc,
                java.awt.geom.Area front,
                java.awt.geom.Area back,
                java.awt.Paint paint,
                java.awt.Paint outlinePaint,
                java.awt.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?

#### getPlotType

    public java.lang.String getPlotType()

Returns a short string describing the type of plot.

Overrides:
  `getPlotType` in class `PiePlot`
Returns:
  Pie 3D Plot.

#### equals

    public boolean equals(java.lang.Object obj)

Tests this plot for equality with an arbitrary object.

Overrides:
  `equals` in class `PiePlot`
Parameters:
  `obj` - the object (`null` permitted).
Returns:
  A boolean.