|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A plug-in object that is used by the CategoryPlot
class to display individual data items
from a CategoryDataset
.
This interface defines the methods that must be provided by all renderers. If you are
implementing a custom renderer, you should consider extending the
AbstractCategoryItemRenderer
class.
Field Summary | |
static int |
STACKED
A constant for the range type (STACKED). |
static int |
STANDARD
A constant for the range type (STANDARD). |
Method Summary | |
void |
drawBackground(java.awt.Graphics2D g2,
CategoryPlot plot,
java.awt.geom.Rectangle2D dataArea)
Draws a background for the data area. |
void |
drawDomainGridline(java.awt.Graphics2D g2,
CategoryPlot plot,
java.awt.geom.Rectangle2D dataArea,
double value)
Draws a grid line against the domain axis. |
void |
drawItem(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
CategoryAxis domainAxis,
ValueAxis rangeAxis,
CategoryDataset data,
int dataset,
int row,
int column)
Draws a single data item. |
void |
drawOutline(java.awt.Graphics2D g2,
CategoryPlot plot,
java.awt.geom.Rectangle2D dataArea)
Draws an outline for the data area. |
void |
drawRangeGridline(java.awt.Graphics2D g2,
CategoryPlot plot,
ValueAxis axis,
java.awt.geom.Rectangle2D dataArea,
double value)
Draws a grid line against the range axis. |
void |
drawRangeMarker(java.awt.Graphics2D g2,
CategoryPlot plot,
ValueAxis axis,
Marker marker,
java.awt.geom.Rectangle2D dataArea)
Draws a line (or some other marker) to indicate a particular value on the range axis. |
java.awt.Paint |
getItemOutlinePaint(int dataset,
int series,
int item)
Returns the outline paint for an item. |
java.awt.Paint |
getItemPaint(int dataset,
int series,
int category)
Returns the paint used to fill an item. |
java.awt.Shape |
getItemShape(int dataset,
int series,
int item)
Returns the shape for an item. |
java.awt.Stroke |
getItemStroke(int dataset,
int series,
int item)
Returns the stroke for an item. |
LegendItem |
getLegendItem(int datasetIndex,
int series)
Returns a legend item for a series. |
int |
getRangeType()
Returns the range type for the renderer. |
java.awt.Paint |
getSeriesOutlinePaint(int dataset,
int series)
Returns the outline paint for a series. |
java.awt.Paint |
getSeriesPaint(int dataset,
int series)
Returns the paint used to fill shapes for this renderer. |
java.awt.Shape |
getSeriesShape(int dataset,
int series)
Returns the shape for a series. |
java.awt.Stroke |
getSeriesStroke(int dataset,
int series)
Returns the stroke for a series. |
CategoryToolTipGenerator |
getToolTipGenerator()
Returns the tool tip generator. |
void |
initialise(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
ChartRenderingInfo info)
Initialises the renderer. |
void |
setToolTipGenerator(CategoryToolTipGenerator generator)
Sets the tool tip generator. |
Field Detail |
public static final int STANDARD
public static final int STACKED
Method Detail |
public int getRangeType()
Two types are recognised:
STANDARD
- data items are plotted individually, so the axis range should
extend from the smallest value to the largest value;STACKED
- data items are stacked on top of one another, so to determine
the axis range, all the items in a series need to be summed together.
public CategoryToolTipGenerator getToolTipGenerator()
null
).public void setToolTipGenerator(CategoryToolTipGenerator generator)
Classes that implement this interface are not required to support tool tip generation,
although it is recommended. If the renderer does not support tooltips, this method should
throw an UnsupportedOperationException
.
generator
- the tool tip generator (null
permitted).public void initialise(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, ChartRenderingInfo info)
g2
- the graphics device.dataArea
- the area inside the axes.plot
- the plot.info
- collects chart rendering information for return to caller.public java.awt.Paint getSeriesPaint(int dataset, int series)
dataset
- the dataset (zero-based index).series
- the series (zero-based index).
public java.awt.Paint getItemPaint(int dataset, int series, int category)
A plot can have more than one dataset, the dataset index indicates which one is being used.
dataset
- the dataset index (zero-based).series
- the series index (zero-based).category
- the category index (zero-based).
public LegendItem getLegendItem(int datasetIndex, int series)
datasetIndex
- the dataset index (zero-based).series
- the series (zero-based index).
public void drawBackground(java.awt.Graphics2D g2, CategoryPlot plot, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.plot
- the plot.dataArea
- the data area.public void drawOutline(java.awt.Graphics2D g2, CategoryPlot plot, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.plot
- the plot.dataArea
- the data area.public void drawItem(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset data, int dataset, int row, int column)
g2
- the graphics device.dataArea
- the data plot area.plot
- the plot.domainAxis
- the domain axis.rangeAxis
- the range axis.data
- the data.dataset
- the dataset index (zero-based).row
- the row index (zero-based).column
- the column index (zero-based).public void drawDomainGridline(java.awt.Graphics2D g2, CategoryPlot plot, java.awt.geom.Rectangle2D dataArea, double value)
g2
- the graphics device.plot
- the plot.dataArea
- the area for plotting data (not yet adjusted for any 3D effect).value
- the value.public void drawRangeGridline(java.awt.Graphics2D g2, CategoryPlot plot, ValueAxis axis, java.awt.geom.Rectangle2D dataArea, double value)
g2
- the graphics device.plot
- the plot.axis
- the value axis.dataArea
- the area for plotting data (not yet adjusted for any 3D effect).value
- the value.public void drawRangeMarker(java.awt.Graphics2D g2, CategoryPlot plot, ValueAxis axis, Marker marker, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.plot
- the plot.axis
- the value axis.marker
- the marker.dataArea
- the area for plotting data (not including 3D effect).public java.awt.Paint getItemOutlinePaint(int dataset, int series, int item)
dataset
- the dataset index (zero-based).series
- the series index (zero-based).item
- the item index (zero-based).
public java.awt.Paint getSeriesOutlinePaint(int dataset, int series)
dataset
- the dataset index (zero-based).series
- the series index (zero-based).
public java.awt.Stroke getItemStroke(int dataset, int series, int item)
dataset
- the dataset index (zero-based).series
- the series index (zero-based).item
- the item index (zero-based).
public java.awt.Stroke getSeriesStroke(int dataset, int series)
dataset
- the dataset index (zero-based).series
- the series index (zero-based).
public java.awt.Shape getItemShape(int dataset, int series, int item)
dataset
- the dataset index (zero-based).series
- the series index (zero-based).item
- the item index (zero-based).
public java.awt.Shape getSeriesShape(int dataset, int series)
dataset
- the dataset index (zero-based).series
- the series index (zero-based).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |