org.jfree.chart.renderer.category

Class AbstractCategoryItemRenderer

Implemented Interfaces:
CategoryItemRenderer, Cloneable, LegendItemSource, PublicCloneable, Serializable
Known Direct Subclasses:
AreaRenderer, BarRenderer, BoxAndWhiskerRenderer, CategoryStepRenderer, LevelRenderer, LineAndShapeRenderer, MinMaxCategoryRenderer

public abstract class AbstractCategoryItemRenderer
extends AbstractRenderer
implements CategoryItemRenderer, Cloneable, PublicCloneable, Serializable

An abstract base class that you can use to implement a new CategoryItemRenderer. When you create a new CategoryItemRenderer you are not required to extend this class, but it makes the job easier.

Field Summary

Fields inherited from class org.jfree.chart.renderer.AbstractRenderer

DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO

Constructor Summary

AbstractCategoryItemRenderer()
Creates a new renderer with no tool tip generator and no URL generator.

Method Summary

protected void
addItemEntity(EntityCollection entities, CategoryDataset dataset, int row, int column, Shape hotspot)
Adds an entity with the specified hotspot.
protected Point2D
calculateDomainMarkerTextAnchorPoint(Graphics2D g2, PlotOrientation orientation, Rectangle2D dataArea, Rectangle2D markerArea, RectangleInsets markerOffset, LengthAdjustmentType labelOffsetType, RectangleAnchor anchor)
Calculates the (x, y) coordinates for drawing the label for a marker on the range axis.
protected Point2D
calculateRangeMarkerTextAnchorPoint(Graphics2D g2, PlotOrientation orientation, Rectangle2D dataArea, Rectangle2D markerArea, RectangleInsets markerOffset, LengthAdjustmentType labelOffsetType, RectangleAnchor anchor)
Calculates the (x, y) coordinates for drawing a marker label.
Object
clone()
Returns an independent copy of the renderer.
protected CategoryItemRendererState
createState(PlotRenderingInfo info)
Creates a new state instance---this method is called from the initialise(Graphics2D,Rectangle2D,CategoryPlot,int,PlotRenderingInfo) method.
void
drawBackground(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea)
Draws a background for the data area.
void
drawDomainGridline(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea, double value)
Draws a grid line against the domain axis.
void
drawDomainMarker(Graphics2D g2, CategoryPlot plot, CategoryAxis axis, CategoryMarker marker, Rectangle2D dataArea)
Draws a marker for the domain axis.
protected void
drawItemLabel(Graphics2D g2, PlotOrientation orientation, CategoryDataset dataset, int row, int column, double x, double y, boolean negative)
Draws an item label.
void
drawOutline(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea)
Draws an outline for the data area.
void
drawRangeGridline(Graphics2D g2, CategoryPlot plot, ValueAxis axis, Rectangle2D dataArea, double value)
Draws a grid line against the range axis.
void
drawRangeMarker(Graphics2D g2, CategoryPlot plot, ValueAxis axis, Marker marker, Rectangle2D dataArea)
Draws a marker for the range axis.
boolean
equals(Object obj)
Tests this renderer for equality with another object.
Range
findRangeBounds(CategoryDataset dataset)
Returns the range of values the renderer requires to display all the items from the specified dataset.
CategoryItemLabelGenerator
getBaseItemLabelGenerator()
Returns the base item label generator.
CategoryURLGenerator
getBaseItemURLGenerator()
Returns the base item URL generator.
CategoryToolTipGenerator
getBaseToolTipGenerator()
Returns the base tool tip generator (the "layer 2" generator).
int
getColumnCount()
Returns the number of columns in the dataset.
protected CategoryAxis
getDomainAxis(CategoryPlot plot, int index)
Returns a domain axis for a plot.
DrawingSupplier
getDrawingSupplier()
Returns the drawing supplier from the plot.
CategoryItemLabelGenerator
getItemLabelGenerator(int row, int column)
Returns the item label generator for a data item.
CategoryURLGenerator
getItemURLGenerator(int row, int column)
Returns the URL generator for a data item.
LegendItem
getLegendItem(int datasetIndex, int series)
Returns a legend item for a series.
CategorySeriesLabelGenerator
getLegendItemLabelGenerator()
Returns the legend item label generator.
CategorySeriesLabelGenerator
getLegendItemToolTipGenerator()
Returns the legend item tool tip generator.
CategorySeriesLabelGenerator
getLegendItemURLGenerator()
Returns the legend item URL generator.
LegendItemCollection
getLegendItems()
Returns a (possibly empty) collection of legend items for the series that this renderer is responsible for drawing.
int
getPassCount()
Returns the number of passes through the dataset required by the renderer.
CategoryPlot
getPlot()
Returns the plot that the renderer has been assigned to (where null indicates that the renderer is not currently assigned to a plot).
protected ValueAxis
getRangeAxis(CategoryPlot plot, int index)
Returns a range axis for a plot.
int
getRowCount()
Returns the number of rows in the dataset.
CategoryItemLabelGenerator
getSeriesItemLabelGenerator(int series)
Returns the item label generator for a series.
CategoryURLGenerator
getSeriesItemURLGenerator(int series)
Returns the URL generator for a series.
CategoryToolTipGenerator
getSeriesToolTipGenerator(int series)
Returns the tool tip generator for the specified series (a "layer 1" generator).
CategoryToolTipGenerator
getToolTipGenerator()
Returns the tool tip generator that will be used for ALL items in the dataset (the "layer 0" generator).
CategoryToolTipGenerator
getToolTipGenerator(int row, int column)
Returns the tool tip generator that should be used for the specified item.
int
hashCode()
Returns a hash code for the renderer.
CategoryItemRendererState
initialise(Graphics2D g2, Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info)
Initialises the renderer and returns a state object that will be used for the remainder of the drawing process for a single chart.
void
setBaseItemLabelGenerator(CategoryItemLabelGenerator generator)
Sets the base item label generator and sends a RendererChangeEvent to all registered listeners.
void
setBaseItemURLGenerator(CategoryURLGenerator generator)
Sets the base item URL generator.
void
setBaseToolTipGenerator(CategoryToolTipGenerator generator)
Sets the base tool tip generator and sends a RendererChangeEvent to all registered listeners.
void
setItemLabelGenerator(CategoryItemLabelGenerator generator)
Sets the item label generator for ALL series and sends a RendererChangeEvent to all registered listeners.
void
setItemURLGenerator(CategoryURLGenerator generator)
Sets the item URL generator for ALL series.
void
setLegendItemLabelGenerator(CategorySeriesLabelGenerator generator)
Sets the legend item label generator and sends a RendererChangeEvent to all registered listeners.
void
setLegendItemToolTipGenerator(CategorySeriesLabelGenerator generator)
Sets the legend item tool tip generator and sends a RendererChangeEvent to all registered listeners.
void
setLegendItemURLGenerator(CategorySeriesLabelGenerator generator)
Sets the legend item URL generator and sends a RendererChangeEvent to all registered listeners.
void
setPlot(CategoryPlot plot)
Sets the plot that the renderer has been assigned to.
void
setSeriesItemLabelGenerator(int series, CategoryItemLabelGenerator generator)
Sets the item label generator for a series and sends a RendererChangeEvent to all registered listeners.
void
setSeriesItemURLGenerator(int series, CategoryURLGenerator generator)
Sets the URL generator for a series.
void
setSeriesToolTipGenerator(int series, CategoryToolTipGenerator generator)
Sets the tool tip generator for a series and sends a RendererChangeEvent to all registered listeners.
void
setToolTipGenerator(CategoryToolTipGenerator generator)
Sets the tool tip generator for ALL series and sends a RendererChangeEvent to all registered listeners.

