draw
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).
- draw in interface Plot
g2
- the graphics device.area
- the area within which the plot should be drawn.anchor
- the anchor point (null
permitted).parentState
- the state from the parent plot, if there is one.info
- collects info about the drawing.
equals
public boolean equals(Object obj)
Tests this plot for equality with an arbitrary object. Note that the
plot's dataset is not considered in the equality test.
- equals in interface Plot
obj
- the object (null
permitted).
true
if this plot is equal to obj
, and
false
otherwise.
getAggregatedItemsKey
public Comparable getAggregatedItemsKey()
Returns the key for aggregated items in the pie plots, if there are any.
The default value is "Other".
- The aggregated items key.
getAggregatedItemsPaint
public Paint getAggregatedItemsPaint()
Returns the paint used to draw the pie section representing the
aggregated items. The default value is Color.lightGray
.
getDataExtractOrder
public TableOrder getDataExtractOrder()
Returns the data extract order (by row or by column).
- The data extract order (never
null
).
getLimit
public double getLimit()
Returns the limit (as a percentage) below which small pie sections are
aggregated.
getPieChart
public JFreeChart getPieChart()
Returns the pie chart that is used to draw the individual pie plots.
setAggregatedItemsKey
public void setAggregatedItemsKey(Comparable key)
Sets the key for aggregated items in the pie plots. You must ensure
that this doesn't clash with any keys in the dataset.
key
- the key (null
not permitted).
setAggregatedItemsPaint
public void setAggregatedItemsPaint(Paint paint)
Sets the paint used to draw the pie section representing the aggregated
items and sends a
PlotChangeEvent
to all registered listeners.
paint
- the paint (null
not permitted).
setDataExtractOrder
public void setDataExtractOrder(TableOrder order)
Sets the data extract order (by row or by column) and sends a
PlotChangeEvent
to all registered listeners.
order
- the order (null
not permitted).
setLimit
public void setLimit(double limit)
Sets the limit below which pie sections are aggregated.
Set this to 0.0 if you don't want any aggregation to occur.
limit
- the limit percent.
setPieChart
public void setPieChart(JFreeChart pieChart)
Sets the chart that is used to draw the individual pie plots.
pieChart
- the pie chart.