com.jrefinery.chart
Class Pie3DPlot

java.lang.Object
  |
  +--com.jrefinery.chart.Plot
        |
        +--com.jrefinery.chart.PiePlot
              |
              +--com.jrefinery.chart.Pie3DPlot
All Implemented Interfaces:
AxisChangeListener, AxisConstants, DatasetChangeListener, java.util.EventListener

public class Pie3DPlot
extends PiePlot

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

Author:
TP
See Also:
Plot

Fields inherited from class com.jrefinery.chart.PiePlot
ANTICLOCKWISE, CLOCKWISE, DEFAULT_INTERIOR_GAP, DEFAULT_RADIUS, DEFAULT_SECTION_LABEL_FONT, DEFAULT_SECTION_LABEL_GAP, DEFAULT_SECTION_LABEL_PAINT, DEFAULT_SERIES_LABEL_FONT, DEFAULT_SERIES_LABEL_PAINT, DEFAULT_SHOW_SERIES_LABELS, MAX_INTERIOR_GAP, MAX_RADIUS, MAX_SECTION_LABEL_GAP, NAME_AND_PERCENT_LABELS, NAME_AND_VALUE_LABELS, NAME_LABELS, NO_LABELS, PERCENT_LABELS, VALUE_AND_PERCENT_LABELS, VALUE_LABELS
 
Fields inherited from class com.jrefinery.chart.Plot
backgroundAlpha, backgroundImage, backgroundPaint, dataset, DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, foregroundAlpha, insets, listenerList, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, noDataMessage, noDataMessageFont, outlinePaint, outlineStroke, seriesOutlinePaint, seriesOutlineStroke, seriesPaint, seriesStroke, shapeFactory, ZERO
 
Fields inherited from interface com.jrefinery.chart.AxisConstants
DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_PAINT, DEFAULT_TICK_STROKE
 
Constructor Summary
Pie3DPlot(PieDataset data)
          Creates a 3D pie chart with default attributes.
 
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)
          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 com.jrefinery.chart.PiePlot
calculateLabelLocation, drawLabel, getArcBounds, getCategories, getDirection, getExplodePercent, getInteriorGapPercent, getLegendItemLabels, getLegendItems, getPieDataset, getRadiusPercent, getSectionLabelFont, getSectionLabelGapPercent, getSectionLabelPaint, getSectionLabelType, getSeriesLabelFont, getSeriesLabelPaint, getShowSeriesLabels, getStartAngle, getToolTipGenerator, getURLGenerator, isCircular, setCircular, setCircularAttribute, setDirection, setExplodePercent, setInteriorGapPercent, setPercentFormat, setPercentFormatString, setRadiusPercent, setSectionLabelFont, setSectionLabelGapPercent, setSectionLabelPaint, setSectionLabelType, setSeriesLabelFont, setSeriesLabelPaint, setShowSeriesLabels, setStartAngle, setToolTipGenerator, setURLGenerator, setValueFormat, setValueFormatString, zoom
 
Methods inherited from class com.jrefinery.chart.Plot
addChangeListener, axisChanged, datasetChanged, drawNoDataMessage, drawOutlineAndBackground, getBackgroundAlpha, getBackgroundPaint, getDataset, getDatasetGroup, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getOutlinePaint, getOutlineStroke, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesStroke, getShape, getShape, getShapeFactory, handleClick, isSubplot, notifyListeners, removeChangeListener, setBackgroundAlpha, setBackgroundImage, setBackgroundPaint, setDataset, setDatasetGroup, setForegroundAlpha, setInsets, setNoDataMessage, setNoDataMessageFont, setOutlinePaint, setOutlineStroke, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesStroke, setSeriesStroke, setShapeFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pie3DPlot

public Pie3DPlot(PieDataset data)
Creates a 3D pie chart with default attributes.
Parameters:
data - the data for the chart.
Method Detail

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