|
|||||||||
| Home >> All >> com >> jrefinery >> [ chart overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.jrefinery.chart
Class PiePlot

java.lang.ObjectPlot
com.jrefinery.chart.PiePlot
- public class PiePlot
- extends Plot
A plot that displays data in the form of a pie chart, using data from any class that implements the CategoryDataSource interface.
| Field Summary | |
(package private) boolean |
drawCircle
Flag determining whether to draw an ellipse or a perfect circle. |
(package private) boolean |
drawWedgeLabels
Flag determining whether to draw wedge labels. |
(package private) int |
interiorSpacing
Interior spacing - that is the room between the plot border and a rectangle that will be considered for drawing the pie. |
(package private) java.awt.Font |
wedgeLabelFont
|
(package private) java.awt.Paint |
wedgePaint
|
| Constructor Summary | |
PiePlot(JFreeChart chart)
Standard constructor - builds a PiePlot with mostly default attributes. |
|
PiePlot(JFreeChart chart,
java.awt.Insets insets)
Standard constructor: returns a PiePlot with attributes specified by the caller. |
|
| Method Summary | |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D drawArea)
Draws the plot on a Java 2D graphics device (such as the screen or a printer). |
java.util.List |
getCategories()
A convenience method that returns a lit of the categories in the data source. |
CategoryDataSource |
getDataSource()
A convenience method that returns the data source for the plot, cast as a CategoryDataSource. |
boolean |
getDrawCircle()
Returns true if this pie chart is configured to draw a perfect circle in the available chart area, and false otherwise. |
boolean |
getDrawWedgeLabels()
Returns true if this pie chart is configured to draw wedge labels, and false otherwise. |
java.lang.String |
getPlotType()
Returns a short string describing the type of plot. |
java.awt.Font |
getWedgeLabelFont()
|
java.awt.Paint |
getWedgeLabelPaint()
|
boolean |
isCompatibleHorizontalAxis(Axis axis)
Checks the compatibility of a horizontal axis, returning true if the axis is compatible with the plot, and false otherwise. |
boolean |
isCompatibleVerticalAxis(Axis axis)
Checks the compatibility of a vertical axis, returning true if the axis is compatible with the plot, and false otherwise. |
void |
setDrawCircle(boolean circle)
Sets this chart's property that causes it to draw the shape as either a perfect circle or an ellipse. |
void |
setDrawWedgeLabels(boolean wedge)
Sets this chart's property that causes it to draw wedge labels. |
void |
setInteriorSpacing(int i)
|
void |
setWedgeLabelFont(java.awt.Font f)
|
void |
setWedgeLabelPaint(java.awt.Paint p)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
drawCircle
boolean drawCircle
- Flag determining whether to draw an ellipse or a perfect circle.
drawWedgeLabels
boolean drawWedgeLabels
- Flag determining whether to draw wedge labels.
interiorSpacing
int interiorSpacing
- Interior spacing - that is the room between the plot border and a rectangle that will be
considered for drawing the pie.
wedgeLabelFont
java.awt.Font wedgeLabelFont
wedgePaint
java.awt.Paint wedgePaint
| Constructor Detail |
PiePlot
public PiePlot(JFreeChart chart,
java.awt.Insets insets)
throws AxisNotCompatibleException
- Standard constructor: returns a PiePlot with attributes specified by the caller.
PiePlot
public PiePlot(JFreeChart chart)
throws AxisNotCompatibleException
- Standard constructor - builds a PiePlot with mostly default attributes.
| Method Detail |
getDataSource
public CategoryDataSource getDataSource()
- A convenience method that returns the data source for the plot, cast as a CategoryDataSource.
getCategories
public java.util.List getCategories()
- A convenience method that returns a lit of the categories in the data source.
isCompatibleHorizontalAxis
public boolean isCompatibleHorizontalAxis(Axis axis)
- Checks the compatibility of a horizontal axis, returning true if the axis is compatible with
the plot, and false otherwise.
isCompatibleVerticalAxis
public boolean isCompatibleVerticalAxis(Axis axis)
- Checks the compatibility of a vertical axis, returning true if the axis is compatible with
the plot, and false otherwise.
setInteriorSpacing
public void setInteriorSpacing(int i)
draw
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea)
- Draws the plot on a Java 2D graphics device (such as the screen or a printer).
getPlotType
public java.lang.String getPlotType()
- Returns a short string describing the type of plot.
getDrawCircle
public boolean getDrawCircle()
- Returns true if this pie chart is configured to draw a perfect circle in the available chart
area, and false otherwise.
setDrawCircle
public void setDrawCircle(boolean circle)
- Sets this chart's property that causes it to draw the shape as either a perfect circle or an
ellipse.
getDrawWedgeLabels
public boolean getDrawWedgeLabels()
- Returns true if this pie chart is configured to draw wedge labels,
and false otherwise.
setDrawWedgeLabels
public void setDrawWedgeLabels(boolean wedge)
- Sets this chart's property that causes it to draw wedge labels.
setWedgeLabelFont
public void setWedgeLabelFont(java.awt.Font f)
getWedgeLabelFont
public java.awt.Font getWedgeLabelFont()
setWedgeLabelPaint
public void setWedgeLabelPaint(java.awt.Paint p)
getWedgeLabelPaint
public java.awt.Paint getWedgeLabelPaint()
|
|||||||||
| Home >> All >> com >> jrefinery >> [ chart overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
Plot