Methods inherited from class org.jfree.chart.renderer.AbstractRenderer

addChangeListener, calculateLabelAnchorPoint, clone, equals, fireChangeEvent, getBaseCreateEntities, getBaseFillPaint, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getCreateEntities, getDrawingSupplier, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, hasListener, hashCode, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, notifyListeners, removeChangeListener, setBaseCreateEntities, setBaseCreateEntities, setBaseFillPaint, setBaseFillPaint, setBaseItemLabelFont, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlinePaint, setBaseOutlineStroke, setBaseOutlineStroke, setBasePaint, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseShape, setBaseStroke, setBaseStroke, setCreateEntities, setCreateEntities, setFillPaint, setFillPaint, setItemLabelAnchorOffset, setItemLabelFont, setItemLabelFont, setItemLabelPaint, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlinePaint, setOutlineStroke, setOutlineStroke, setPaint, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesCreateEntities, setSeriesCreateEntities, setSeriesFillPaint, setSeriesFillPaint, setSeriesItemLabelFont, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesShape, setSeriesStroke, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setShape, setStroke, setStroke

Constructor Details

AbstractCategoryItemRenderer

protected AbstractCategoryItemRenderer()
Creates a new renderer with no tool tip generator and no URL generator. The defaults (no tool tip or URL generators) have been chosen to minimise the processing required to generate a default chart. If you require tool tips or URLs, then you can easily add the required generators.

