public class

PiePlot3D

extends PiePlot
implements Serializable
java.lang.Object
   ↳ org.jfree.chart.plot.Plot
     ↳ org.jfree.chart.plot.PiePlot
       ↳ org.jfree.chart.plot.PiePlot3D

Class Overview

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.

Summary

[Expand]
Inherited Constants
From class org.jfree.chart.plot.PiePlot
From class org.jfree.chart.plot.Plot
[Expand]
Inherited Fields
From class org.jfree.chart.plot.PiePlot
From class org.jfree.chart.plot.Plot
Public Constructors
PiePlot3D()
Creates a new instance with no dataset.
PiePlot3D(PieDataset dataset)
Creates a pie chart with a three dimensional effect using the specified dataset.
Public Methods
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).
boolean equals(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.
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.
Protected Methods
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.
[Expand]
Inherited Methods
From class org.jfree.chart.plot.PiePlot
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 PiePlot3D ()

Creates a new instance with no dataset.

public PiePlot3D (PieDataset dataset)

Creates a pie chart with a three dimensional effect using the specified dataset.

Parameters
dataset the dataset (null permitted).

Public Methods

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.

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).

public boolean equals (Object obj)

Tests this plot for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

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.

public double getDepthFactor ()

Returns the depth factor for the chart.

Returns
  • The depth factor.

public String getPlotType ()

Returns a short string describing the type of plot.

Returns
  • Pie 3D Plot.

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.
See Also

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

Protected Methods

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?