public abstract class AbstractCategoryItemRenderer extends AbstractRenderer implements CategoryItemRenderer, java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
CategoryItemRenderer
. When you create a new
CategoryItemRenderer
you are not required to extend this class,
but it makes the job easier.DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO
Modifier | Constructor and Description |
---|---|
protected |
AbstractCategoryItemRenderer()
Creates a new renderer with no tool tip generator and no URL generator.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addEntity(EntityCollection entities,
java.awt.Shape hotspot,
CategoryDataset dataset,
int row,
int column,
double entityX,
double entityY)
Adds an entity to the collection.
|
protected void |
addItemEntity(EntityCollection entities,
CategoryDataset dataset,
int row,
int column,
java.awt.Shape hotspot)
Adds an entity with the specified hotspot.
|
protected java.awt.geom.Point2D |
calculateDomainMarkerTextAnchorPoint(java.awt.Graphics2D g2,
PlotOrientation orientation,
java.awt.geom.Rectangle2D dataArea,
java.awt.geom.Rectangle2D markerArea,
org.jfree.ui.RectangleInsets markerOffset,
org.jfree.ui.LengthAdjustmentType labelOffsetType,
org.jfree.ui.RectangleAnchor anchor)
Calculates the (x, y) coordinates for drawing the label for a marker on
the range axis.
|
protected java.awt.geom.Point2D |
calculateRangeMarkerTextAnchorPoint(java.awt.Graphics2D g2,
PlotOrientation orientation,
java.awt.geom.Rectangle2D dataArea,
java.awt.geom.Rectangle2D markerArea,
org.jfree.ui.RectangleInsets markerOffset,
org.jfree.ui.LengthAdjustmentType labelOffsetType,
org.jfree.ui.RectangleAnchor anchor)
Calculates the (x, y) coordinates for drawing a marker label.
|
java.lang.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(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 |
drawDomainMarker(java.awt.Graphics2D g2,
CategoryPlot plot,
CategoryAxis axis,
CategoryMarker marker,
java.awt.geom.Rectangle2D dataArea)
Draws a marker for the domain axis.
|
protected void |
drawItemLabel(java.awt.Graphics2D g2,
PlotOrientation orientation,
CategoryDataset dataset,
int row,
int column,
double x,
double y,
boolean negative)
Draws an item label.
|
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 |
drawRangeLine(java.awt.Graphics2D g2,
CategoryPlot plot,
ValueAxis axis,
java.awt.geom.Rectangle2D dataArea,
double value,
java.awt.Paint paint,
java.awt.Stroke stroke)
Draws a line perpendicular to the range axis.
|
void |
drawRangeMarker(java.awt.Graphics2D g2,
CategoryPlot plot,
ValueAxis axis,
Marker marker,
java.awt.geom.Rectangle2D dataArea)
Draws a marker for the range axis.
|
boolean |
equals(java.lang.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.
|
protected Range |
findRangeBounds(CategoryDataset dataset,
boolean includeInterval)
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.
|
double |
getItemMiddle(java.lang.Comparable rowKey,
java.lang.Comparable columnKey,
CategoryDataset dataset,
CategoryAxis axis,
java.awt.geom.Rectangle2D area,
org.jfree.ui.RectangleEdge edge)
Returns the Java2D coordinate for the middle of the specified 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.
|
LegendItemCollection |
getLegendItems()
Returns a (possibly empty) collection of legend items for the series
that this renderer is responsible for drawing.
|
CategorySeriesLabelGenerator |
getLegendItemToolTipGenerator()
Returns the legend item tool tip generator.
|
CategorySeriesLabelGenerator |
getLegendItemURLGenerator()
Returns the legend item URL generator.
|
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()
Deprecated.
This method should no longer be used (as of version 1.0.6).
It is sufficient to rely on
getSeriesToolTipGenerator(int)
and getBaseToolTipGenerator() . |
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(java.awt.Graphics2D g2,
java.awt.geom.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 and sends a
RendererChangeEvent to all registered listeners. |
void |
setBaseToolTipGenerator(CategoryToolTipGenerator generator)
Sets the base tool tip generator and sends a
RendererChangeEvent
to all registered listeners. |
void |
setItemLabelGenerator(CategoryItemLabelGenerator generator)
Deprecated.
This method should no longer be used (as of version 1.0.6).
It is sufficient to rely on
setSeriesItemLabelGenerator(int,
CategoryItemLabelGenerator) and
setBaseItemLabelGenerator(CategoryItemLabelGenerator) . |
void |
setItemURLGenerator(CategoryURLGenerator generator)
Deprecated.
This method should no longer be used (as of version 1.0.6).
It is sufficient to rely on
setSeriesItemURLGenerator(int,
CategoryURLGenerator) and
setBaseItemURLGenerator(CategoryURLGenerator) . |
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 and sends a
RendererChangeEvent to all registered listeners. |
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)
Deprecated.
This method should no longer be used (as of version 1.0.6).
It is sufficient to rely on
setSeriesToolTipGenerator(int,
CategoryToolTipGenerator) and
setBaseToolTipGenerator(CategoryToolTipGenerator) . |
protected void |
updateCrosshairValues(CategoryCrosshairState crosshairState,
java.lang.Comparable rowKey,
java.lang.Comparable columnKey,
double value,
int datasetIndex,
double transX,
double transY,
PlotOrientation orientation)
Considers the current (x, y) coordinate and updates the crosshair point
if it meets the criteria (usually means the (x, y) coordinate is the
closest to the anchor point so far).
|
addChangeListener, calculateLabelAnchorPoint, clearSeriesPaints, clearSeriesStrokes, fireChangeEvent, getAutoPopulateSeriesFillPaint, getAutoPopulateSeriesOutlinePaint, getAutoPopulateSeriesOutlineStroke, getAutoPopulateSeriesPaint, getAutoPopulateSeriesShape, getAutoPopulateSeriesStroke, getBaseCreateEntities, getBaseFillPaint, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseLegendShape, getBaseLegendTextFont, getBaseLegendTextPaint, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getCreateEntities, getDataBoundsIncludesVisibleSeriesOnly, getDefaultEntityRadius, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getLegendShape, getLegendTextFont, getLegendTextPaint, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, getTreatLegendShapeAsLine, hasListener, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, lookupLegendShape, lookupLegendTextFont, lookupLegendTextPaint, lookupSeriesFillPaint, lookupSeriesOutlinePaint, lookupSeriesOutlineStroke, lookupSeriesPaint, lookupSeriesShape, lookupSeriesStroke, notifyListeners, removeChangeListener, setAutoPopulateSeriesFillPaint, setAutoPopulateSeriesOutlinePaint, setAutoPopulateSeriesOutlineStroke, setAutoPopulateSeriesPaint, setAutoPopulateSeriesShape, setAutoPopulateSeriesStroke, setBaseCreateEntities, setBaseCreateEntities, setBaseFillPaint, setBaseFillPaint, setBaseItemLabelFont, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseLegendShape, setBaseLegendTextFont, setBaseLegendTextPaint, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlinePaint, setBaseOutlineStroke, setBaseOutlineStroke, setBasePaint, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseShape, setBaseStroke, setBaseStroke, setCreateEntities, setCreateEntities, setDataBoundsIncludesVisibleSeriesOnly, setDefaultEntityRadius, setFillPaint, setFillPaint, setItemLabelAnchorOffset, setItemLabelFont, setItemLabelFont, setItemLabelPaint, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setLegendShape, setLegendTextFont, setLegendTextPaint, 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, setTreatLegendShapeAsLine
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addChangeListener, drawItem, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, removeChangeListener, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlineStroke, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseStroke, setItemLabelFont, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlineStroke, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setStroke
protected AbstractCategoryItemRenderer()
public int getPassCount()
1
, subclasses should
override if they need more passes.getPassCount
in interface CategoryItemRenderer
public CategoryPlot getPlot()
null
indicates that the renderer is not currently assigned
to a plot).getPlot
in interface CategoryItemRenderer
null
).setPlot(CategoryPlot)
public void setPlot(CategoryPlot plot)
CategoryPlot
, in normal usage you
shouldn't need to call this method directly.setPlot
in interface CategoryItemRenderer
plot
- the plot (null
not permitted).getPlot()
public CategoryItemLabelGenerator getItemLabelGenerator(int row, int column)
getSeriesItemLabelGenerator(int)
method. If, for some reason, you want a different generator for
individual items, you can override this method.getItemLabelGenerator
in interface CategoryItemRenderer
row
- the row index (zero based).column
- the column index (zero based).null
).public CategoryItemLabelGenerator getSeriesItemLabelGenerator(int series)
getSeriesItemLabelGenerator
in interface CategoryItemRenderer
series
- the series index (zero based).null
).setSeriesItemLabelGenerator(int, CategoryItemLabelGenerator)
public void setSeriesItemLabelGenerator(int series, CategoryItemLabelGenerator generator)
RendererChangeEvent
to all registered listeners.setSeriesItemLabelGenerator
in interface CategoryItemRenderer
series
- the series index (zero based).generator
- the generator (null
permitted).getSeriesItemLabelGenerator(int)
public CategoryItemLabelGenerator getBaseItemLabelGenerator()
getBaseItemLabelGenerator
in interface CategoryItemRenderer
null
).setBaseItemLabelGenerator(CategoryItemLabelGenerator)
public void setBaseItemLabelGenerator(CategoryItemLabelGenerator generator)
RendererChangeEvent
to all registered listeners.setBaseItemLabelGenerator
in interface CategoryItemRenderer
generator
- the generator (null
permitted).getBaseItemLabelGenerator()
public CategoryToolTipGenerator getToolTipGenerator(int row, int column)
getToolTipGenerator
in interface CategoryItemRenderer
row
- the row index (zero-based).column
- the column index (zero-based).null
).public CategoryToolTipGenerator getSeriesToolTipGenerator(int series)
getSeriesToolTipGenerator
in interface CategoryItemRenderer
series
- the series index (zero-based).null
).setSeriesToolTipGenerator(int, CategoryToolTipGenerator)
public void setSeriesToolTipGenerator(int series, CategoryToolTipGenerator generator)
RendererChangeEvent
to all registered listeners.setSeriesToolTipGenerator
in interface CategoryItemRenderer
series
- the series index (zero-based).generator
- the generator (null
permitted).getSeriesToolTipGenerator(int)
public CategoryToolTipGenerator getBaseToolTipGenerator()
getBaseToolTipGenerator
in interface CategoryItemRenderer
null
).setBaseToolTipGenerator(CategoryToolTipGenerator)
public void setBaseToolTipGenerator(CategoryToolTipGenerator generator)
RendererChangeEvent
to all registered listeners.setBaseToolTipGenerator
in interface CategoryItemRenderer
generator
- the generator (null
permitted).getBaseToolTipGenerator()
public CategoryURLGenerator getItemURLGenerator(int row, int column)
getItemURLGenerator
in interface CategoryItemRenderer
row
- the row index (zero based).column
- the column index (zero based).public CategoryURLGenerator getSeriesItemURLGenerator(int series)
getSeriesItemURLGenerator
in interface CategoryItemRenderer
series
- the series index (zero based).setSeriesItemURLGenerator(int, CategoryURLGenerator)
public void setSeriesItemURLGenerator(int series, CategoryURLGenerator generator)
RendererChangeEvent
to all registered listeners.setSeriesItemURLGenerator
in interface CategoryItemRenderer
series
- the series index (zero based).generator
- the generator.getSeriesItemURLGenerator(int)
public CategoryURLGenerator getBaseItemURLGenerator()
getBaseItemURLGenerator
in interface CategoryItemRenderer
setBaseItemURLGenerator(CategoryURLGenerator)
public void setBaseItemURLGenerator(CategoryURLGenerator generator)
RendererChangeEvent
to all registered listeners.setBaseItemURLGenerator
in interface CategoryItemRenderer
generator
- the item URL generator (null
permitted).getBaseItemURLGenerator()
public int getRowCount()
initialise(java.awt.Graphics2D, java.awt.geom.Rectangle2D, org.jfree.chart.plot.CategoryPlot, int, org.jfree.chart.plot.PlotRenderingInfo)
method.public int getColumnCount()
initialise(java.awt.Graphics2D, java.awt.geom.Rectangle2D, org.jfree.chart.plot.CategoryPlot, int, org.jfree.chart.plot.PlotRenderingInfo)
method.protected CategoryItemRendererState createState(PlotRenderingInfo info)
initialise(Graphics2D, Rectangle2D, CategoryPlot, int,
PlotRenderingInfo)
method. Subclasses can override this method if
they need to use a subclass of CategoryItemRendererState
.info
- collects plot rendering info (null
permitted).null
).public CategoryItemRendererState initialise(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info)
initialise
in interface CategoryItemRenderer
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).public Range findRangeBounds(CategoryDataset dataset)
findRangeBounds
in interface CategoryItemRenderer
dataset
- the dataset (null
permitted).null
if the dataset is
null
or empty).protected Range findRangeBounds(CategoryDataset dataset, boolean includeInterval)
dataset
- the dataset (null
permitted).includeInterval
- include the y-interval if the dataset has one.null
if the dataset is null
or empty).public double getItemMiddle(java.lang.Comparable rowKey, java.lang.Comparable columnKey, CategoryDataset dataset, CategoryAxis axis, java.awt.geom.Rectangle2D area, org.jfree.ui.RectangleEdge edge)
getItemMiddle
in interface CategoryItemRenderer
rowKey
- the row key.columnKey
- the column key.dataset
- the dataset.axis
- the axis.area
- the data area.edge
- the edge along which the axis lies.public void drawBackground(java.awt.Graphics2D g2, CategoryPlot plot, java.awt.geom.Rectangle2D dataArea)
drawBackground
in interface CategoryItemRenderer
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)
drawOutline
in interface CategoryItemRenderer
g2
- the graphics device.plot
- the plot.dataArea
- the data area.public void drawDomainGridline(java.awt.Graphics2D g2, CategoryPlot plot, java.awt.geom.Rectangle2D dataArea, double value)
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.
drawDomainGridline
in interface CategoryItemRenderer
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.drawRangeGridline(Graphics2D, CategoryPlot, ValueAxis,
Rectangle2D, double)
public void drawRangeGridline(java.awt.Graphics2D g2, CategoryPlot plot, ValueAxis axis, java.awt.geom.Rectangle2D dataArea, double value)
drawRangeGridline
in interface CategoryItemRenderer
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.drawDomainGridline(Graphics2D, CategoryPlot, Rectangle2D, double)
public void drawRangeLine(java.awt.Graphics2D g2, CategoryPlot plot, ValueAxis axis, java.awt.geom.Rectangle2D dataArea, double value, java.awt.Paint paint, java.awt.Stroke stroke)
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.paint
- the paint (null
not permitted).stroke
- the stroke (null
not permitted).drawRangeGridline(java.awt.Graphics2D, org.jfree.chart.plot.CategoryPlot, org.jfree.chart.axis.ValueAxis, java.awt.geom.Rectangle2D, double)
public void drawDomainMarker(java.awt.Graphics2D g2, CategoryPlot plot, CategoryAxis axis, CategoryMarker marker, java.awt.geom.Rectangle2D dataArea)
drawDomainMarker
in interface CategoryItemRenderer
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
).drawRangeMarker(Graphics2D, CategoryPlot, ValueAxis, Marker,
Rectangle2D)
public void drawRangeMarker(java.awt.Graphics2D g2, CategoryPlot plot, ValueAxis axis, Marker marker, java.awt.geom.Rectangle2D dataArea)
drawRangeMarker
in interface CategoryItemRenderer
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
).drawDomainMarker(Graphics2D, CategoryPlot, CategoryAxis,
CategoryMarker, Rectangle2D)
protected java.awt.geom.Point2D calculateDomainMarkerTextAnchorPoint(java.awt.Graphics2D g2, PlotOrientation orientation, java.awt.geom.Rectangle2D dataArea, java.awt.geom.Rectangle2D markerArea, org.jfree.ui.RectangleInsets markerOffset, org.jfree.ui.LengthAdjustmentType labelOffsetType, org.jfree.ui.RectangleAnchor anchor)
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.protected java.awt.geom.Point2D calculateRangeMarkerTextAnchorPoint(java.awt.Graphics2D g2, PlotOrientation orientation, java.awt.geom.Rectangle2D dataArea, java.awt.geom.Rectangle2D markerArea, org.jfree.ui.RectangleInsets markerOffset, org.jfree.ui.LengthAdjustmentType labelOffsetType, org.jfree.ui.RectangleAnchor anchor)
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.public LegendItem getLegendItem(int datasetIndex, int series)
null
if AbstractRenderer.isSeriesVisible(int)
or
AbstractRenderer.isSeriesVisibleInLegend(int)
returns false
.getLegendItem
in interface CategoryItemRenderer
datasetIndex
- the dataset index (zero-based).series
- the series index (zero-based).null
).getLegendItems()
public boolean equals(java.lang.Object obj)
equals
in class AbstractRenderer
obj
- the object.true
or false
.public int hashCode()
hashCode
in class AbstractRenderer
public DrawingSupplier getDrawingSupplier()
getDrawingSupplier
in class AbstractRenderer
null
).protected void updateCrosshairValues(CategoryCrosshairState crosshairState, java.lang.Comparable rowKey, java.lang.Comparable columnKey, double value, int datasetIndex, double transX, double transY, PlotOrientation orientation)
crosshairState
- the crosshair state (null
permitted,
but the method does nothing in that case).rowKey
- the row key.columnKey
- the column key.value
- the data value.datasetIndex
- the dataset index.transX
- the x-value translated to Java2D space.transY
- the y-value translated to Java2D space.orientation
- the plot orientation (null
not
permitted).protected void drawItemLabel(java.awt.Graphics2D g2, PlotOrientation orientation, CategoryDataset dataset, int row, int column, double x, double y, boolean negative)
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).public java.lang.Object clone() throws java.lang.CloneNotSupportedException
plot
reference is shallow copied.clone
in interface org.jfree.util.PublicCloneable
clone
in class AbstractRenderer
java.lang.CloneNotSupportedException
- can be thrown if one of the objects
belonging to the renderer does not support cloning (for example,
an item label generator).protected CategoryAxis getDomainAxis(CategoryPlot plot, int index)
plot
- the plot.index
- the axis index.protected ValueAxis getRangeAxis(CategoryPlot plot, int index)
plot
- the plot.index
- the axis index.public LegendItemCollection getLegendItems()
getLegendItems
in interface LegendItemSource
null
).getLegendItem(int, int)
public CategorySeriesLabelGenerator getLegendItemLabelGenerator()
null
).setLegendItemLabelGenerator(CategorySeriesLabelGenerator)
public void setLegendItemLabelGenerator(CategorySeriesLabelGenerator generator)
RendererChangeEvent
to all registered listeners.generator
- the generator (null
not permitted).getLegendItemLabelGenerator()
public CategorySeriesLabelGenerator getLegendItemToolTipGenerator()
null
).setLegendItemToolTipGenerator(CategorySeriesLabelGenerator)
public void setLegendItemToolTipGenerator(CategorySeriesLabelGenerator generator)
RendererChangeEvent
to all registered listeners.generator
- the generator (null
permitted).setLegendItemToolTipGenerator(CategorySeriesLabelGenerator)
public CategorySeriesLabelGenerator getLegendItemURLGenerator()
null
).setLegendItemURLGenerator(CategorySeriesLabelGenerator)
public void setLegendItemURLGenerator(CategorySeriesLabelGenerator generator)
RendererChangeEvent
to all registered listeners.generator
- the generator (null
permitted).getLegendItemURLGenerator()
protected void addItemEntity(EntityCollection entities, CategoryDataset dataset, int row, int column, java.awt.Shape hotspot)
entities
- the entity collection.dataset
- the dataset.row
- the row index.column
- the column index.hotspot
- the hotspot (null
not permitted).protected void addEntity(EntityCollection entities, java.awt.Shape hotspot, CategoryDataset dataset, int row, int column, double entityX, double entityY)
entities
- the entity collection being populated.hotspot
- the entity area (if null
a default will be
used).dataset
- the dataset.row
- the series.column
- the item.entityX
- the entity's center x-coordinate in user space (only
used if area
is null
).entityY
- the entity's center y-coordinate in user space (only
used if area
is null
).public void setItemLabelGenerator(CategoryItemLabelGenerator generator)
setSeriesItemLabelGenerator(int,
CategoryItemLabelGenerator)
and
setBaseItemLabelGenerator(CategoryItemLabelGenerator)
.RendererChangeEvent
to all registered listeners.setItemLabelGenerator
in interface CategoryItemRenderer
generator
- the generator (null
permitted).public CategoryToolTipGenerator getToolTipGenerator()
getSeriesToolTipGenerator(int)
and getBaseToolTipGenerator()
.getToolTipGenerator
in interface CategoryItemRenderer
null
).setToolTipGenerator(CategoryToolTipGenerator)
public void setToolTipGenerator(CategoryToolTipGenerator generator)
setSeriesToolTipGenerator(int,
CategoryToolTipGenerator)
and
setBaseToolTipGenerator(CategoryToolTipGenerator)
.RendererChangeEvent
to all registered
listeners.setToolTipGenerator
in interface CategoryItemRenderer
generator
- the generator (null
permitted).getToolTipGenerator()
public void setItemURLGenerator(CategoryURLGenerator generator)
setSeriesItemURLGenerator(int,
CategoryURLGenerator)
and
setBaseItemURLGenerator(CategoryURLGenerator)
.RendererChangeEvent
to all registered listeners.setItemURLGenerator
in interface CategoryItemRenderer
generator
- the generator.CategoryItemRenderer.getSeriesItemURLGenerator(int)