Method Details

addItemEntity

protected void addItemEntity(EntityCollection entities,
                             CategoryDataset dataset,
                             int row,
                             int column,
                             Shape hotspot)
Adds an entity with the specified hotspot.
Parameters:
entities - the entity collection.
dataset - the dataset.
row - the row index.
column - the column index.
hotspot - the hotspot.

calculateDomainMarkerTextAnchorPoint

protected Point2D calculateDomainMarkerTextAnchorPoint(Graphics2D g2,
                                                       PlotOrientation orientation,
                                                       Rectangle2D dataArea,
                                                       Rectangle2D markerArea,
                                                       RectangleInsets markerOffset,
                                                       LengthAdjustmentType labelOffsetType,
                                                       RectangleAnchor anchor)
Calculates the (x, y) coordinates for drawing the label for a marker on the range axis.
Parameters:
g2 - the graphics device.
orientation - the plot orientation.
dataArea - the data area.
markerArea - the rectangle surrounding the marker.
markerOffset - the marker offset.
labelOffsetType - the label offset type.
anchor - the label anchor.
Returns:
The coordinates for drawing the marker label.

calculateRangeMarkerTextAnchorPoint

protected Point2D calculateRangeMarkerTextAnchorPoint(Graphics2D g2,
                                                      PlotOrientation orientation,
                                                      Rectangle2D dataArea,
                                                      Rectangle2D markerArea,
                                                      RectangleInsets markerOffset,
                                                      LengthAdjustmentType labelOffsetType,
                                                      RectangleAnchor anchor)
Calculates the (x, y) coordinates for drawing a marker label.
Parameters:
g2 - the graphics device.
orientation - the plot orientation.
dataArea - the data area.
markerArea - the rectangle surrounding the marker.
markerOffset - the marker offset.
labelOffsetType - the label offset type.
anchor - the label anchor.
Returns:
The coordinates for drawing the marker label.

clone

public Object clone()
            throws CloneNotSupportedException
Returns an independent copy of the renderer. The plot reference is shallow copied.
Overrides:
clone in interface AbstractRenderer
Returns:
A clone.

createState

protected CategoryItemRendererState createState(PlotRenderingInfo info)
Creates a new state instance---this method is called from the initialise(Graphics2D,Rectangle2D,CategoryPlot,int,PlotRenderingInfo) method. Subclasses can override this method if they need to use a subclass of CategoryItemRendererState.
Parameters:
info - collects plot rendering info (null permitted).
Returns:
The new state instance (never null).
Since:
1.0.5

drawBackground

public void drawBackground(Graphics2D g2,
                           CategoryPlot plot,
                           Rectangle2D dataArea)
Draws a background for the data area. The default implementation just gets the plot to draw the outline, but some renderers will override this behaviour.
Specified by:
drawBackground in interface CategoryItemRenderer
Parameters:
g2 - the graphics device.
plot - the plot.
dataArea - the data area.

drawDomainGridline

public void drawDomainGridline(Graphics2D g2,
                               CategoryPlot plot,
                               Rectangle2D dataArea,
                               double value)
Draws a grid line against the domain axis.

Note that this default implementation assumes that the horizontal axis is the domain axis. If this is not the case, you will need to override this method.

Specified by:
drawDomainGridline in interface CategoryItemRenderer
Parameters:
g2 - the graphics device.
plot - the plot.
dataArea - the area for plotting data (not yet adjusted for any 3D effect).
value - the Java2D value at which the grid line should be drawn.

drawDomainMarker

public void drawDomainMarker(Graphics2D g2,
                             CategoryPlot plot,
                             CategoryAxis axis,
                             CategoryMarker marker,
                             Rectangle2D dataArea)
Draws a marker for the domain axis.
Specified by:
drawDomainMarker in interface CategoryItemRenderer
Parameters:
g2 - the graphics device (not null).
plot - the plot (not null).
axis - the range axis (not null).
marker - the marker to be drawn (not null).
dataArea - the area inside the axes (not null).

