java.lang.Object | ||
↳ | org.jfree.chart.renderer.AbstractRenderer | |
↳ | org.jfree.chart.renderer.xy.AbstractXYItemRenderer |
![]() |
A base class that can be used to create new XYItemRenderer
implementations.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a renderer where the tooltip generator and the URL generator are
both
null . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds an annotation to the specified layer and sends a
RendererChangeEvent to all registered listeners. | |||||||||||
Adds an annotation and sends a
RendererChangeEvent to all
registered listeners. | |||||||||||
Draws all the annotations for the specified layer.
| |||||||||||
Draws a grid line against the range axis.
| |||||||||||
Draws a line perpendicular to the domain axis.
| |||||||||||
Draws a vertical line on the chart to represent a 'range marker'.
| |||||||||||
Draws a line perpendicular to the range axis.
| |||||||||||
Draws a horizontal line across the chart to represent a 'range marker'.
| |||||||||||
Tests this renderer for equality with another object.
| |||||||||||
Fills a band between two values on the axis.
| |||||||||||
Fills a band between two values on the range axis.
| |||||||||||
Returns the lower and upper bounds (range) of the x-values in the
specified dataset.
| |||||||||||
Returns the range of values the renderer requires to display all the
items from the specified dataset.
| |||||||||||
Returns a collection of the annotations that are assigned to the
renderer.
| |||||||||||
Returns the base item label generator.
| |||||||||||
Returns the base tool tip generator.
| |||||||||||
Returns the drawing supplier from the plot.
| |||||||||||
Returns the label generator for a data item.
| |||||||||||
This method is deprecated.
As of version 1.0.6, this override setting should not be
used. You can use the base setting instead
(
getBaseItemLabelGenerator() ).
| |||||||||||
Returns a default legend item for the specified series.
| |||||||||||
Returns the legend item label generator.
| |||||||||||
Returns the legend item tool tip generator.
| |||||||||||
Returns the legend item URL generator.
| |||||||||||
Returns a (possibly empty) collection of legend items for the series
that this renderer is responsible for drawing.
| |||||||||||
Returns the number of passes through the data that the renderer requires
in order to draw the chart.
| |||||||||||
Returns the plot that the renderer is assigned to.
| |||||||||||
Returns the item label generator for a series.
| |||||||||||
Returns the tool tip generator for a series.
| |||||||||||
This method is deprecated.
As of version 1.0.6, this override setting should not be
used. You can use the base setting instead
(
getBaseToolTipGenerator() ).
| |||||||||||
Returns the tool tip generator for a data item.
| |||||||||||
Returns the URL generator for HTML image maps.
| |||||||||||
Initialises the renderer and returns a state object that should be
passed to all subsequent calls to the drawItem() method.
| |||||||||||
Returns
true if the specified point (x, y) falls within or
on the boundary of the specified rectangle. | |||||||||||
Removes the specified annotation and sends a
RendererChangeEvent
to all registered listeners. | |||||||||||
Removes all annotations and sends a
RendererChangeEvent
to all registered listeners. | |||||||||||
Sets the base item label generator and sends a
RendererChangeEvent to all registered listeners. | |||||||||||
Sets the base tool tip generator and sends a
RendererChangeEvent
to all registered listeners. | |||||||||||
This method is deprecated.
As of version 1.0.6, this override setting should not be
used. You can use the base setting instead
(
setBaseItemLabelGenerator(XYItemLabelGenerator) ).
| |||||||||||
Sets the legend item label generator and sends a
RendererChangeEvent to all registered listeners. | |||||||||||
Sets the legend item tool tip generator and sends a
RendererChangeEvent to all registered listeners. | |||||||||||
Sets the legend item URL generator and sends a
RendererChangeEvent to all registered listeners. | |||||||||||
Sets the plot that the renderer is assigned to.
| |||||||||||
Sets the item label generator for a series and sends a
RendererChangeEvent to all registered listeners. | |||||||||||
Sets the tool tip generator for a series and sends a
RendererChangeEvent to all registered listeners. | |||||||||||
This method is deprecated.
As of version 1.0.6, this override setting should not be
used. You can use the base setting instead
(
setBaseToolTipGenerator(XYToolTipGenerator) ).
| |||||||||||
Sets the URL generator for HTML image maps and sends a
RendererChangeEvent to all registered listeners. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds an entity to the collection.
| |||||||||||
Calculates the (x, y) coordinates for drawing a marker label.
| |||||||||||
Returns a clone of the renderer.
| |||||||||||
Draws an item label.
| |||||||||||
Returns the lower and upper bounds (range) of the x-values in the
specified dataset.
| |||||||||||
Returns the range of values the renderer requires to display all the
items from the specified dataset.
| |||||||||||
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).
| |||||||||||
This method is deprecated.
Use
updateCrosshairValues(CrosshairState, double, double, int, int, double, double, PlotOrientation) -- see bug
report 1086307.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a renderer where the tooltip generator and the URL generator are
both null
.
Adds an annotation to the specified layer and sends a
RendererChangeEvent
to all registered listeners.
annotation | the annotation (null not permitted). |
---|---|
layer | the layer (null not permitted).
|
Adds an annotation and sends a RendererChangeEvent
to all
registered listeners. The annotation is added to the foreground
layer.
annotation | the annotation (null not permitted).
|
---|
Draws all the annotations for the specified layer.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
domainAxis | the domain axis. |
rangeAxis | the range axis. |
layer | the layer. |
info | the plot rendering info. |
Draws a grid line against the range axis.
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. |
Draws a line perpendicular to the domain axis.
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). |
Draws a vertical line on the chart to represent a 'range marker'.
g2 | the graphics device. |
---|---|
plot | the plot. |
domainAxis | the domain axis. |
marker | the marker line. |
dataArea | the axis data area. |
Draws a line perpendicular to the range axis.
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. |
stroke | the stroke. |
Draws a horizontal line across the chart to represent a 'range marker'.
g2 | the graphics device. |
---|---|
plot | the plot. |
rangeAxis | the range axis. |
marker | the marker line. |
dataArea | the axis data area. |
Tests this renderer for equality with another object.
obj | the object (null permitted). |
---|
true
or false
.
Fills a band between two values on the axis. This can be used to color bands between the grid lines.
g2 | the graphics device. |
---|---|
plot | the plot. |
axis | the domain axis. |
dataArea | the data area. |
start | the start value. |
end | the end value. |
Fills a band between two values on the range axis. This can be used to color bands between the grid lines.
g2 | the graphics device. |
---|---|
plot | the plot. |
axis | the range axis. |
dataArea | the data area. |
start | the start value. |
end | the end value. |
Returns the lower and upper bounds (range) of the x-values in the specified dataset.
dataset | the dataset (null permitted). |
---|
null
if the dataset is null
or empty).Returns the range of values the renderer requires to display all the items from the specified dataset.
dataset | the dataset (null permitted). |
---|
null
if the dataset is null
or empty).Returns a collection of the annotations that are assigned to the renderer.
null
).Returns the base item label generator.
null
).
Returns the base tool tip generator.
null
).Returns the drawing supplier from the plot.
null
).
Returns the 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.
series | the series index (zero based). |
---|---|
item | the item index (zero based). |
null
).
This method is deprecated.
As of version 1.0.6, this override setting should not be
used. You can use the base setting instead
(getBaseItemLabelGenerator()
).
Returns the item label generator override.
null
).Returns a default legend item for the specified series. Subclasses should override this method to generate customised items.
datasetIndex | the dataset index (zero-based). |
---|---|
series | the series index (zero-based). |
Returns the legend item label generator.
null
).Returns the legend item tool tip generator.
null
).Returns the legend item URL generator.
null
).Returns a (possibly empty) collection of legend items for the series that this renderer is responsible for drawing.
null
).
Returns the number of passes through the data that the renderer requires in order to draw the chart. Most charts will require a single pass, but some require two passes.
Returns the plot that the renderer is assigned to.
null
).
Returns the item label generator for a series.
series | the series index (zero based). |
---|
null
).
Returns the tool tip generator for a series.
series | the series index (zero based). |
---|
null
).
This method is deprecated.
As of version 1.0.6, this override setting should not be
used. You can use the base setting instead
(getBaseToolTipGenerator()
).
Returns the override tool tip generator.
null
).Returns the tool tip generator for a data item. If, for some reason, you want a different generator for individual items, you can override this method.
series | the series index (zero based). |
---|---|
item | the item index (zero based). |
null
).
Returns the URL generator for HTML image maps.
null
).
Initialises the renderer and returns a state object that should be passed to all subsequent calls to the drawItem() method.
This method will be called before the first item is rendered, giving the renderer an opportunity to initialise any state information it wants to maintain. The renderer can do nothing if it chooses.
g2 | the graphics device. |
---|---|
dataArea | the area inside the axes. |
plot | the plot. |
data | the data. |
info | an optional info collection object to return data back to the caller. |
null
).
Returns true
if the specified point (x, y) falls within or
on the boundary of the specified rectangle.
rect | the rectangle (null not permitted). |
---|---|
x | the x-coordinate. |
y | the y-coordinate. |
Removes the specified annotation and sends a RendererChangeEvent
to all registered listeners.
annotation | the annotation to remove (null not
permitted). |
---|
Removes all annotations and sends a RendererChangeEvent
to all registered listeners.
Sets the base item label generator and sends a
RendererChangeEvent
to all registered listeners.
generator | the generator (null permitted).
|
---|
Sets the base tool tip generator and sends a RendererChangeEvent
to all registered listeners.
generator | the generator (null permitted). |
---|
This method is deprecated.
As of version 1.0.6, this override setting should not be
used. You can use the base setting instead
(setBaseItemLabelGenerator(XYItemLabelGenerator)
).
Sets the item label generator for ALL series and sends a
RendererChangeEvent
to all registered listeners.
generator | the generator (null permitted). |
---|
Sets the legend item label generator and sends a
RendererChangeEvent
to all registered listeners.
generator | the generator (null not permitted). |
---|
Sets the legend item tool tip generator and sends a
RendererChangeEvent
to all registered listeners.
generator | the generator (null permitted). |
---|
Sets the legend item URL generator and sends a
RendererChangeEvent
to all registered listeners.
generator | the generator (null permitted). |
---|
Sets the plot that the renderer is assigned to.
plot | the plot (null permitted).
|
---|
Sets the item label generator for a series and sends a
RendererChangeEvent
to all registered listeners.
series | the series index (zero based). |
---|---|
generator | the generator (null permitted).
|
Sets the tool tip generator for a series and sends a
RendererChangeEvent
to all registered listeners.
series | the series index (zero based). |
---|---|
generator | the generator (null permitted).
|
This method is deprecated.
As of version 1.0.6, this override setting should not be
used. You can use the base setting instead
(setBaseToolTipGenerator(XYToolTipGenerator)
).
Sets the tool tip generator for ALL series and sends a
RendererChangeEvent
to all registered listeners.
generator | the generator (null permitted). |
---|
Sets the URL generator for HTML image maps and sends a
RendererChangeEvent
to all registered listeners.
urlGenerator | the URL generator (null permitted).
|
---|
Adds an entity to the collection.
entities | the entity collection being populated. |
---|---|
area | the entity area (if null a default will be
used). |
dataset | the dataset. |
series | the series. |
item | 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 ).
|
Calculates the (x, y) coordinates for drawing a marker label.
g2 | the graphics device. |
---|---|
orientation | the plot orientation. |
dataArea | the data area. |
markerArea | the rectangle surrounding the marker area. |
markerOffset | the marker label offset. |
labelOffsetType | the label offset type. |
anchor | the label anchor. |
Returns a clone of the renderer.
CloneNotSupportedException | if the renderer does not support cloning. |
---|
Draws an item label.
g2 | the graphics device. |
---|---|
orientation | the orientation. |
dataset | the dataset. |
series | the series index (zero-based). |
item | the item index (zero-based). |
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). |
Returns the lower and upper bounds (range) of the x-values in the specified dataset.
dataset | the dataset (null permitted). |
---|
null
if the dataset is null
or empty).Returns the range of values the renderer requires to display all the items from the specified dataset.
dataset | the dataset (null permitted). |
---|
null
if the dataset is null
or empty).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).
crosshairState | the crosshair state (null permitted,
but the method does nothing in that case). |
---|---|
x | the x-value (in data space). |
y | the y-value (in data space). |
domainAxisIndex | the index of the domain axis for the point. |
rangeAxisIndex | the index of the range axis for the point. |
transX | the x-value translated to Java2D space. |
transY | the y-value translated to Java2D space. |
orientation | the plot orientation (null not
permitted). |
This method is deprecated.
Use updateCrosshairValues(CrosshairState, double, double, int, int, double, double, PlotOrientation)
-- see bug
report 1086307.
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).
crosshairState | the crosshair state (null permitted,
but the method does nothing in that case). |
---|---|
x | the x-value (in data space). |
y | the y-value (in data space). |
transX | the x-value translated to Java2D space. |
transY | the y-value translated to Java2D space. |
orientation | the plot orientation (null not
permitted). |