org.jfree.chart.plot
Class Pie3DPlot
java.lang.Object
org.jfree.chart.plot.Plot
org.jfree.chart.plot.PiePlot
org.jfree.chart.plot.Pie3DPlot
- All Implemented Interfaces:
- AxisChangeListener, AxisConstants, java.lang.Cloneable, DatasetChangeListener, java.util.EventListener, java.io.Serializable
- public class Pie3DPlot
- 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 or the display of multiple pie charts within one plot.
- Author:
- Tomer Peretz
- See Also:
- Serialized Form
Fields inherited from class org.jfree.chart.plot.PiePlot |
ANTICLOCKWISE, CLOCKWISE, DEFAULT_DIRECTION, DEFAULT_INTERIOR_GAP, DEFAULT_MINIMUM_ARC_ANGLE_TO_DRAW, DEFAULT_PERCENT_FORMATTER, DEFAULT_RADIUS, DEFAULT_SECTION_LABEL_FONT, DEFAULT_SECTION_LABEL_GAP, DEFAULT_SECTION_LABEL_PAINT, DEFAULT_SECTION_LABEL_TYPE, DEFAULT_SERIES_LABEL_FONT, DEFAULT_SERIES_LABEL_PAINT, DEFAULT_SHOW_SERIES_LABELS, DEFAULT_START_ANGLE, DEFAULT_VALUE_FORMATTER, localizationResources, MAX_INTERIOR_GAP, MAX_RADIUS, MAX_SECTION_LABEL_GAP, NAME_AND_PERCENT_LABELS, NAME_AND_VALUE_LABELS, NAME_LABELS, NO_LABELS, PER_COLUMN, PER_ROW, PERCENT_LABELS, VALUE_AND_PERCENT_LABELS, VALUE_LABELS |
Fields inherited from interface org.jfree.chart.axis.AxisConstants |
DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_AXIS_LINE_PAINT, DEFAULT_AXIS_LINE_STROKE, DEFAULT_AXIS_VISIBLE, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_LABELS_VISIBLE, DEFAULT_TICK_MARK_INSIDE_LENGTH, DEFAULT_TICK_MARK_OUTSIDE_LENGTH, DEFAULT_TICK_MARK_PAINT, DEFAULT_TICK_MARK_STROKE, DEFAULT_TICK_MARKS_VISIBLE |
Method Summary |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
PlotState parentState,
PlotRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a printer). |
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,
boolean drawFront,
boolean drawBack)
Draws the side of a pie section. |
double |
getDepthFactor()
The depth factor for the chart. |
java.lang.String |
getPlotType()
Returns a short string describing the type of plot. |
void |
setDepthFactor(double newDepthFactor)
Sets the factor of the pie depth from the plot height. |
Methods inherited from class org.jfree.chart.plot.PiePlot |
calculateLabelLocation, clone, drawLabel, drawMultiplePies, drawPie, equals, getArcBounds, getDataset, getDefaultOutlinePaint, getDefaultOutlineStroke, getDefaultPaint, getDirection, getExplodePercent, getExtractType, getInteriorGap, getItemLabelGenerator, getKeys, getLegendItems, getMinimumArcAngleToDraw, getMultiDataset, getOutlinePaint, getOutlineStroke, getPaint, getPieDataset, getRadius, getSectionLabelFont, getSectionLabelGap, getSectionLabelPaint, getSectionLabelType, getSectionOutlinePaint, getSectionOutlinePaint, getSectionOutlinePaintListAutoFill, getSectionOutlineStroke, getSectionOutlineStroke, getSectionOutlineStrokeListAutoFill, getSectionPaint, getSectionPaint, getSectionPaintListAutoFill, getSeriesLabelFont, getSeriesLabelPaint, getShowSeriesLabels, getStartAngle, getToolTipGenerator, getURLGenerator, isCircular, setCircular, setCircularAttribute, setDataset, setDefaultOutlinePaint, setDefaultOutlineStroke, setDefaultPaint, setDirection, setExplodePercent, setExtractType, setInteriorGap, setItemLabelGenerator, setMinimumArcAngleToDraw, setMultiDataset, setOutlinePaint, setOutlineStroke, setPaint, setPercentFormat, setPercentFormatString, setRadius, setSectionLabelFont, setSectionLabelGap, setSectionLabelPaint, setSectionLabelType, setSectionOutlinePaint, setSectionOutlinePaint, setSectionOutlinePaintListAutoFill, setSectionOutlineStroke, setSectionOutlineStroke, setSectionOutlineStrokeListAutoFill, setSectionPaint, setSectionPaint, setSectionPaintListAutoFill, setSeriesLabelFont, setSeriesLabelPaint, setShowSeriesLabels, setStartAngle, setToolTipGenerator, setURLGenerator, setValueFormat, setValueFormatString, zoom |
Methods inherited from class org.jfree.chart.plot.Plot |
addChangeListener, axisChanged, datasetChanged, draw, drawBackground, drawNoDataMessage, drawOutline, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundPaint, getDataAreaRatio, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRectX, getRectY, getRootPlot, handleClick, isSubplot, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundPaint, setDataAreaRatio, setDatasetGroup, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setOutlinePaint, setOutlineStroke, setParent |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Pie3DPlot
public Pie3DPlot(PieDataset data)
- Creates a 3D pie chart with default attributes.
- Parameters:
data
- the data for the chart.
setDepthFactor
public void setDepthFactor(double newDepthFactor)
- Sets the factor of the pie depth from the plot height.
- Parameters:
newDepthFactor
- the new depth factor.
getDepthFactor
public double getDepthFactor()
- The depth factor for the chart.
- Returns:
- the current depth factor.
draw
public void draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
PlotState parentState,
PlotRenderingInfo info)
- Draws the plot on a Java 2D graphics device (such as the screen or a printer).
- Overrides:
draw
in class PiePlot
- Parameters:
g2
- the graphics device.plotArea
- the area within which the plot should be drawn.parentState
- the state from the parent plot, if there is one.info
- collects info about the drawing.
drawSide
public 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,
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.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.