drawItemLabel

protected void drawItemLabel(Graphics2D g2,
                             PlotOrientation orientation,
                             CategoryDataset dataset,
                             int row,
                             int column,
                             double x,
                             double y,
                             boolean negative)
Draws an item label.
Parameters:
g2 - the graphics device.
orientation - the orientation.
dataset - the dataset.
row - the row.
column - the column.
x - the x coordinate (in Java2D space).
y - the y coordinate (in Java2D space).
negative - indicates a negative value (which affects the item label position).

drawOutline

public void drawOutline(Graphics2D g2,
                        CategoryPlot plot,
                        Rectangle2D dataArea)
Draws an outline for the data area. The default implementation just gets the plot to draw the outline, but some renderers will override this behaviour.
Specified by:
drawOutline in interface CategoryItemRenderer
Parameters:
g2 - the graphics device.
plot - the plot.
dataArea - the data area.

drawRangeGridline

public void drawRangeGridline(Graphics2D g2,
                              CategoryPlot plot,
                              ValueAxis axis,
                              Rectangle2D dataArea,
                              double value)
Draws a grid line against the range axis.
Specified by:
drawRangeGridline in interface CategoryItemRenderer
Parameters:
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 at which the grid line should be drawn.

drawRangeMarker

public void drawRangeMarker(Graphics2D g2,
                            CategoryPlot plot,
                            ValueAxis axis,
                            Marker marker,
                            Rectangle2D dataArea)
Draws a marker for the range axis.
Specified by:
drawRangeMarker in interface CategoryItemRenderer
Parameters:
g2 - the graphics device (not null).
plot - the plot (not null).
axis - the range axis (not null).
marker - the marker to be drawn (not null).
dataArea - the area inside the axes (not null).

equals

public boolean equals(Object obj)
Tests this renderer for equality with another object.
Overrides:
equals in interface AbstractRenderer
Parameters:
obj - the object.
Returns:
true or false.

findRangeBounds

public Range findRangeBounds(CategoryDataset dataset)
Returns the range of values the renderer requires to display all the items from the specified dataset.
Specified by:
findRangeBounds in interface CategoryItemRenderer
Parameters:
dataset - the dataset (null permitted).
Returns:
The range (or null if the dataset is null or empty).

getBaseItemLabelGenerator

public CategoryItemLabelGenerator getBaseItemLabelGenerator()
Returns the base item label generator.
Specified by:
getBaseItemLabelGenerator in interface CategoryItemRenderer
Returns:
The generator (possibly null).

getBaseItemURLGenerator

public CategoryURLGenerator getBaseItemURLGenerator()
Returns the base item URL generator.
Specified by:
getBaseItemURLGenerator in interface CategoryItemRenderer
Returns:
The item URL generator.

getBaseToolTipGenerator

public CategoryToolTipGenerator getBaseToolTipGenerator()
Returns the base tool tip generator (the "layer 2" generator).
Specified by:
getBaseToolTipGenerator in interface CategoryItemRenderer
Returns:
The tool tip generator (possibly null).

getColumnCount

public int getColumnCount()
Returns the number of columns in the dataset. This value is updated in the initialise(Graphics2D,Rectangle2D,CategoryPlot,int,PlotRenderingInfo) method.
Returns:
The column count.

getDomainAxis

protected CategoryAxis getDomainAxis(CategoryPlot plot,
                                     int index)
Returns a domain axis for a plot.
Parameters:
plot - the plot.
index - the axis index.
Returns:
A domain axis.

getDrawingSupplier

public DrawingSupplier getDrawingSupplier()
Returns the drawing supplier from the plot.
Overrides:
getDrawingSupplier in interface AbstractRenderer
Returns:
The drawing supplier (possibly null).

getItemLabelGenerator

public CategoryItemLabelGenerator getItemLabelGenerator(int row,
                                                        int column)
Returns the item label generator for a data item. This implementation simply passes control to the getSeriesItemLabelGenerator(int) method. If, for some reason, you want a different generator for individual items, you can override this method.
Specified by:
getItemLabelGenerator in interface CategoryItemRenderer
Parameters:
row - the row index (zero based).
column - the column index (zero based).
Returns:
The generator (possibly null).

getItemURLGenerator

public CategoryURLGenerator getItemURLGenerator(int row,
                                                int column)
