|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines the interface for a category item renderer.
Method Summary | |
void |
drawCategoryItem(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
ValueAxis axis,
CategoryDataset data,
int series,
java.lang.Object category,
int categoryIndex,
java.lang.Object previousCategory)
Draws a single data item. |
void |
drawPlotBackground(java.awt.Graphics2D g2,
CategoryPlot plot,
java.awt.geom.Rectangle2D axisDataArea,
java.awt.Shape dataClipArea)
Draws the background for the plot. |
void |
drawRangeMarker(java.awt.Graphics2D g2,
CategoryPlot plot,
ValueAxis axis,
Marker marker,
java.awt.geom.Rectangle2D axisDataArea,
java.awt.Shape dataClipRegion)
Draws a line (or some other marker) to indicate a particular value on the range axis. |
java.awt.geom.Rectangle2D |
getAxisArea(java.awt.geom.Rectangle2D plotArea)
Returns the area that the axes must fit into. |
java.awt.Shape |
getDataClipRegion(java.awt.geom.Rectangle2D dataArea)
Returns the clip region... |
LegendItem |
getLegendItem(int series)
Returns a legend item for a series. |
CategoryPlot |
getPlot()
Returns the plot that the renderer has been assigned to. |
void |
initialise(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
ValueAxis axis,
CategoryDataset data,
ChartRenderingInfo info)
Initialises the renderer. |
boolean |
isStacked()
Returns true if the data values are stacked, and false otherwise. |
void |
setPlot(CategoryPlot plot)
Sets the plot that the renderer has been assigned to. |
Method Detail |
public void initialise(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, ValueAxis axis, CategoryDataset data, ChartRenderingInfo info)
g2
- the graphics device.dataArea
- the area inside the axes.plot
- the plot.axis
- the range axis.data
- the data.info
- collects chart rendering information for return to caller.public boolean isStacked()
If the data values are stacked, this affects the axis range required to display all the data items.
public java.awt.geom.Rectangle2D getAxisArea(java.awt.geom.Rectangle2D plotArea)
plotArea
- the data plot area.public java.awt.Shape getDataClipRegion(java.awt.geom.Rectangle2D dataArea)
dataArea
- the area inside the axes.public void drawPlotBackground(java.awt.Graphics2D g2, CategoryPlot plot, java.awt.geom.Rectangle2D axisDataArea, java.awt.Shape dataClipArea)
For most charts, the axisDataArea and the dataClipArea are the same. One case where they are different is the 3D-effect bar charts... here the data clip area extends above and to the right of the axisDataArea.
g2
- the graphics device.plot
- the plot.axisDataArea
- the area inside the axes.dataClipArea
- the data clip area.public void drawRangeMarker(java.awt.Graphics2D g2, CategoryPlot plot, ValueAxis axis, Marker marker, java.awt.geom.Rectangle2D axisDataArea, java.awt.Shape dataClipRegion)
g2
- the graphics device.plot
- the plot.axis
- the value axis.marker
- the marker.axisDataArea
- the area defined by the axes.dataClipRegion
- the data clip region.public void drawCategoryItem(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, ValueAxis axis, CategoryDataset data, int series, java.lang.Object category, int categoryIndex, java.lang.Object previousCategory)
g2
- the graphics device.dataArea
- the data plot area.plot
- the plot.axis
- the range axis.data
- the data.series
- the series number (zero-based index).category
- the category.categoryIndex
- the category number (zero-based index).previousCategory
- the previous category (null when the first category is drawn).public LegendItem getLegendItem(int series)
series
- the series (zero-based index).public CategoryPlot getPlot()
public void setPlot(CategoryPlot plot)
You shouldn't need to call this method yourself, the Plot class will do it for you.
plot
- the plot.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |