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, 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 CategoryDataset interface.
- Author:
- Tomer Peretz
- See Also:
Plot
,
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, 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 |
BOTTOM, DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, 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, LEFT, RIGHT, TOP |
Method Summary |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
ChartRenderingInfo 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,
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, drawLabel, equals, getArcBounds, getDefaultOutlinePaint, getDefaultOutlineStroke, getDefaultPaint, getDirection, getExplodePercent, getInteriorGap, getKeys, getLegendItems, getMinimumArcAngleToDraw, getOutlinePaint, getOutlineStroke, getPaint, getPieDataset, getRadius, getSectionLabelFont, getSectionLabelGap, getSectionLabelPaint, getSectionLabelType, getSeriesLabelFont, getSeriesLabelPaint, getShowSeriesLabels, getStartAngle, getToolTipGenerator, getURLGenerator, isCircular, isOutlinePaintTableActive, isOutlineStrokeTableActive, isPaintTableActive, setCircular, setCircularAttribute, setDefaultOutlinePaint, setDefaultOutlineStroke, setDefaultPaint, setDirection, setExplodePercent, setInteriorGap, setMinimumArcAngleToDraw, setOutlinePaint, setOutlinePaintTableActive, setOutlineStroke, setOutlineStrokeTableActive, setPaint, setPaintTableActive, setPercentFormat, setPercentFormatString, setRadius, setSectionLabelFont, setSectionLabelGap, setSectionLabelPaint, setSectionLabelType, setSeriesLabelFont, setSeriesLabelPaint, setShowSeriesLabels, setStartAngle, setToolTipGenerator, setURLGenerator, setValueFormat, setValueFormatString, zoom |
Methods inherited from class org.jfree.chart.plot.Plot |
addChangeListener, axisChanged, datasetChanged, drawBackground, drawNoDataMessage, drawOutline, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundPaint, getDataAreaRatio, getDataset, getDatasetGroup, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOppositeAxisLocation, getOutlinePaint, getOutlineStroke, getParent, getRectX, getRectY, getRootPlot, getSecondaryDataset, handleClick, isSubplot, notifyListeners, removeChangeListener, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundPaint, setDataAreaRatio, setDataset, setDatasetGroup, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setOutlinePaint, setOutlineStroke, setParent, setSecondaryDataset |
Methods inherited from class java.lang.Object |
clone, 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,
ChartRenderingInfo 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.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,
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.
getPlotType
public java.lang.String getPlotType()
- Returns a short string describing the type of plot.
- Overrides:
getPlotType
in class PiePlot
- Returns:
- Pie 3D Plot.