Returns the URL generator for a data item. This method just calls the getSeriesItemURLGenerator method, but you can override this behaviour if you want to.
Specified by:
getItemURLGenerator in interface CategoryItemRenderer
Parameters:
row - the row index (zero based).
column - the column index (zero based).
Returns:
The URL generator.

getLegendItem

public LegendItem getLegendItem(int datasetIndex,
                                int series)
Returns a legend item for a series.
Specified by:
getLegendItem in interface CategoryItemRenderer
Parameters:
datasetIndex - the dataset index (zero-based).
series - the series index (zero-based).
Returns:
The legend item.

getLegendItemLabelGenerator

public CategorySeriesLabelGenerator getLegendItemLabelGenerator()
Returns the legend item label generator.
Returns:
The label generator (never null).

getLegendItemToolTipGenerator

public CategorySeriesLabelGenerator getLegendItemToolTipGenerator()
Returns the legend item tool tip generator.
Returns:
The tool tip generator (possibly null).

getLegendItemURLGenerator

public CategorySeriesLabelGenerator getLegendItemURLGenerator()
Returns the legend item URL generator.
Returns:
The URL generator (possibly null).

getLegendItems

public LegendItemCollection getLegendItems()
Returns a (possibly empty) collection of legend items for the series that this renderer is responsible for drawing.
Specified by:
getLegendItems in interface LegendItemSource
Returns:
The legend item collection (never null).

getPassCount

public int getPassCount()
Returns the number of passes through the dataset required by the renderer. This method returns 1, subclasses should override if they need more passes.
Specified by:
getPassCount in interface CategoryItemRenderer
Returns:
The pass count.

getPlot

public CategoryPlot getPlot()
Returns the plot that the renderer has been assigned to (where null indicates that the renderer is not currently assigned to a plot).
Specified by:
getPlot in interface CategoryItemRenderer
Returns:
The plot (possibly null).

getRangeAxis

protected ValueAxis getRangeAxis(CategoryPlot plot,
                                 int index)
Returns a range axis for a plot.
Parameters:
plot - the plot.
index - the axis index.
Returns:
A range axis.

getRowCount

public int getRowCount()
Returns the number of rows in the dataset. This value is updated in the initialise(Graphics2D,Rectangle2D,CategoryPlot,int,PlotRenderingInfo) method.
Returns:
The row count.

getSeriesItemLabelGenerator

public CategoryItemLabelGenerator getSeriesItemLabelGenerator(int series)
Returns the item label generator for a series.
Specified by:
getSeriesItemLabelGenerator in interface CategoryItemRenderer
Parameters:
series - the series index (zero based).
Returns:
The generator (possibly null).

getSeriesItemURLGenerator

public CategoryURLGenerator getSeriesItemURLGenerator(int series)
Returns the URL generator for a series.
Specified by:
getSeriesItemURLGenerator in interface CategoryItemRenderer
Parameters:
series - the series index (zero based).
Returns:
The URL generator for the series.

getSeriesToolTipGenerator

public CategoryToolTipGenerator getSeriesToolTipGenerator(int series)
Returns the tool tip generator for the specified series (a "layer 1" generator).
Specified by:
getSeriesToolTipGenerator in interface CategoryItemRenderer
Parameters:
series - the series index (zero-based).
Returns:
The tool tip generator (possibly null).

getToolTipGenerator

public CategoryToolTipGenerator getToolTipGenerator()
Returns the tool tip generator that will be used for ALL items in the dataset (the "layer 0" generator).
Specified by:
getToolTipGenerator in interface CategoryItemRenderer
Returns:
A tool tip generator (possibly null).

getToolTipGenerator

public CategoryToolTipGenerator getToolTipGenerator(int row,
                                                    int column)
Returns the tool tip generator that should be used for the specified item. This method looks up the generator using the "three-layer" approach outlined in the general description of this interface. You can override this method if you want to return a different generator per item.
Specified by:
getToolTipGenerator in interface CategoryItemRenderer
Parameters:
row - the row index (zero-based).
column - the column index (zero-based).
Returns:
The generator (possibly null).

hashCode

public int hashCode()
Returns a hash code for the renderer.
Overrides:
hashCode in interface AbstractRenderer
Returns:
The hash code.

initialise

public CategoryItemRendererState initialise(Graphics2D g2,
                                            Rectangle2D dataArea,
                                            CategoryPlot plot,
                                            int rendererIndex,
                                            PlotRenderingInfo info)
