| java.lang.Object org.jfree.chart.plot.Plot org.jfree.chart.plot.PiePlot
All known Subclasses: org.jfree.chart.plot.RingPlot, org.jfree.chart.plot.PiePlot3D,
PiePlot | public class PiePlot extends Plot implements Cloneable,Serializable(Code) | | A plot that displays data in the form of a pie chart, using data from any
class that implements the
PieDataset interface.
Special notes:
- the default starting point is 12 o'clock and the pie sections proceed
in a clockwise direction, but these settings can be changed;
- negative values in the dataset are ignored;
- there are utility methods for creating a
PieDataset from a
org.jfree.data.category.CategoryDataset ;
See Also: Plot See Also: PieDataset |
Constructor Summary | |
public | PiePlot() Creates a new plot. | public | PiePlot(PieDataset dataset) Creates a plot that will draw a pie chart for the specified dataset. |
Method Summary | |
public Object | clone() Returns a clone of the plot. | public void | draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info) Draws the plot on a Java 2D graphics device (such as the screen or a
printer). | protected void | drawItem(Graphics2D g2, int section, Rectangle2D dataArea, PiePlotState state, int currentPass) Draws a single data item. | protected void | drawLabels(Graphics2D g2, List keys, double totalValue, Rectangle2D plotArea, Rectangle2D linkArea, PiePlotState state) Draws the labels for the pie sections. | protected void | drawLeftLabel(Graphics2D g2, PiePlotState state, PieLabelRecord record) Draws a section label on the left side of the pie chart. | protected void | drawLeftLabels(KeyedValues leftKeys, Graphics2D g2, Rectangle2D plotArea, Rectangle2D linkArea, float maxLabelWidth, PiePlotState state) Draws the left labels. | protected void | drawPie(Graphics2D g2, Rectangle2D plotArea, PlotRenderingInfo info) Draws the pie. | protected void | drawRightLabel(Graphics2D g2, PiePlotState state, PieLabelRecord record) Draws a section label on the right side of the pie chart. | protected void | drawRightLabels(KeyedValues keys, Graphics2D g2, Rectangle2D plotArea, Rectangle2D linkArea, float maxLabelWidth, PiePlotState state) Draws the right labels. | public boolean | equals(Object obj) Tests this plot for equality with an arbitrary object. | protected Rectangle2D | getArcBounds(Rectangle2D unexploded, Rectangle2D exploded, double angle, double extent, double explodePercent) Returns a rectangle that can be used to create a pie section (taking
into account the amount by which the pie section is 'exploded').
Parameters: unexploded - the area inside which the unexploded pie sections aredrawn. Parameters: exploded - the area inside which the exploded pie sections are drawn. Parameters: angle - the start angle. Parameters: extent - the extent of the arc. Parameters: explodePercent - the amount by which the pie section is exploded. | public Paint | getBaseSectionOutlinePaint() Returns the base section paint. | public Stroke | getBaseSectionOutlineStroke() Returns the base section stroke. | public Paint | getBaseSectionPaint() Returns the base section paint. | public PieDataset | getDataset() Returns the dataset. | public Rotation | getDirection() Returns the direction in which the pie sections are drawn (clockwise or
anti-clockwise). | public double | getExplodePercent(Comparable key) Returns the amount that the section with the specified key should be
exploded.
Parameters: key - the key (null not permitted). | public double | getExplodePercent(int section) Returns the amount that a section should be 'exploded'.
Parameters: section - the section number. | public boolean | getIgnoreNullValues() Returns the flag that controls whether null values in the
dataset are ignored. | public boolean | getIgnoreZeroValues() Returns the flag that controls whether zero values in the
dataset are ignored. | public double | getInteriorGap() Returns the interior gap, measured as a percentage of the available
drawing space. | public Paint | getLabelBackgroundPaint() Returns the section label background paint. | public AbstractPieLabelDistributor | getLabelDistributor() Returns the object responsible for the vertical layout of the pie
section labels. | public Font | getLabelFont() Returns the section label font. | public double | getLabelGap() Returns the gap between the edge of the pie and the labels, expressed as
a percentage of the plot width. | public PieSectionLabelGenerator | getLabelGenerator() Returns the section label generator. | public double | getLabelLinkMargin() Returns the margin (expressed as a percentage of the width or height)
between the edge of the pie and the link point. | public Paint | getLabelLinkPaint() Returns the paint used for the lines that connect pie sections to their
corresponding labels. | public Stroke | getLabelLinkStroke() Returns the stroke used for the label linking lines. | public boolean | getLabelLinksVisible() Returns the flag that controls whether or not label linking lines are
visible. | public Paint | getLabelOutlinePaint() Returns the section label outline paint. | public Stroke | getLabelOutlineStroke() Returns the section label outline stroke. | public Paint | getLabelPaint() Returns the section label paint. | public Paint | getLabelShadowPaint() Returns the section label shadow paint. | public Shape | getLegendItemShape() Returns the shape used for legend items. | public LegendItemCollection | getLegendItems() Returns a collection of legend items for the pie chart. | public PieSectionLabelGenerator | getLegendLabelGenerator() Returns the legend label generator. | public PieSectionLabelGenerator | getLegendLabelToolTipGenerator() Returns the legend label tool tip generator. | public PieURLGenerator | getLegendLabelURLGenerator() Returns the legend label URL generator. | public double | getMaximumExplodePercent() Returns the maximum explode percent. | public double | getMaximumLabelWidth() Returns the maximum label width as a percentage of the plot width. | public double | getMinimumArcAngleToDraw() Returns the minimum arc angle that will be drawn. | public int | getPieIndex() Returns the pie index (this is used by the
MultiplePiePlot class
to track subplots). | public String | getPlotType() Returns a short string describing the type of plot. | protected Comparable | getSectionKey(int section) Returns a key for the specified section. | public Paint | getSectionOutlinePaint() Returns the outline paint for ALL sections in the plot. | public Paint | getSectionOutlinePaint(Comparable key) Returns the outline paint associated with the specified key, or
null if there is no paint associated with the key.
Parameters: key - the key (null not permitted). | public Paint | getSectionOutlinePaint(int section) Returns the paint for the specified section.
Parameters: section - the section index (zero-based). | public Stroke | getSectionOutlineStroke() Returns the outline stroke for ALL sections in the plot. | public Stroke | getSectionOutlineStroke(Comparable key) Returns the outline stroke associated with the specified key, or
null if there is no stroke associated with the key.
Parameters: key - the key (null not permitted). | public Stroke | getSectionOutlineStroke(int section) Returns the stroke for the specified section.
Parameters: section - the section index (zero-based). | public boolean | getSectionOutlinesVisible() Returns the flag that controls whether or not the outline is drawn for
each pie section. | public Paint | getSectionPaint() Returns the paint for ALL sections in the plot. | public Paint | getSectionPaint(Comparable key) Returns the paint associated with the specified key, or
null if there is no paint associated with the key.
Parameters: key - the key (null not permitted). | public Paint | getSectionPaint(int section) Returns the paint for the specified section.
Parameters: section - the section index (zero-based). | public Paint | getShadowPaint() Returns the shadow paint. | public double | getShadowXOffset() Returns the x-offset for the shadow effect. | public double | getShadowYOffset() Returns the y-offset for the shadow effect. | public double | getStartAngle() Returns the start angle for the first pie section. | public PieToolTipGenerator | getToolTipGenerator() Returns the tool tip generator, an object that is responsible for
generating the text items used for tool tips by the plot. | public PieURLGenerator | getURLGenerator() Returns the URL generator. | public PiePlotState | initialise(Graphics2D g2, Rectangle2D plotArea, PiePlot plot, Integer index, PlotRenderingInfo info) Initialises the drawing procedure. | public boolean | isCircular() Returns a flag indicating whether the pie chart is circular, or
stretched into an elliptical shape. | protected Paint | lookupSectionOutlinePaint(Comparable key) Returns the outline paint for the specified section. | protected Paint | lookupSectionOutlinePaint(Comparable key, boolean autoPopulate) Returns the outline paint for the specified section. | protected Stroke | lookupSectionOutlineStroke(Comparable key) Returns the outline stroke for the specified section. | protected Stroke | lookupSectionOutlineStroke(Comparable key, boolean autoPopulate) Returns the outline stroke for the specified section. | protected Paint | lookupSectionPaint(Comparable key) Returns the paint for the specified section. | protected Paint | lookupSectionPaint(Comparable key, boolean autoPopulate) Returns the paint for the specified section. | public void | setBaseSectionOutlinePaint(Paint paint) Sets the base section paint. | public void | setBaseSectionOutlineStroke(Stroke stroke) Sets the base section stroke. | public void | setBaseSectionPaint(Paint paint) Sets the base section paint and sends a
PlotChangeEvent to all
registered listeners. | public void | setCircular(boolean flag) A flag indicating whether the pie chart is circular, or stretched into
an elliptical shape. | public void | setCircular(boolean circular, boolean notify) Sets the circular attribute and, if requested, sends a
PlotChangeEvent to all registered listeners. | public void | setDataset(PieDataset dataset) Sets the dataset and sends a
DatasetChangeEvent to 'this'. | public void | setDirection(Rotation direction) Sets the direction in which the pie sections are drawn and sends a
PlotChangeEvent to all registered listeners. | public void | setExplodePercent(Comparable key, double percent) Sets the amount that a pie section should be exploded and sends a
PlotChangeEvent to all registered listeners. | public void | setExplodePercent(int section, double percent) Sets the amount that a pie section should be exploded and sends a
PlotChangeEvent to all registered listeners. | public void | setIgnoreNullValues(boolean flag) Sets a flag that controls whether null values are ignored,
and sends a
PlotChangeEvent to all registered listeners. | public void | setIgnoreZeroValues(boolean flag) Sets a flag that controls whether zero values are ignored,
and sends a
PlotChangeEvent to all registered listeners. | public void | setInteriorGap(double percent) Sets the interior gap and sends a
PlotChangeEvent to all
registered listeners. | public void | setLabelBackgroundPaint(Paint paint) Sets the section label background paint and sends a
PlotChangeEvent to all registered listeners. | public void | setLabelDistributor(AbstractPieLabelDistributor distributor) Sets the label distributor and sends a
PlotChangeEvent to all
registered listeners. | public void | setLabelFont(Font font) Sets the section label font and sends a
PlotChangeEvent to all
registered listeners. | public void | setLabelGap(double gap) Sets the gap between the edge of the pie and the labels (expressed as a
percentage of the plot width) and sends a
PlotChangeEvent to all
registered listeners. | public void | setLabelGenerator(PieSectionLabelGenerator generator) Sets the section label generator and sends a
PlotChangeEvent to
all registered listeners. | public void | setLabelLinkMargin(double margin) Sets the link margin and sends a
PlotChangeEvent to all
registered listeners. | public void | setLabelLinkPaint(Paint paint) Sets the paint used for the lines that connect pie sections to their
corresponding labels, and sends a
PlotChangeEvent to all
registered listeners. | public void | setLabelLinkStroke(Stroke stroke) Sets the link stroke and sends a
PlotChangeEvent to all
registered listeners. | public void | setLabelLinksVisible(boolean visible) Sets the flag that controls whether or not label linking lines are
visible and sends a
PlotChangeEvent to all registered listeners. | public void | setLabelOutlinePaint(Paint paint) Sets the section label outline paint and sends a
PlotChangeEvent to all registered listeners. | public void | setLabelOutlineStroke(Stroke stroke) Sets the section label outline stroke and sends a
PlotChangeEvent to all registered listeners. | public void | setLabelPaint(Paint paint) Sets the section label paint and sends a
PlotChangeEvent to all
registered listeners. | public void | setLabelShadowPaint(Paint paint) Sets the section label shadow paint and sends a
PlotChangeEvent to all registered listeners. | public void | setLegendItemShape(Shape shape) Sets the shape used for legend items and sends a
PlotChangeEvent to all registered listeners. | public void | setLegendLabelGenerator(PieSectionLabelGenerator generator) Sets the legend label generator and sends a
PlotChangeEvent to
all registered listeners. | public void | setLegendLabelToolTipGenerator(PieSectionLabelGenerator generator) Sets the legend label tool tip generator and sends a
PlotChangeEvent to all registered listeners. | public void | setLegendLabelURLGenerator(PieURLGenerator generator) Sets the legend label URL generator and sends a
PlotChangeEvent to all registered listeners. | public void | setMaximumLabelWidth(double width) Sets the maximum label width as a percentage of the plot width and sends
a
PlotChangeEvent to all registered listeners. | public void | setMinimumArcAngleToDraw(double angle) Sets the minimum arc angle that will be drawn. | public void | setPieIndex(int index) Sets the pie index (this is used by the
MultiplePiePlot class to
track subplots). | public void | setSectionOutlinePaint(Paint paint) Sets the outline paint for ALL sections in the plot. | public void | setSectionOutlinePaint(Comparable key, Paint paint) Sets the outline paint associated with the specified key, and sends a
PlotChangeEvent to all registered listeners. | public void | setSectionOutlinePaint(int section, Paint paint) Sets the paint used to fill a section of the pie and sends a
PlotChangeEvent to all registered listeners. | public void | setSectionOutlineStroke(Stroke stroke) Sets the outline stroke for ALL sections in the plot. | public void | setSectionOutlineStroke(Comparable key, Stroke stroke) Sets the outline stroke associated with the specified key, and sends a
PlotChangeEvent to all registered listeners. | public void | setSectionOutlineStroke(int section, Stroke stroke) Sets the stroke used to fill a section of the pie and sends a
PlotChangeEvent to all registered listeners. | public void | setSectionOutlinesVisible(boolean visible) Sets the flag that controls whether or not the outline is drawn for
each pie section, and sends a
PlotChangeEvent to all registered
listeners. | public void | setSectionPaint(Paint paint) Sets the paint for ALL sections in the plot. | public void | setSectionPaint(Comparable key, Paint paint) Sets the paint associated with the specified key, and sends a
PlotChangeEvent to all registered listeners. | public void | setSectionPaint(int section, Paint paint) Sets the paint used to fill a section of the pie and sends a
PlotChangeEvent to all registered listeners. | public void | setShadowPaint(Paint paint) Sets the shadow paint and sends a
PlotChangeEvent to all
registered listeners. | public void | setShadowXOffset(double offset) Sets the x-offset for the shadow effect and sends a
PlotChangeEvent to all registered listeners. | public void | setShadowYOffset(double offset) Sets the y-offset for the shadow effect and sends a
PlotChangeEvent to all registered listeners. | public void | setStartAngle(double angle) Sets the starting angle and sends a
PlotChangeEvent to all
registered listeners. | public void | setToolTipGenerator(PieToolTipGenerator generator) Sets the tool tip generator and sends a
PlotChangeEvent to all
registered listeners. | public void | setURLGenerator(PieURLGenerator generator) Sets the URL generator and sends a
PlotChangeEvent to all
registered listeners. |
DEFAULT_INTERIOR_GAP | final public static double DEFAULT_INTERIOR_GAP(Code) | | The default interior gap.
|
DEFAULT_LABEL_BACKGROUND_PAINT | final public static Paint DEFAULT_LABEL_BACKGROUND_PAINT(Code) | | The default section label background paint.
|
DEFAULT_LABEL_FONT | final public static Font DEFAULT_LABEL_FONT(Code) | | The default section label font.
|
DEFAULT_LABEL_OUTLINE_PAINT | final public static Paint DEFAULT_LABEL_OUTLINE_PAINT(Code) | | The default section label outline paint.
|
DEFAULT_LABEL_OUTLINE_STROKE | final public static Stroke DEFAULT_LABEL_OUTLINE_STROKE(Code) | | The default section label outline stroke.
|
DEFAULT_LABEL_PAINT | final public static Paint DEFAULT_LABEL_PAINT(Code) | | The default section label paint.
|
DEFAULT_LABEL_SHADOW_PAINT | final public static Paint DEFAULT_LABEL_SHADOW_PAINT(Code) | | The default section label shadow paint.
|
DEFAULT_MINIMUM_ARC_ANGLE_TO_DRAW | final public static double DEFAULT_MINIMUM_ARC_ANGLE_TO_DRAW(Code) | | The default minimum arc angle to draw.
|
DEFAULT_START_ANGLE | final public static double DEFAULT_START_ANGLE(Code) | | The default starting angle for the pie chart.
|
MAX_INTERIOR_GAP | final public static double MAX_INTERIOR_GAP(Code) | | The maximum interior gap (currently 40%).
|
localizationResources | protected static ResourceBundle localizationResources(Code) | | The resourceBundle for the localization.
|
PiePlot | public PiePlot()(Code) | | Creates a new plot. The dataset is initially set to null .
|
PiePlot | public PiePlot(PieDataset dataset)(Code) | | Creates a plot that will draw a pie chart for the specified dataset.
Parameters: dataset - the dataset (null permitted). |
draw | public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)(Code) | | Draws the plot on a Java 2D graphics device (such as the screen or a
printer).
Parameters: g2 - the graphics device. Parameters: area - the area within which the plot should be drawn. Parameters: anchor - the anchor point (null permitted). Parameters: parentState - the state from the parent plot, if there is one. Parameters: info - collects info about the drawing (null permitted). |
drawItem | protected void drawItem(Graphics2D g2, int section, Rectangle2D dataArea, PiePlotState state, int currentPass)(Code) | | Draws a single data item.
Parameters: g2 - the graphics device (null not permitted). Parameters: section - the section index. Parameters: dataArea - the data plot area. Parameters: state - state information for one chart. Parameters: currentPass - the current pass index. |
drawLabels | protected void drawLabels(Graphics2D g2, List keys, double totalValue, Rectangle2D plotArea, Rectangle2D linkArea, PiePlotState state)(Code) | | Draws the labels for the pie sections.
Parameters: g2 - the graphics device. Parameters: keys - the keys. Parameters: totalValue - the total value. Parameters: plotArea - the plot area. Parameters: linkArea - the link area. Parameters: state - the state. |
drawLeftLabel | protected void drawLeftLabel(Graphics2D g2, PiePlotState state, PieLabelRecord record)(Code) | | Draws a section label on the left side of the pie chart.
Parameters: g2 - the graphics device. Parameters: state - the state. Parameters: record - the label record. |
drawLeftLabels | protected void drawLeftLabels(KeyedValues leftKeys, Graphics2D g2, Rectangle2D plotArea, Rectangle2D linkArea, float maxLabelWidth, PiePlotState state)(Code) | | Draws the left labels.
Parameters: leftKeys - a collection of keys and angles (to the middle of thesection, in degrees) for the sections on the left side of the plot. Parameters: g2 - the graphics device. Parameters: plotArea - the plot area. Parameters: linkArea - the link area. Parameters: maxLabelWidth - the maximum label width. Parameters: state - the state. |
drawPie | protected void drawPie(Graphics2D g2, Rectangle2D plotArea, PlotRenderingInfo info)(Code) | | Draws the pie.
Parameters: g2 - the graphics device. Parameters: plotArea - the plot area. Parameters: info - chart rendering info. |
drawRightLabel | protected void drawRightLabel(Graphics2D g2, PiePlotState state, PieLabelRecord record)(Code) | | Draws a section label on the right side of the pie chart.
Parameters: g2 - the graphics device. Parameters: state - the state. Parameters: record - the label record. |
drawRightLabels | protected void drawRightLabels(KeyedValues keys, Graphics2D g2, Rectangle2D plotArea, Rectangle2D linkArea, float maxLabelWidth, PiePlotState state)(Code) | | Draws the right labels.
Parameters: keys - the keys. Parameters: g2 - the graphics device. Parameters: plotArea - the plot area. Parameters: linkArea - the link area. Parameters: maxLabelWidth - the maximum label width. Parameters: state - the state. |
equals | public boolean equals(Object obj)(Code) | | Tests this plot for equality with an arbitrary object. Note that the
plot's dataset is NOT included in the test for equality.
Parameters: obj - the object to test against (null permitted). true or false . |
getArcBounds | protected Rectangle2D getArcBounds(Rectangle2D unexploded, Rectangle2D exploded, double angle, double extent, double explodePercent)(Code) | | Returns a rectangle that can be used to create a pie section (taking
into account the amount by which the pie section is 'exploded').
Parameters: unexploded - the area inside which the unexploded pie sections aredrawn. Parameters: exploded - the area inside which the exploded pie sections are drawn. Parameters: angle - the start angle. Parameters: extent - the extent of the arc. Parameters: explodePercent - the amount by which the pie section is exploded. A rectangle that can be used to create a pie section. |
getBaseSectionPaint | public Paint getBaseSectionPaint()(Code) | | Returns the base section paint. This is used when no other paint is
defined, which is rare. The default value is Color.gray .
The paint (never null ). See Also: PiePlot.setBaseSectionPaint(Paint) |
getDirection | public Rotation getDirection()(Code) | | Returns the direction in which the pie sections are drawn (clockwise or
anti-clockwise).
The direction (never null ). See Also: PiePlot.setDirection(Rotation) |
getExplodePercent | public double getExplodePercent(int section)(Code) | | Returns the amount that a section should be 'exploded'.
Parameters: section - the section number. The amount that a section should be 'exploded'.PiePlot.getExplodePercent(Comparable) |
getInteriorGap | public double getInteriorGap()(Code) | | Returns the interior gap, measured as a percentage of the available
drawing space.
The gap (as a percentage of the available drawing space). See Also: PiePlot.setInteriorGap(double) |
getLabelDistributor | public AbstractPieLabelDistributor getLabelDistributor()(Code) | | Returns the object responsible for the vertical layout of the pie
section labels.
The label distributor (never null ). since: 1.0.6 |
getLabelGap | public double getLabelGap()(Code) | | Returns the gap between the edge of the pie and the labels, expressed as
a percentage of the plot width.
The gap (a percentage, where 0.05 = five percent). See Also: PiePlot.setLabelGap(double) |
getLabelLinkMargin | public double getLabelLinkMargin()(Code) | | Returns the margin (expressed as a percentage of the width or height)
between the edge of the pie and the link point.
The link margin (as a percentage, where 0.05 is five percent). See Also: PiePlot.setLabelLinkMargin(double) |
getLabelLinkPaint | public Paint getLabelLinkPaint()(Code) | | Returns the paint used for the lines that connect pie sections to their
corresponding labels.
The paint (never null ). See Also: PiePlot.setLabelLinkPaint(Paint) |
getLegendItems | public LegendItemCollection getLegendItems()(Code) | | Returns a collection of legend items for the pie chart.
The legend items (never null ). |
getMaximumExplodePercent | public double getMaximumExplodePercent()(Code) | | Returns the maximum explode percent.
The percent. |
getMaximumLabelWidth | public double getMaximumLabelWidth()(Code) | | Returns the maximum label width as a percentage of the plot width.
The width (a percentage, where 0.20 = 20 percent). See Also: PiePlot.setMaximumLabelWidth(double) |
getMinimumArcAngleToDraw | public double getMinimumArcAngleToDraw()(Code) | | Returns the minimum arc angle that will be drawn. Pie sections for an
angle smaller than this are not drawn, to avoid a JDK bug.
The minimum angle. See Also: PiePlot.setMinimumArcAngleToDraw(double) |
getPlotType | public String getPlotType()(Code) | | Returns a short string describing the type of plot.
The plot type. |
getSectionKey | protected Comparable getSectionKey(int section)(Code) | | Returns a key for the specified section. If there is no such section
in the dataset, we generate a key. This is to provide some backward
compatibility for the (now deprecated) methods that get/set attributes
based on section indices. The preferred way of doing this now is to
link the attributes directly to the section key (there are new methods
for this, starting from version 1.0.3).
Parameters: section - the section index. The key. since: 1.0.3 |
getSectionOutlinesVisible | public boolean getSectionOutlinesVisible()(Code) | | Returns the flag that controls whether or not the outline is drawn for
each pie section.
The flag that controls whether or not the outline is drawn foreach pie section. See Also: PiePlot.setSectionOutlinesVisible(boolean) |
getStartAngle | public double getStartAngle()(Code) | | Returns the start angle for the first pie section. This is measured in
degrees starting from 3 o'clock and measuring anti-clockwise.
The start angle. See Also: PiePlot.setStartAngle(double) |
initialise | public PiePlotState initialise(Graphics2D g2, Rectangle2D plotArea, PiePlot plot, Integer index, PlotRenderingInfo info)(Code) | | Initialises the drawing procedure. This method will be called before
the first item is rendered, giving the plot an opportunity to initialise
any state information it wants to maintain.
Parameters: g2 - the graphics device. Parameters: plotArea - the plot area (null not permitted). Parameters: plot - the plot. Parameters: index - the secondary index (null for primary renderer). Parameters: info - collects chart rendering information for return to caller. A state object (maintains state information relevant to one chart drawing). |
isCircular | public boolean isCircular()(Code) | | Returns a flag indicating whether the pie chart is circular, or
stretched into an elliptical shape.
A flag indicating whether the pie chart is circular. See Also: PiePlot.setCircular(boolean) |
lookupSectionOutlinePaint | protected Paint lookupSectionOutlinePaint(Comparable key, boolean autoPopulate)(Code) | | Returns the outline paint for the specified section. The lookup
involves these steps:
Parameters: key - the section key. Parameters: autoPopulate - a flag that controls whether the drawing supplier is used to auto-populate the section outline paint settings. The paint. since: 1.0.3 |
lookupSectionOutlineStroke | protected Stroke lookupSectionOutlineStroke(Comparable key, boolean autoPopulate)(Code) | | Returns the outline stroke for the specified section. The lookup
involves these steps:
Parameters: key - the section key. Parameters: autoPopulate - a flag that controls whether the drawing supplier is used to auto-populate the section outline stroke settings. The stroke. since: 1.0.3 |
lookupSectionPaint | protected Paint lookupSectionPaint(Comparable key, boolean autoPopulate)(Code) | | Returns the paint for the specified section. The lookup involves these
steps:
Parameters: key - the section key. Parameters: autoPopulate - a flag that controls whether the drawing supplier is used to auto-populate the section paint settings. The paint. since: 1.0.3 |
setCircular | public void setCircular(boolean flag)(Code) | | A flag indicating whether the pie chart is circular, or stretched into
an elliptical shape.
Parameters: flag - the new value. See Also: PiePlot.isCircular() |
setCircular | public void setCircular(boolean circular, boolean notify)(Code) | | Sets the circular attribute and, if requested, sends a
PlotChangeEvent to all registered listeners.
Parameters: circular - the new value of the flag. Parameters: notify - notify listeners? See Also: PiePlot.isCircular() |
setDirection | public void setDirection(Rotation direction)(Code) | | Sets the direction in which the pie sections are drawn and sends a
PlotChangeEvent to all registered listeners.
Parameters: direction - the direction (null not permitted). See Also: PiePlot.getDirection() |
setExplodePercent | public void setExplodePercent(Comparable key, double percent)(Code) | | Sets the amount that a pie section should be exploded and sends a
PlotChangeEvent to all registered listeners.
Parameters: key - the section key (null not permitted). Parameters: percent - the explode percentage (0.30 = 30 percent). since: 1.0.3 See Also: PiePlot.getExplodePercent(Comparable) |
setExplodePercent | public void setExplodePercent(int section, double percent)(Code) | | Sets the amount that a pie section should be exploded and sends a
PlotChangeEvent to all registered listeners.
Parameters: section - the section index. Parameters: percent - the explode percentage (0.30 = 30 percent).PiePlot.setExplodePercent(Comparable,double) |
setInteriorGap | public void setInteriorGap(double percent)(Code) | | Sets the interior gap and sends a
PlotChangeEvent to all
registered listeners. This controls the space between the edges of the
pie plot and the plot area itself (the region where the section labels
appear).
Parameters: percent - the gap (as a percentage of the available drawing space). See Also: PiePlot.getInteriorGap() |
setLabelDistributor | public void setLabelDistributor(AbstractPieLabelDistributor distributor)(Code) | | Sets the label distributor and sends a
PlotChangeEvent to all
registered listeners.
Parameters: distributor - the distributor (null not permitted). since: 1.0.6 |
setLabelGap | public void setLabelGap(double gap)(Code) | | Sets the gap between the edge of the pie and the labels (expressed as a
percentage of the plot width) and sends a
PlotChangeEvent to all
registered listeners.
Parameters: gap - the gap (a percentage, where 0.05 = five percent). See Also: PiePlot.getLabelGap() |
setLabelLinkPaint | public void setLabelLinkPaint(Paint paint)(Code) | | Sets the paint used for the lines that connect pie sections to their
corresponding labels, and sends a
PlotChangeEvent to all
registered listeners.
Parameters: paint - the paint (null not permitted). See Also: PiePlot.getLabelLinkPaint() |
setLabelLinksVisible | public void setLabelLinksVisible(boolean visible)(Code) | | Sets the flag that controls whether or not label linking lines are
visible and sends a
PlotChangeEvent to all registered listeners.
Please take care when hiding the linking lines - depending on the data
values, the labels can be displayed some distance away from the
corresponding pie section.
Parameters: visible - the flag. See Also: PiePlot.getLabelLinksVisible() |
setMaximumLabelWidth | public void setMaximumLabelWidth(double width)(Code) | | Sets the maximum label width as a percentage of the plot width and sends
a
PlotChangeEvent to all registered listeners.
Parameters: width - the width (a percentage, where 0.20 = 20 percent). See Also: PiePlot.getMaximumLabelWidth() |
setSectionOutlinesVisible | public void setSectionOutlinesVisible(boolean visible)(Code) | | Sets the flag that controls whether or not the outline is drawn for
each pie section, and sends a
PlotChangeEvent to all registered
listeners.
Parameters: visible - the flag. See Also: PiePlot.getSectionOutlinesVisible() |
setShadowXOffset | public void setShadowXOffset(double offset)(Code) | | Sets the x-offset for the shadow effect and sends a
PlotChangeEvent to all registered listeners.
Parameters: offset - the offset (in Java2D units). See Also: PiePlot.getShadowXOffset() |
setShadowYOffset | public void setShadowYOffset(double offset)(Code) | | Sets the y-offset for the shadow effect and sends a
PlotChangeEvent to all registered listeners.
Parameters: offset - the offset (in Java2D units). See Also: PiePlot.getShadowYOffset() |
setStartAngle | public void setStartAngle(double angle)(Code) | | Sets the starting angle and sends a
PlotChangeEvent to all
registered listeners. The initial default value is 90 degrees, which
corresponds to 12 o'clock. A value of zero corresponds to 3 o'clock...
this is the encoding used by Java's Arc2D class.
Parameters: angle - the angle (in degrees). See Also: PiePlot.getStartAngle() |
Methods inherited from org.jfree.chart.plot.Plot | public void addChangeListener(PlotChangeListener listener)(Code)(Java Doc) public void axisChanged(AxisChangeEvent event)(Code)(Java Doc) public Object clone() throws CloneNotSupportedException(Code)(Java Doc) public void datasetChanged(DatasetChangeEvent event)(Code)(Java Doc) abstract public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)(Code)(Java Doc) public void drawBackground(Graphics2D g2, Rectangle2D area)(Code)(Java Doc) public void drawBackgroundImage(Graphics2D g2, Rectangle2D area)(Code)(Java Doc) protected void drawNoDataMessage(Graphics2D g2, Rectangle2D area)(Code)(Java Doc) public void drawOutline(Graphics2D g2, Rectangle2D area)(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) protected void fillBackground(Graphics2D g2, Rectangle2D area)(Code)(Java Doc) protected void fillBackground(Graphics2D g2, Rectangle2D area, PlotOrientation orientation)(Code)(Java Doc) public float getBackgroundAlpha()(Code)(Java Doc) public Image getBackgroundImage()(Code)(Java Doc) public int getBackgroundImageAlignment()(Code)(Java Doc) public float getBackgroundImageAlpha()(Code)(Java Doc) public Paint getBackgroundPaint()(Code)(Java Doc) public DatasetGroup getDatasetGroup()(Code)(Java Doc) public DrawingSupplier getDrawingSupplier()(Code)(Java Doc) public float getForegroundAlpha()(Code)(Java Doc) public RectangleInsets getInsets()(Code)(Java Doc) public LegendItemCollection getLegendItems()(Code)(Java Doc) public String getNoDataMessage()(Code)(Java Doc) public Font getNoDataMessageFont()(Code)(Java Doc) public Paint getNoDataMessagePaint()(Code)(Java Doc) public Paint getOutlinePaint()(Code)(Java Doc) public Stroke getOutlineStroke()(Code)(Java Doc) public Plot getParent()(Code)(Java Doc) abstract public String getPlotType()(Code)(Java Doc) protected double getRectX(double x, double w1, double w2, RectangleEdge edge)(Code)(Java Doc) protected double getRectY(double y, double h1, double h2, RectangleEdge edge)(Code)(Java Doc) public Plot getRootPlot()(Code)(Java Doc) public void handleClick(int x, int y, PlotRenderingInfo info)(Code)(Java Doc) public boolean isOutlineVisible()(Code)(Java Doc) public boolean isSubplot()(Code)(Java Doc) public void markerChanged(MarkerChangeEvent event)(Code)(Java Doc) public void notifyListeners(PlotChangeEvent event)(Code)(Java Doc) public void removeChangeListener(PlotChangeListener listener)(Code)(Java Doc) public static RectangleEdge resolveDomainAxisLocation(AxisLocation location, PlotOrientation orientation)(Code)(Java Doc) public static RectangleEdge resolveRangeAxisLocation(AxisLocation location, PlotOrientation orientation)(Code)(Java Doc) public void setBackgroundAlpha(float alpha)(Code)(Java Doc) public void setBackgroundImage(Image image)(Code)(Java Doc) public void setBackgroundImageAlignment(int alignment)(Code)(Java Doc) public void setBackgroundImageAlpha(float alpha)(Code)(Java Doc) public void setBackgroundPaint(Paint paint)(Code)(Java Doc) protected void setDatasetGroup(DatasetGroup group)(Code)(Java Doc) public void setDrawingSupplier(DrawingSupplier supplier)(Code)(Java Doc) public void setForegroundAlpha(float alpha)(Code)(Java Doc) public void setInsets(RectangleInsets insets)(Code)(Java Doc) public void setInsets(RectangleInsets insets, boolean notify)(Code)(Java Doc) public void setNoDataMessage(String message)(Code)(Java Doc) public void setNoDataMessageFont(Font font)(Code)(Java Doc) public void setNoDataMessagePaint(Paint paint)(Code)(Java Doc) public void setOutlinePaint(Paint paint)(Code)(Java Doc) public void setOutlineStroke(Stroke stroke)(Code)(Java Doc) public void setOutlineVisible(boolean visible)(Code)(Java Doc) public void setParent(Plot parent)(Code)(Java Doc) public void zoom(double percent)(Code)(Java Doc)
|
|
|