org.jfree.chart.plot
Class PiePlot3DGradient

java.lang.Object
  extended by org.jfree.chart.plot.Plot
      extended by org.jfree.chart.plot.PiePlot
          extended by org.jfree.chart.plot.PiePlot3D
              extended by org.jfree.chart.plot.PiePlot3DGradient
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.EventListener, org.jfree.chart.event.AxisChangeListener, org.jfree.chart.event.MarkerChangeListener, org.jfree.chart.LegendItemSource, org.jfree.data.general.DatasetChangeListener, org.jfree.util.PublicCloneable

public class PiePlot3DGradient
extends org.jfree.chart.plot.PiePlot3D

A plot that displays data in the form of a 3D pie chart, using data from any class that implements the PieDataset interface. This class can also paint gradients onto its face and sides when provided with two GradientPaintTransformers

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
PiePlot3DGradient(org.jfree.data.general.PieDataset dataset)
          Creates a plot that will draw a pie chart for the specified dataset.
 
Method Summary
 void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Point2D anchor, org.jfree.chart.plot.PlotState parentState, org.jfree.chart.plot.PlotRenderingInfo info)
          Draws the plot on a Java 2D graphics device (such as the screen or a printer).
 org.jfree.ui.GradientPaintTransformer getFaceGradientPaintTransformer()
           
 org.jfree.ui.GradientPaintTransformer getSideGradientPaintTransformer()
           
protected  java.awt.Paint lookupSidePaint(java.lang.Comparable key)
          Returns the paint for the specified section's side.
protected  java.awt.Paint lookupSidePaint(java.lang.Comparable key, boolean autoPopulate)
          Returns the paint for the specified section's side.
 void setFaceGradientPaintTransformer(org.jfree.ui.GradientPaintTransformer faceGradient)
           
 void setSideGradientPaintTransformer(org.jfree.ui.GradientPaintTransformer sideGradient)
           
 void setSidePaint(java.lang.Comparable key, java.awt.Paint paint)
          Sets the paint associated with the side of the section of a specified key, and sends a PlotChangeEvent to all registered listeners.
 
Methods inherited from class org.jfree.chart.plot.PiePlot3D
drawSide, equals, getDarkerSides, getDepthFactor, getPlotType, setDarkerSides, setDepthFactor
 
Methods inherited from class org.jfree.chart.plot.PiePlot
clearSectionOutlinePaints, clearSectionOutlineStrokes, clearSectionPaints, clone, drawItem, drawLabels, drawLeftLabel, drawLeftLabels, drawPie, drawRightLabel, drawRightLabels, drawSimpleLabels, getArcBounds, 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, getShadowPaint, getShadowXOffset, getShadowYOffset, getSimpleLabelOffset, getSimpleLabels, getStartAngle, getToolTipGenerator, getURLGenerator, initialise, isCircular, lookupSectionOutlinePaint, lookupSectionOutlinePaint, lookupSectionOutlineStroke, lookupSectionOutlineStroke, 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, setShadowPaint, setShadowXOffset, setShadowYOffset, setSimpleLabelOffset, setSimpleLabels, setStartAngle, setToolTipGenerator, setURLGenerator
 
Methods inherited from class org.jfree.chart.plot.Plot
addChangeListener, axisChanged, 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, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setDatasetGroup, setDrawingSupplier, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent, zoom
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PiePlot3DGradient

public PiePlot3DGradient(org.jfree.data.general.PieDataset dataset)
Creates a plot that will draw a pie chart for the specified dataset.

Parameters:
dataset - the dataset (null permitted).
Method Detail

draw

public void draw(java.awt.Graphics2D g2,
                 java.awt.geom.Rectangle2D plotArea,
                 java.awt.geom.Point2D anchor,
                 org.jfree.chart.plot.PlotState parentState,
                 org.jfree.chart.plot.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 org.jfree.chart.plot.PiePlot3D
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).

lookupSidePaint

protected java.awt.Paint lookupSidePaint(java.lang.Comparable key)
Returns the paint for the specified section's side. This is equivalent to lookupSectionPaint(section, getAutoPopulateSectionPaint()).

Parameters:
key - the section key.
Returns:
The paint for the specified section.
Since:
1.0.3
See Also:
PiePlot.lookupSectionPaint(Comparable, boolean)

lookupSidePaint

protected java.awt.Paint lookupSidePaint(java.lang.Comparable key,
                                         boolean autoPopulate)
Returns the paint for the specified section's side. The lookup involves these steps:

Parameters:
key - the section key.
autoPopulate - a flag that controls whether the drawing supplier is used to auto-populate the section paint settings.
Returns:
The paint.
Since:
1.0.3

setSidePaint

public void setSidePaint(java.lang.Comparable key,
                         java.awt.Paint paint)
Sets the paint associated with the side of the section of a specified key, and sends a PlotChangeEvent to all registered listeners.

Parameters:
key - the key (null not permitted).
paint - the paint.
Throws:
java.lang.IllegalArgumentException - if key is null.
Since:
1.0.3
See Also:
PiePlot.getSectionPaint(Comparable)

setFaceGradientPaintTransformer

public void setFaceGradientPaintTransformer(org.jfree.ui.GradientPaintTransformer faceGradient)

getFaceGradientPaintTransformer

public org.jfree.ui.GradientPaintTransformer getFaceGradientPaintTransformer()

setSideGradientPaintTransformer

public void setSideGradientPaintTransformer(org.jfree.ui.GradientPaintTransformer sideGradient)

getSideGradientPaintTransformer

public org.jfree.ui.GradientPaintTransformer getSideGradientPaintTransformer()


Copyright © 2009. All Rights Reserved.