Initialises the renderer and returns a state object that will be used for the remainder of the drawing process for a single chart. The state object allows for the fact that the renderer may be used simultaneously by multiple threads (each thread will work with a separate state object).
Specified by:
initialise in interface CategoryItemRenderer
Parameters:
g2 - the graphics device.
dataArea - the data area.
plot - the plot.
rendererIndex - the renderer index.
info - an object for returning information about the structure of the plot (null permitted).
Returns:
The renderer state.

setBaseItemLabelGenerator

public void setBaseItemLabelGenerator(CategoryItemLabelGenerator generator)
Sets the base item label generator and sends a RendererChangeEvent to all registered listeners.
Specified by:
setBaseItemLabelGenerator in interface CategoryItemRenderer
Parameters:
generator - the generator (null permitted).

setBaseItemURLGenerator

public void setBaseItemURLGenerator(CategoryURLGenerator generator)
Sets the base item URL generator.
Specified by:
setBaseItemURLGenerator in interface CategoryItemRenderer
Parameters:
generator - the item URL generator.

setBaseToolTipGenerator

public void setBaseToolTipGenerator(CategoryToolTipGenerator generator)
Sets the base tool tip generator and sends a RendererChangeEvent to all registered listeners.
Specified by:
setBaseToolTipGenerator in interface CategoryItemRenderer
Parameters:
generator - the generator (null permitted).

setItemLabelGenerator

public void setItemLabelGenerator(CategoryItemLabelGenerator generator)
Sets the item label generator for ALL series and sends a RendererChangeEvent to all registered listeners.
Specified by:
setItemLabelGenerator in interface CategoryItemRenderer
Parameters:
generator - the generator (null permitted).

setItemURLGenerator

public void setItemURLGenerator(CategoryURLGenerator generator)
Sets the item URL generator for ALL series.
Specified by:
setItemURLGenerator in interface CategoryItemRenderer
Parameters:
generator - the generator.

setLegendItemLabelGenerator

public void setLegendItemLabelGenerator(CategorySeriesLabelGenerator generator)
Sets the legend item label generator and sends a RendererChangeEvent to all registered listeners.
Parameters:
generator - the generator (null not permitted).

setLegendItemToolTipGenerator

public void setLegendItemToolTipGenerator(CategorySeriesLabelGenerator generator)
Sets the legend item tool tip generator and sends a RendererChangeEvent to all registered listeners.
Parameters:
generator - the generator (null permitted).

setLegendItemURLGenerator

public void setLegendItemURLGenerator(CategorySeriesLabelGenerator generator)
Sets the legend item URL generator and sends a RendererChangeEvent to all registered listeners.
Parameters:
generator - the generator (null permitted).

setPlot

public void setPlot(CategoryPlot plot)
Sets the plot that the renderer has been assigned to. This method is usually called by the CategoryPlot, in normal usage you shouldn't need to call this method directly.
Specified by:
setPlot in interface CategoryItemRenderer
Parameters:
plot - the plot (null not permitted).
See Also:
getPlot()

setSeriesItemLabelGenerator

public void setSeriesItemLabelGenerator(int series,
                                        CategoryItemLabelGenerator generator)
Sets the item label generator for a series and sends a RendererChangeEvent to all registered listeners.
Specified by:
setSeriesItemLabelGenerator in interface CategoryItemRenderer
Parameters:
series - the series index (zero based).
generator - the generator (null permitted).

setSeriesItemURLGenerator

public void setSeriesItemURLGenerator(int series,
                                      CategoryURLGenerator generator)
Sets the URL generator for a series.
Specified by:
setSeriesItemURLGenerator in interface CategoryItemRenderer
Parameters:
series - the series index (zero based).
generator - the generator.

setSeriesToolTipGenerator

public void setSeriesToolTipGenerator(int series,
                                      CategoryToolTipGenerator generator)
Sets the tool tip generator for a series and sends a RendererChangeEvent to all registered listeners.
Specified by:
setSeriesToolTipGenerator in interface CategoryItemRenderer
Parameters:
series - the series index (zero-based).
generator - the generator (null permitted).

setToolTipGenerator

public void setToolTipGenerator(CategoryToolTipGenerator generator)
Sets the tool tip generator for ALL series and sends a RendererChangeEvent to all registered listeners.
Specified by:
setToolTipGenerator in interface CategoryItemRenderer
Parameters:
generator - the generator (null permitted).