java.lang.Object | |||
↳ | org.jfree.chart.renderer.AbstractRenderer | ||
↳ | org.jfree.chart.renderer.xy.AbstractXYItemRenderer | ||
↳ | org.jfree.chart.renderer.xy.StandardXYItemRenderer |
![]() |
Standard item renderer for an XYPlot
. This class can draw (a)
shapes at each point, or (b) lines between points, or (c) both shapes and
lines.
This renderer has been retained for historical reasons and, in general, you
should use the XYLineAndShapeRenderer
class instead.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
StandardXYItemRenderer.State | Records the state for the renderer. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | DISCONTINUOUS | Constant for the type of rendering (discontinuous lines). | |||||||||
int | DISCONTINUOUS_LINES | Constant for the type of rendering (discontinuous lines). | |||||||||
int | IMAGES | Constant for the type of rendering (images only). | |||||||||
int | LINES | Constant for the type of rendering (lines only). | |||||||||
int | SHAPES | Constant for the type of rendering (shapes only). | |||||||||
int | SHAPES_AND_LINES | Constant for the type of rendering (shapes and lines). |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new renderer.
| |||||||||||
Constructs a new renderer.
| |||||||||||
Constructs a new renderer.
| |||||||||||
Constructs a new renderer.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a clone of the renderer.
| |||||||||||
Draws the visual representation of a single data item.
| |||||||||||
Tests this renderer for equality with another object.
| |||||||||||
Returns the base 'shape filled' attribute.
| |||||||||||
Returns true if shapes are being plotted by the renderer.
| |||||||||||
Returns a flag that controls whether or not each series is drawn as a
single path.
| |||||||||||
Returns the gap threshold for discontinuous lines.
| |||||||||||
Returns the gap threshold type (relative or absolute).
| |||||||||||
Returns the flag used to control whether or not the shape for an item is
filled.
| |||||||||||
Returns a legend item for a series.
| |||||||||||
Returns the shape used to represent a line in the legend.
| |||||||||||
Returns a flag that controls whether or not the renderer shows
discontinuous lines.
| |||||||||||
Returns true if images are being plotted by the renderer.
| |||||||||||
Returns true if lines are being plotted by the renderer.
| |||||||||||
Returns the flag used to control whether or not the shapes for a series
are filled.
| |||||||||||
This method is deprecated.
As of 1.0.8, you should avoid using this method and rely
on just the per-series (
getSeriesShapesFilled(int) )
and base-level (getBaseShapesFilled() ) settings.
| |||||||||||
Initialises the renderer.
| |||||||||||
Sets the base 'shapes filled' flag and sends a
RendererChangeEvent to all registered listeners. | |||||||||||
Sets the flag that controls whether or not a shape is plotted at each
data point.
| |||||||||||
Sets the flag that controls whether or not each series is drawn as a
single path.
| |||||||||||
Sets the gap threshold for discontinuous lines and sends a
RendererChangeEvent to all registered listeners. | |||||||||||
Sets the gap threshold type and sends a
RendererChangeEvent to
all registered listeners. | |||||||||||
Sets the shape used as a line in each legend item and sends a
RendererChangeEvent to all registered listeners. | |||||||||||
Sets the flag that controls whether or not the renderer shows
discontinuous lines, and sends a
RendererChangeEvent to all
registered listeners. | |||||||||||
Sets the flag that controls whether or not an image is drawn at each
data point and sends a
RendererChangeEvent to all registered
listeners. | |||||||||||
Sets the flag that controls whether or not a line is plotted between
each data point and sends a
RendererChangeEvent to all
registered listeners. | |||||||||||
Sets the 'shapes filled' flag for a series and sends a
RendererChangeEvent to all registered listeners. | |||||||||||
This method is deprecated.
As of 1.0.8, you should avoid using this method and rely
on just the per-series (
setSeriesShapesFilled(int, Boolean) ) and base-level (setBaseShapesVisible(boolean) ) settings.
| |||||||||||
This method is deprecated.
As of 1.0.8, you should avoid using this method and rely
on just the per-series (
setSeriesShapesFilled(int, Boolean) ) and base-level (setBaseShapesVisible(boolean) ) settings.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the image used to draw a single data item.
| |||||||||||
Returns the hotspot of the image used to draw a single data item.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constant for the type of rendering (discontinuous lines).
Constant for the type of rendering (discontinuous lines).
Constant for the type of rendering (images only).
Constant for the type of rendering (lines only).
Constant for the type of rendering (shapes only).
Constant for the type of rendering (shapes and lines).
Constructs a new renderer.
Constructs a new renderer. To specify the type of renderer, use one of
the constants: SHAPES
, LINES
or
SHAPES_AND_LINES
.
type | the type. |
---|
Constructs a new renderer. To specify the type of renderer, use one of
the constants: SHAPES
, LINES
or
SHAPES_AND_LINES
.
type | the type of renderer. |
---|---|
toolTipGenerator | the item label generator (null
permitted).
|
Constructs a new renderer. To specify the type of renderer, use one of
the constants: SHAPES
, LINES
or
SHAPES_AND_LINES
.
type | the type of renderer. |
---|---|
toolTipGenerator | the item label generator (null
permitted). |
urlGenerator | the URL generator. |
Returns a clone of the renderer.
CloneNotSupportedException | if the renderer cannot be cloned. |
---|
Draws the visual representation of a single data item.
g2 | the graphics device. |
---|---|
state | the renderer state. |
dataArea | the area within which the data is being drawn. |
info | collects information about the drawing. |
plot | the plot (can be used to obtain standard color information etc). |
domainAxis | the domain axis. |
rangeAxis | the range axis. |
dataset | the dataset. |
series | the series index (zero-based). |
item | the item index (zero-based). |
crosshairState | crosshair information for the plot
(null permitted). |
pass | the pass index. |
Tests this renderer for equality with another object.
obj | the object (null permitted). |
---|
Returns the base 'shape filled' attribute.
Returns true if shapes are being plotted by the renderer.
true
if shapes are being plotted by the renderer.Returns a flag that controls whether or not each series is drawn as a single path.
Returns the gap threshold for discontinuous lines.
Returns the gap threshold type (relative or absolute).
Returns the flag used to control whether or not the shape for an item is filled.
The default implementation passes control to the
getSeriesShapesFilled
method. You can override this method
if you require different behaviour.
series | the series index (zero-based). |
---|---|
item | the item index (zero-based). |
Returns a legend item for a series.
datasetIndex | the dataset index (zero-based). |
---|---|
series | the series index (zero-based). |
Returns the shape used to represent a line in the legend.
null
).Returns a flag that controls whether or not the renderer shows discontinuous lines.
true
if lines should be discontinuous.
Returns true if images are being plotted by the renderer.
true
if images are being plotted by the renderer.Returns true if lines are being plotted by the renderer.
true
if lines are being plotted by the renderer.Returns the flag used to control whether or not the shapes for a series are filled.
series | the series index (zero-based). |
---|
This method is deprecated.
As of 1.0.8, you should avoid using this method and rely
on just the per-series (getSeriesShapesFilled(int)
)
and base-level (getBaseShapesFilled()
) settings.
Returns the override flag that controls whether or not shapes are filled for ALL series.
null
).Initialises the renderer.
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. |
Sets the base 'shapes filled' flag and sends a
RendererChangeEvent
to all registered listeners.
flag | the flag. |
---|
Sets the flag that controls whether or not a shape is plotted at each data point.
flag | the flag. |
---|
Sets the flag that controls whether or not each series is drawn as a single path.
flag | the flag. |
---|
Sets the gap threshold for discontinuous lines and sends a
RendererChangeEvent
to all registered listeners.
t | the threshold. |
---|
Sets the gap threshold type and sends a RendererChangeEvent
to
all registered listeners.
thresholdType | the type (null not permitted). |
---|
Sets the shape used as a line in each legend item and sends a
RendererChangeEvent
to all registered listeners.
line | the line (null not permitted). |
---|
Sets the flag that controls whether or not the renderer shows
discontinuous lines, and sends a RendererChangeEvent
to all
registered listeners.
flag | the new flag value. |
---|
Sets the flag that controls whether or not an image is drawn at each
data point and sends a RendererChangeEvent
to all registered
listeners.
flag | the flag. |
---|
Sets the flag that controls whether or not a line is plotted between
each data point and sends a RendererChangeEvent
to all
registered listeners.
flag | the flag. |
---|
Sets the 'shapes filled' flag for a series and sends a
RendererChangeEvent
to all registered listeners.
series | the series index (zero-based). |
---|---|
flag | the flag. |
This method is deprecated.
As of 1.0.8, you should avoid using this method and rely
on just the per-series (setSeriesShapesFilled(int, Boolean)
) and base-level (setBaseShapesVisible(boolean)
) settings.
Sets the override flag that controls whether or not shapes are filled
for ALL series and sends a RendererChangeEvent
to all registered
listeners.
filled | the flag. |
---|
This method is deprecated.
As of 1.0.8, you should avoid using this method and rely
on just the per-series (setSeriesShapesFilled(int, Boolean)
) and base-level (setBaseShapesVisible(boolean)
) settings.
Sets the override flag that controls whether or not shapes are filled
for ALL series and sends a RendererChangeEvent
to all registered
listeners.
filled | the flag (null permitted). |
---|
Returns the image used to draw a single data item.
plot | the plot (can be used to obtain standard color information etc). |
---|---|
series | the series index. |
item | the item index. |
x | the x value of the item. |
y | the y value of the item. |
Returns the hotspot of the image used to draw a single data item. The hotspot is the point relative to the top left of the image that should indicate the data item. The default is the center of the image.
plot | the plot (can be used to obtain standard color information etc). |
---|---|
series | the series index |
item | the item index |
x | the x value of the item |
y | the y value of the item |
image | the image (can be used to get size information about the image) |