java.lang.Object | ||
↳ | org.jfree.chart.plot.Plot | |
↳ | org.jfree.chart.plot.CategoryPlot |
![]() |
A general plotting class that uses data from a CategoryDataset
and
renders each data item using a CategoryItemRenderer
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | DEFAULT_CROSSHAIR_VISIBLE | The default crosshair visibility. | |||||||||
boolean | DEFAULT_DOMAIN_GRIDLINES_VISIBLE | The default visibility of the grid lines plotted against the domain axis. | |||||||||
boolean | DEFAULT_RANGE_GRIDLINES_VISIBLE | The default visibility of the grid lines plotted against the range axis. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DEFAULT_CROSSHAIR_PAINT | The default crosshair paint. | ||||||||||
DEFAULT_CROSSHAIR_STROKE | The default crosshair stroke. | ||||||||||
DEFAULT_GRIDLINE_PAINT | The default grid line paint. | ||||||||||
DEFAULT_GRIDLINE_STROKE | The default grid line stroke. | ||||||||||
DEFAULT_VALUE_LABEL_FONT | The default value label font. | ||||||||||
localizationResources | The resourceBundle for the localization. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Default constructor.
| |||||||||||
Creates a new plot.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds an annotation to the plot and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds an annotation to the plot and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Adds a marker for display (in the foreground) against the domain axis and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for display against the domain axis and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for display by a particular renderer and, if requested,
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for display by a particular renderer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for display by a particular renderer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for display (in the foreground) against the range axis and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for display against the range axis and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for display by a particular renderer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Clears all the annotations and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Clears the domain axes from the plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Clears all the domain markers for the specified renderer.
| |||||||||||
Clears all the domain markers for the plot and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Clears the range axes from the plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Clears all the range markers for the specified renderer.
| |||||||||||
Clears all the range markers for the plot and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Returns a clone of the plot.
| |||||||||||
Configures the domain axes.
| |||||||||||
Configures the range axes.
| |||||||||||
Receives notification of a change to the plot's dataset.
| |||||||||||
Draws the plot on a Java 2D graphics device (such as the screen or a
printer).
| |||||||||||
Draws the plot background (the background color and/or image).
| |||||||||||
Tests the plot for equality with an arbitrary object.
| |||||||||||
Returns the anchor value.
| |||||||||||
Returns the list of annotations.
| |||||||||||
Returns the axis offset.
| |||||||||||
Returns a list of the categories in the plot's primary dataset.
| |||||||||||
Returns a list of the categories that should be displayed for the
specified axis.
| |||||||||||
Returns the order in which the columns are rendered.
| |||||||||||
Returns the dataset index for the crosshair.
| |||||||||||
Returns the range of data values that will be plotted against the range
axis.
| |||||||||||
Returns the dataset at the given index.
| |||||||||||
Returns the primary dataset for the plot.
| |||||||||||
Returns the number of datasets.
| |||||||||||
Returns the dataset rendering order.
| |||||||||||
Returns a domain axis.
| |||||||||||
Returns the domain axis for the plot.
| |||||||||||
Returns the number of domain axes.
| |||||||||||
Returns the edge for a domain axis.
| |||||||||||
Returns the domain axis edge.
| |||||||||||
Returns the domain axis for a dataset.
| |||||||||||
Returns the index of the specified axis, or
-1 if the axis
is not assigned to the plot. | |||||||||||
Returns the location for a domain axis.
| |||||||||||
Returns the domain axis location for the primary domain axis.
| |||||||||||
Returns the column key for the domain crosshair.
| |||||||||||
Returns the paint used to draw the domain crosshair.
| |||||||||||
Returns the row key for the domain crosshair.
| |||||||||||
Returns the stroke used to draw the domain crosshair.
| |||||||||||
Returns the paint used to draw grid-lines against the domain axis.
| |||||||||||
Returns the position used for the domain gridlines.
| |||||||||||
Returns the stroke used to draw grid-lines against the domain axis.
| |||||||||||
Returns a collection of domain markers for a particular renderer and
layer.
| |||||||||||
Returns the list of domain markers (read only) for the specified layer.
| |||||||||||
Returns the flag that controls whether or not the shared domain axis is
drawn for each subplot.
| |||||||||||
Returns the fixed domain axis space.
| |||||||||||
Returns the fixed legend items, if any.
| |||||||||||
Returns the fixed range axis space.
| |||||||||||
Returns the index of the specified renderer, or
-1 if the
renderer is not assigned to this plot. | |||||||||||
Returns the legend items for the plot.
| |||||||||||
Returns the orientation of the plot.
| |||||||||||
Returns a string describing the type of plot.
| |||||||||||
Returns a range axis.
| |||||||||||
Returns the range axis for the plot.
| |||||||||||
Returns the number of range axes.
| |||||||||||
Returns the edge where the primary range axis is located.
| |||||||||||
Returns the edge for a range axis.
| |||||||||||
Returns the range axis for a dataset.
| |||||||||||
Returns the index of the specified axis, or
-1 if the axis
is not assigned to the plot. | |||||||||||
Returns the location for a range axis.
| |||||||||||
Returns the range axis location.
| |||||||||||
Returns the paint used to draw the range crosshair.
| |||||||||||
Returns the pen-style (
Stroke ) used to draw the crosshair
(if visible). | |||||||||||
Returns the range crosshair value.
| |||||||||||
Returns the paint used to draw the grid-lines against the range axis.
| |||||||||||
Returns the stroke used to draw the grid-lines against the range axis.
| |||||||||||
Returns a collection of range markers for a particular renderer and
layer.
| |||||||||||
Returns the list of range markers (read only) for the specified layer.
| |||||||||||
Returns the paint for the minor grid lines (if any) plotted against the
range axis.
| |||||||||||
Returns the stroke for the minor grid lines (if any) plotted against the
range axis.
| |||||||||||
Returns the paint for the zero baseline (if any) plotted against the
range axis.
| |||||||||||
Returns the stroke used for the zero baseline against the range axis.
| |||||||||||
Returns the renderer at the given index.
| |||||||||||
Returns a reference to the renderer for the plot.
| |||||||||||
Returns the number of renderer slots for this plot.
| |||||||||||
Returns the renderer for the specified dataset.
| |||||||||||
Returns the order in which the rows should be rendered.
| |||||||||||
Returns the weight for this plot when it is used as a subplot within a
combined plot.
| |||||||||||
Handles a 'click' on the plot by updating the anchor value.
| |||||||||||
Returns the index of the specified dataset, or
-1 if the
dataset does not belong to the plot. | |||||||||||
Returns the flag that controls whether or not the domain crosshair is
displayed by the plot.
| |||||||||||
Returns the flag that controls whether the domain grid-lines are visible.
| |||||||||||
Returns
false always, because the plot cannot be panned
along the domain axis/axes. | |||||||||||
Returns
false to indicate that the domain axes are not
zoomable. | |||||||||||
Returns a flag indicating whether or not the crosshair should "lock-on"
to actual data values.
| |||||||||||
Returns a flag indicating whether or not the range crosshair is visible.
| |||||||||||
Returns the flag that controls whether the range grid-lines are visible.
| |||||||||||
Returns
true if the range axis minor grid is visible, and
false | |||||||||||
Returns
true if panning is enabled for the range axes,
and false otherwise. | |||||||||||
Returns a flag that controls whether or not a zero baseline is
displayed for the range axis.
| |||||||||||
Returns
true to indicate that the range axes are zoomable. | |||||||||||
Maps the specified dataset to the axes in the list.
| |||||||||||
Maps a dataset to a particular domain axis.
| |||||||||||
Maps the specified dataset to the axes in the list.
| |||||||||||
Maps a dataset to a particular range axis.
| |||||||||||
Pans the domain axes by the specified percentage.
| |||||||||||
Pans the range axes by the specified percentage.
| |||||||||||
Removes an annotation from the plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Removes an annotation from the plot and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Removes a marker for the domain axis in the specified layer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Removes a marker for the domain axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Removes a marker for a specific dataset/renderer and, if requested,
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Removes a marker for the range axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Removes a marker for the range axis in the specified layer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Draws a representation of a dataset within the dataArea region using the
appropriate renderer.
| |||||||||||
Receives notification of a renderer change event.
| |||||||||||
Sets the anchor value and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the anchor value and, if requested, sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the axis offsets (gap between the data area and the axes) and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the column order in which the items in each dataset should be
rendered and sends a
PlotChangeEvent to all registered
listeners. | |||||||||||
Sets the dataset index for the crosshair and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the dataset index for the crosshair and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets a dataset for the plot.
| |||||||||||
Sets the dataset for the plot, replacing the existing dataset, if there
is one.
| |||||||||||
Sets the rendering order and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the domain axes for this plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets a domain axis and, if requested, sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets a domain axis and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the domain axis for the plot and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the location for a domain axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the location for a domain axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the location of the domain axis and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the location of the domain axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the column key for the domain crosshair and sends
a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the column key for the domain crosshair and, if requested, sends
a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the paint used to draw the domain crosshair.
| |||||||||||
Sets the row key for the domain crosshair and sends a
{PlotChangeEvent} to all registered listeners.
| |||||||||||
Sets the row key for the domain crosshair and, if requested, sends a
{PlotChangeEvent} to all registered listeners.
| |||||||||||
Sets the stroke used to draw the domain crosshair, and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the flag that controls whether or not the domain crosshair is
displayed by the plot, and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the paint used to draw the grid-lines (if any) against the domain
axis and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the position used for the domain gridlines and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the stroke used to draw grid-lines against the domain axis and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the flag that controls whether or not grid-lines are drawn against
the domain axis.
| |||||||||||
Sets the flag that controls whether the shared domain axis is drawn when
this plot is being used as a subplot.
| |||||||||||
Sets the fixed domain axis space and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the fixed domain axis space and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the fixed legend items for the plot.
| |||||||||||
Sets the fixed range axis space and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the fixed range axis space and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the orientation for the plot and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the range axes for this plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets a range axis and, if requested, sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the range axis for the plot and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets a range axis and sends a
PlotChangeEvent to all registered
listeners. | |||||||||||
Sets the location for a range axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the location of the range axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the location of the range axis and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the location for a range axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the flag indicating whether or not the range crosshair should
"lock-on" to actual data values, and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the paint used to draw the range crosshair (if visible) and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the pen-style (
Stroke ) used to draw the range
crosshair (if visible), and sends a PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the range crosshair value and, if the crosshair is visible, sends
a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the range crosshair value and, if requested, sends a
PlotChangeEvent to all registered listeners (but only if the
crosshair is visible). | |||||||||||
Sets the flag indicating whether or not the range crosshair is visible.
| |||||||||||
Sets the paint used to draw the grid lines against the range axis and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the stroke used to draw the grid-lines against the range axis and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the flag that controls whether or not grid-lines are drawn against
the range axis.
| |||||||||||
Sets the paint for the minor grid lines plotted against the range axis
and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the stroke for the minor grid lines plotted against the range axis,
and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the flag that controls whether or not the range axis minor grid
lines are visible.
| |||||||||||
Sets the flag that enables or disables panning of the plot along
the range axes.
| |||||||||||
Sets the paint for the zero baseline plotted against the range axis and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the stroke for the zero baseline for the range axis,
and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the flag that controls whether or not the zero baseline is
displayed for the range axis, and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the renderer at index 0 (sometimes referred to as the "primary"
renderer) and, if requested, sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the renderer at the specified index and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets a renderer.
| |||||||||||
Sets the renderer at index 0 (sometimes referred to as the "primary"
renderer) and sends a
PlotChangeEvent to all registered
listeners. | |||||||||||
Sets the renderers for this plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the row order in which the items in each dataset should be
rendered and sends a
PlotChangeEvent to all registered
listeners. | |||||||||||
Sets the weight for the plot and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Zooms (in or out) on the plot's value axis.
| |||||||||||
This method does nothing, because
CategoryPlot doesn't
support zooming on the domain. | |||||||||||
This method does nothing, because
CategoryPlot doesn't
support zooming on the domain. | |||||||||||
This method does nothing, because
CategoryPlot doesn't
support zooming on the domain. | |||||||||||
Multiplies the range on the range axis/axes by the specified factor.
| |||||||||||
Zooms in on the range axes.
| |||||||||||
Multiplies the range on the range axis/axes by the specified factor.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calculates the space required for the axes.
| |||||||||||
Calculates the space required for the domain axis/axes.
| |||||||||||
Calculates the space required for the range axis/axes.
| |||||||||||
Draws the annotations.
| |||||||||||
A utility method for drawing the plot's axes.
| |||||||||||
Draws a domain crosshair.
| |||||||||||
Draws the domain gridlines for the plot, if they are visible.
| |||||||||||
Draws the domain markers (if any) for an axis and layer.
| |||||||||||
Draws a range crosshair.
| |||||||||||
Draws the range gridlines for the plot, if they are visible.
| |||||||||||
Utility method for drawing a line perpendicular to the range axis (used
for crosshairs).
| |||||||||||
Draws the range markers (if any) for an axis and layer.
| |||||||||||
Draws a base line across the chart at value zero on the range axis.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
The default crosshair visibility.
The default visibility of the grid lines plotted against the domain axis.
The default visibility of the grid lines plotted against the range axis.
Default constructor.
Creates a new plot.
dataset | the dataset (null permitted). |
---|---|
domainAxis | the domain axis (null permitted). |
rangeAxis | the range axis (null permitted). |
renderer | the item renderer (null permitted).
|
Adds an annotation to the plot and, if requested, sends a
PlotChangeEvent
to all registered listeners.
annotation | the annotation (null not permitted). |
---|---|
notify | notify listeners? |
Adds an annotation to the plot and sends a PlotChangeEvent
to all
registered listeners.
annotation | the annotation (null not permitted). |
---|
Adds a marker for display (in the foreground) against the domain axis and
sends a PlotChangeEvent
to all registered listeners. Typically a
marker will be drawn by the renderer as a line perpendicular to the
domain axis, however this is entirely up to the renderer.
marker | the marker (null not permitted). |
---|
Adds a marker for display against the domain axis and sends a
PlotChangeEvent
to all registered listeners. Typically a marker
will be drawn by the renderer as a line perpendicular to the domain
axis, however this is entirely up to the renderer.
marker | the marker (null not permitted). |
---|---|
layer | the layer (foreground or background) (null
not permitted). |
Adds a marker for display by a particular renderer and, if requested,
sends a PlotChangeEvent
to all registered listeners.
Typically a marker will be drawn by the renderer as a line perpendicular to a domain axis, however this is entirely up to the renderer.
index | the renderer index. |
---|---|
marker | the marker (null not permitted). |
layer | the layer (null not permitted). |
notify | notify listeners? |
Adds a marker for display by a particular renderer and sends a
PlotChangeEvent
to all registered listeners.
Typically a marker will be drawn by the renderer as a line perpendicular to a domain axis, however this is entirely up to the renderer.
index | the renderer index. |
---|---|
marker | the marker (null not permitted). |
layer | the layer (null not permitted). |
Adds a marker for display by a particular renderer and sends a
PlotChangeEvent
to all registered listeners.
Typically a marker will be drawn by the renderer as a line perpendicular to a range axis, however this is entirely up to the renderer.
index | the renderer index. |
---|---|
marker | the marker. |
layer | the layer. |
notify | notify listeners? |
Adds a marker for display (in the foreground) against the range axis and
sends a PlotChangeEvent
to all registered listeners. Typically a
marker will be drawn by the renderer as a line perpendicular to the
range axis, however this is entirely up to the renderer.
marker | the marker (null not permitted). |
---|
Adds a marker for display against the range axis and sends a
PlotChangeEvent
to all registered listeners. Typically a marker
will be drawn by the renderer as a line perpendicular to the range axis,
however this is entirely up to the renderer.
marker | the marker (null not permitted). |
---|---|
layer | the layer (foreground or background) (null
not permitted). |
Adds a marker for display by a particular renderer and sends a
PlotChangeEvent
to all registered listeners.
Typically a marker will be drawn by the renderer as a line perpendicular to a range axis, however this is entirely up to the renderer.
index | the renderer index. |
---|---|
marker | the marker. |
layer | the layer. |
Clears all the annotations and sends a PlotChangeEvent
to all
registered listeners.
Clears the domain axes from the plot and sends a PlotChangeEvent
to all registered listeners.
Clears all the domain markers for the specified renderer.
index | the renderer index. |
---|
Clears all the domain markers for the plot and sends a
PlotChangeEvent
to all registered listeners.
Clears the range axes from the plot and sends a PlotChangeEvent
to all registered listeners.
Clears all the range markers for the specified renderer.
index | the renderer index. |
---|
Clears all the range markers for the plot and sends a
PlotChangeEvent
to all registered listeners.
Returns a clone of the plot.
CloneNotSupportedException | if the cloning is not supported. |
---|
Configures the domain axes.
Configures the range axes.
Receives notification of a change to the plot's dataset.
The range axis bounds will be recalculated if necessary.
event | information about the event (not used here). |
---|
Draws the plot on a Java 2D graphics device (such as the screen or a printer).
At your option, you may supply an instance of PlotRenderingInfo
.
If you do, it will be populated with information about the drawing,
including various plot dimensions and tooltip info.
g2 | the graphics device. |
---|---|
area | the area within which the plot (including axes) should be drawn. |
anchor | the anchor point (null permitted). |
parentState | the state from the parent plot, if there is one. |
state | collects info as the chart is drawn (possibly
null ).
|
Draws the plot background (the background color and/or image).
This method will be called during the chart drawing process and is declared public so that it can be accessed by the renderers used by certain subclasses. You shouldn't need to call this method directly.
g2 | the graphics device. |
---|---|
area | the area within which the plot should be drawn. |
Tests the plot for equality with an arbitrary object.
obj | the object to test against (null permitted). |
---|
Returns the list of annotations.
null
).Returns the axis offset.
null
).Returns a list of the categories in the plot's primary dataset.
Returns a list of the categories that should be displayed for the specified axis.
axis | the axis (null not permitted) |
---|
Returns the order in which the columns are rendered. The default value
is SortOrder.ASCENDING
.
null
Returns the dataset index for the crosshair.
Returns the range of data values that will be plotted against the range
axis. If the dataset is null
, this method returns
null
.
axis | the axis. |
---|
Returns the dataset at the given index.
index | the dataset index. |
---|
null
).Returns the primary dataset for the plot.
null
).Returns the number of datasets.
Returns the dataset rendering order.
null
).Returns a domain axis.
index | the axis index. |
---|
null
possible).Returns the domain axis for the plot. If the domain axis for this plot
is null
, then the method will return the parent plot's
domain axis (if there is a parent plot).
null
permitted).Returns the number of domain axes.
Returns the edge for a domain axis.
index | the axis index. |
---|
null
).
Returns the domain axis edge. This is derived from the axis location and the plot orientation.
null
).
Returns the domain axis for a dataset. You can change the axis for a
dataset using the mapDatasetToDomainAxis(int, int)
method.
index | the dataset index. |
---|
Returns the index of the specified axis, or -1
if the axis
is not assigned to the plot.
axis | the axis (null not permitted). |
---|
Returns the location for a domain axis.
index | the axis index. |
---|
Returns the domain axis location for the primary domain axis.
null
).Returns the column key for the domain crosshair.
Returns the paint used to draw the domain crosshair.
null
).Returns the row key for the domain crosshair.
Returns the stroke used to draw the domain crosshair.
null
).Returns the paint used to draw grid-lines against the domain axis.
null
).Returns the position used for the domain gridlines.
null
).Returns the stroke used to draw grid-lines against the domain axis.
null
).Returns a collection of domain markers for a particular renderer and layer.
index | the renderer index. |
---|---|
layer | the layer. |
null
).
Returns the list of domain markers (read only) for the specified layer.
layer | the layer (foreground or background). |
---|
Returns the flag that controls whether or not the shared domain axis is drawn for each subplot.
Returns the fixed domain axis space.
null
).Returns the fixed legend items, if any.
null
).Returns the fixed range axis space.
null
).Returns the index of the specified renderer, or -1
if the
renderer is not assigned to this plot.
renderer | the renderer (null permitted). |
---|
Returns the legend items for the plot. By default, this method creates a legend item for each series in each of the datasets. You can change this behaviour by overriding this method.
Returns the orientation of the plot.
null
).Returns a range axis.
index | the axis index. |
---|
null
possible).
Returns the range axis for the plot. If the range axis for this plot is null, then the method will return the parent plot's range axis (if there is a parent plot).
null
).
Returns the number of range axes.
Returns the edge where the primary range axis is located.
null
).
Returns the edge for a range axis.
index | the axis index. |
---|
Returns the range axis for a dataset. You can change the axis for a
dataset using the mapDatasetToRangeAxis(int, int)
method.
index | the dataset index. |
---|
Returns the index of the specified axis, or -1
if the axis
is not assigned to the plot.
axis | the axis (null not permitted). |
---|
Returns the location for a range axis.
index | the axis index. |
---|
Returns the range axis location.
null
).
Returns the paint used to draw the range crosshair.
null
).Returns the pen-style (Stroke
) used to draw the crosshair
(if visible).
null
).Returns the paint used to draw the grid-lines against the range axis.
null
).Returns the stroke used to draw the grid-lines against the range axis.
null
).Returns a collection of range markers for a particular renderer and layer.
index | the renderer index. |
---|---|
layer | the layer. |
null
).
Returns the list of range markers (read only) for the specified layer.
layer | the layer (foreground or background). |
---|
Returns the paint for the minor grid lines (if any) plotted against the range axis.
null
).Returns the stroke for the minor grid lines (if any) plotted against the range axis.
null
).Returns the paint for the zero baseline (if any) plotted against the range axis.
null
).Returns the stroke used for the zero baseline against the range axis.
null
).Returns the renderer at the given index.
index | the renderer index. |
---|
null
).Returns a reference to the renderer for the plot.
Returns the number of renderer slots for this plot.
Returns the renderer for the specified dataset. If the dataset doesn't
belong to the plot, this method will return null
.
dataset | the dataset (null permitted). |
---|
null
).
Returns the order in which the rows should be rendered. The default
value is SortOrder.ASCENDING
.
null
).Returns the weight for this plot when it is used as a subplot within a combined plot.
Handles a 'click' on the plot by updating the anchor value.
x | x-coordinate of the click (in Java2D space). |
---|---|
y | y-coordinate of the click (in Java2D space). |
info | information about the plot's dimensions. |
Returns the index of the specified dataset, or -1
if the
dataset does not belong to the plot.
dataset | the dataset (null not permitted). |
---|
Returns the flag that controls whether or not the domain crosshair is displayed by the plot.
Returns the flag that controls whether the domain grid-lines are visible.
true
or false
.Returns false
always, because the plot cannot be panned
along the domain axis/axes.
Returns false
to indicate that the domain axes are not
zoomable.
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
Returns a flag indicating whether or not the range crosshair is visible.
Returns the flag that controls whether the range grid-lines are visible.
Returns true
if the range axis minor grid is visible, and
false
otherwise.
Returns true
if panning is enabled for the range axes,
and false
otherwise.
Returns a flag that controls whether or not a zero baseline is displayed for the range axis.
Returns true
to indicate that the range axes are zoomable.
Maps the specified dataset to the axes in the list. Note that the conversion of data values into Java2D space is always performed using the first axis in the list.
index | the dataset index (zero-based). |
---|---|
axisIndices | the axis indices (null permitted). |
Maps a dataset to a particular domain axis.
index | the dataset index (zero-based). |
---|---|
axisIndex | the axis index (zero-based). |
Maps the specified dataset to the axes in the list. Note that the conversion of data values into Java2D space is always performed using the first axis in the list.
index | the dataset index (zero-based). |
---|---|
axisIndices | the axis indices (null permitted). |
Maps a dataset to a particular range axis.
index | the dataset index (zero-based). |
---|---|
axisIndex | the axis index (zero-based). |
Pans the domain axes by the specified percentage.
percent | the distance to pan (as a percentage of the axis length). |
---|---|
info | the plot info |
source | the source point where the pan action started. |
Pans the range axes by the specified percentage.
percent | the distance to pan (as a percentage of the axis length). |
---|---|
info | the plot info |
source | the source point where the pan action started. |
Removes an annotation from the plot and sends a PlotChangeEvent
to all registered listeners.
annotation | the annotation (null not permitted). |
---|
Removes an annotation from the plot and, if requested, sends a
PlotChangeEvent
to all registered listeners.
annotation | the annotation (null not permitted). |
---|---|
notify | notify listeners? |
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent
to all registered listeners.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
Removes a marker for the domain axis in the specified layer and sends a
PlotChangeEvent
to all registered listeners.
marker | the marker (null not permitted). |
---|---|
layer | the layer (foreground or background). |
Removes a marker for the domain axis and sends a PlotChangeEvent
to all registered listeners.
marker | the marker. |
---|
Removes a marker for a specific dataset/renderer and, if requested,
sends a PlotChangeEvent
to all registered listeners.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
notify | notify listeners? |
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent
to all registered listeners.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
notify | notify listeners. |
Removes a marker for the range axis and sends a PlotChangeEvent
to all registered listeners.
marker | the marker. |
---|
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent
to all registered listeners.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
Removes a marker for the range axis in the specified layer and sends a
PlotChangeEvent
to all registered listeners.
marker | the marker (null not permitted). |
---|---|
layer | the layer (foreground or background). |
Draws a representation of a dataset within the dataArea region using the appropriate renderer.
g2 | the graphics device. |
---|---|
dataArea | the region in which the data is to be drawn. |
index | the dataset and renderer index. |
info | an optional object for collection dimension information. |
crosshairState | a state object for tracking crosshair info
(null permitted). |
Receives notification of a renderer change event.
event | the event. |
---|
Sets the anchor value and sends a PlotChangeEvent
to all
registered listeners.
value | the anchor value. |
---|
Sets the anchor value and, if requested, sends a PlotChangeEvent
to all registered listeners.
value | the value. |
---|---|
notify | notify listeners? |
Sets the axis offsets (gap between the data area and the axes) and
sends a PlotChangeEvent
to all registered listeners.
offset | the offset (null not permitted). |
---|
Sets the column order in which the items in each dataset should be
rendered and sends a PlotChangeEvent
to all registered
listeners. Note that this affects the order in which items are drawn,
NOT their position in the chart.
order | the order (null not permitted). |
---|
Sets the dataset index for the crosshair and, if requested, sends a
PlotChangeEvent
to all registered listeners.
index | the index. |
---|---|
notify | notify listeners? |
Sets the dataset index for the crosshair and sends a
PlotChangeEvent
to all registered listeners.
index | the index. |
---|
Sets a dataset for the plot.
index | the dataset index. |
---|---|
dataset | the dataset (null permitted). |
Sets the dataset for the plot, replacing the existing dataset, if there
is one. This method also calls the
datasetChanged(DatasetChangeEvent)
method, which adjusts the
axis ranges if necessary and sends a PlotChangeEvent
to all
registered listeners.
dataset | the dataset (null permitted). |
---|
Sets the rendering order and sends a PlotChangeEvent
to all
registered listeners. By default, the plot renders the primary dataset
last (so that the primary dataset overlays the secondary datasets). You
can reverse this if you want to.
order | the rendering order (null not permitted). |
---|
Sets the domain axes for this plot and sends a PlotChangeEvent
to all registered listeners.
axes | the axes (null not permitted). |
---|
Sets a domain axis and, if requested, sends a PlotChangeEvent
to
all registered listeners.
index | the axis index. |
---|---|
axis | the axis (null permitted). |
notify | notify listeners? |
Sets a domain axis and sends a PlotChangeEvent
to all
registered listeners.
index | the axis index. |
---|---|
axis | the axis (null permitted). |
Sets the domain axis for the plot and sends a PlotChangeEvent
to
all registered listeners.
axis | the axis (null permitted). |
---|
Sets the location for a domain axis and sends a PlotChangeEvent
to all registered listeners.
index | the axis index. |
---|---|
location | the location. |
notify | notify listeners? |
Sets the location for a domain axis and sends a PlotChangeEvent
to all registered listeners.
index | the axis index. |
---|---|
location | the location. |
Sets the location of the domain axis and, if requested, sends a
PlotChangeEvent
to all registered listeners.
location | the axis location (null not permitted). |
---|---|
notify | a flag that controls whether listeners are notified. |
Sets the location of the domain axis and sends a PlotChangeEvent
to all registered listeners.
location | the axis location (null not permitted). |
---|
Sets the column key for the domain crosshair and sends
a PlotChangeEvent
to all registered listeners.
key | the key. |
---|
Sets the column key for the domain crosshair and, if requested, sends
a PlotChangeEvent
to all registered listeners.
key | the key. |
---|---|
notify | notify listeners? |
Sets the paint used to draw the domain crosshair.
paint | the paint (null not permitted). |
---|
Sets the row key for the domain crosshair and sends a {PlotChangeEvent} to all registered listeners.
key | the key. |
---|
Sets the row key for the domain crosshair and, if requested, sends a {PlotChangeEvent} to all registered listeners.
key | the key. |
---|---|
notify | notify listeners? |
Sets the stroke used to draw the domain crosshair, and sends a
PlotChangeEvent
to all registered listeners.
stroke | the stroke (null not permitted). |
---|
Sets the flag that controls whether or not the domain crosshair is
displayed by the plot, and sends a PlotChangeEvent
to all
registered listeners.
flag | the new flag value. |
---|
Sets the paint used to draw the grid-lines (if any) against the domain
axis and sends a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Sets the position used for the domain gridlines and sends a
PlotChangeEvent
to all registered listeners.
position | the position (null not permitted). |
---|
Sets the stroke used to draw grid-lines against the domain axis and
sends a PlotChangeEvent
to all registered listeners.
stroke | the stroke (null not permitted). |
---|
Sets the flag that controls whether or not grid-lines are drawn against the domain axis.
If the flag value changes, a PlotChangeEvent
is sent to all
registered listeners.
visible | the new value of the flag. |
---|
Sets the flag that controls whether the shared domain axis is drawn when this plot is being used as a subplot.
draw | a boolean. |
---|
Sets the fixed domain axis space and sends a PlotChangeEvent
to
all registered listeners.
space | the space (null permitted). |
---|
Sets the fixed domain axis space and sends a PlotChangeEvent
to
all registered listeners.
space | the space (null permitted). |
---|---|
notify | notify listeners? |
Sets the fixed legend items for the plot. Leave this set to
null
if you prefer the legend items to be created
automatically.
items | the legend items (null permitted). |
---|
Sets the fixed range axis space and sends a PlotChangeEvent
to
all registered listeners.
space | the space (null permitted). |
---|---|
notify | notify listeners? |
Sets the fixed range axis space and sends a PlotChangeEvent
to
all registered listeners.
space | the space (null permitted). |
---|
Sets the orientation for the plot and sends a PlotChangeEvent
to
all registered listeners.
orientation | the orientation (null not permitted). |
---|
Sets the range axes for this plot and sends a PlotChangeEvent
to all registered listeners.
axes | the axes (null not permitted). |
---|
Sets a range axis and, if requested, sends a PlotChangeEvent
to
all registered listeners.
index | the axis index. |
---|---|
axis | the axis. |
notify | notify listeners? |
Sets the range axis for the plot and sends a PlotChangeEvent
to
all registered listeners.
axis | the axis (null permitted).
|
---|
Sets a range axis and sends a PlotChangeEvent
to all registered
listeners.
index | the axis index. |
---|---|
axis | the axis. |
Sets the location for a range axis and sends a PlotChangeEvent
to all registered listeners.
index | the axis index. |
---|---|
location | the location. |
notify | notify listeners? |
Sets the location of the range axis and sends a PlotChangeEvent
to all registered listeners.
location | the location (null not permitted). |
---|
Sets the location of the range axis and, if requested, sends a
PlotChangeEvent
to all registered listeners.
location | the location (null not permitted). |
---|---|
notify | notify listeners? |
Sets the location for a range axis and sends a PlotChangeEvent
to all registered listeners.
index | the axis index. |
---|---|
location | the location. |
Sets the flag indicating whether or not the range crosshair should
"lock-on" to actual data values, and sends a PlotChangeEvent
to all registered listeners.
flag | the flag. |
---|
Sets the paint used to draw the range crosshair (if visible) and
sends a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Sets the pen-style (Stroke
) used to draw the range
crosshair (if visible), and sends a PlotChangeEvent
to all
registered listeners.
stroke | the new crosshair stroke (null not
permitted). |
---|
Sets the range crosshair value and, if the crosshair is visible, sends
a PlotChangeEvent
to all registered listeners.
value | the new value. |
---|
Sets the range crosshair value and, if requested, sends a
PlotChangeEvent
to all registered listeners (but only if the
crosshair is visible).
value | the new value. |
---|---|
notify | a flag that controls whether or not listeners are notified. |
Sets the flag indicating whether or not the range crosshair is visible.
flag | the new value of the flag. |
---|
Sets the paint used to draw the grid lines against the range axis and
sends a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Sets the stroke used to draw the grid-lines against the range axis and
sends a PlotChangeEvent
to all registered listeners.
stroke | the stroke (null not permitted). |
---|
Sets the flag that controls whether or not grid-lines are drawn against
the range axis. If the flag changes value, a PlotChangeEvent
is
sent to all registered listeners.
visible | the new value of the flag. |
---|
Sets the paint for the minor grid lines plotted against the range axis
and sends a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Sets the stroke for the minor grid lines plotted against the range axis,
and sends a PlotChangeEvent
to all registered listeners.
stroke | the stroke (null not permitted). |
---|
Sets the flag that controls whether or not the range axis minor grid lines are visible.
If the flag value is changed, a PlotChangeEvent
is sent to all
registered listeners.
visible | the new value of the flag. |
---|
Sets the flag that enables or disables panning of the plot along the range axes.
pannable | the new flag value. |
---|
Sets the paint for the zero baseline plotted against the range axis and
sends a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Sets the stroke for the zero baseline for the range axis,
and sends a PlotChangeEvent
to all registered listeners.
stroke | the stroke (null not permitted). |
---|
Sets the flag that controls whether or not the zero baseline is
displayed for the range axis, and sends a PlotChangeEvent
to
all registered listeners.
visible | the flag. |
---|
Sets the renderer at index 0 (sometimes referred to as the "primary"
renderer) and, if requested, sends a PlotChangeEvent
to all
registered listeners.
You can set the renderer to null
, but this is not
recommended because:
renderer | the renderer (null permitted). |
---|---|
notify | notify listeners? |
Sets the renderer at the specified index and sends a
PlotChangeEvent
to all registered listeners.
index | the index. |
---|---|
renderer | the renderer (null permitted). |
Sets a renderer. A PlotChangeEvent
is sent to all registered
listeners.
index | the index. |
---|---|
renderer | the renderer (null permitted). |
notify | notify listeners? |
Sets the renderer at index 0 (sometimes referred to as the "primary"
renderer) and sends a PlotChangeEvent
to all registered
listeners.
renderer | the renderer (null permitted. |
---|
Sets the renderers for this plot and sends a PlotChangeEvent
to all registered listeners.
renderers | the renderers. |
---|
Sets the row order in which the items in each dataset should be
rendered and sends a PlotChangeEvent
to all registered
listeners. Note that this affects the order in which items are drawn,
NOT their position in the chart.
order | the order (null not permitted). |
---|
Sets the weight for the plot and sends a PlotChangeEvent
to all
registered listeners.
weight | the weight. |
---|
Zooms (in or out) on the plot's value axis.
If the value 0.0 is passed in as the zoom percent, the auto-range calculation for the axis is restored (which sets the range to include the minimum and maximum data values, thus displaying all the data).
percent | the zoom amount. |
---|
This method does nothing, because CategoryPlot
doesn't
support zooming on the domain.
factor | the zoom factor. |
---|---|
info | the plot rendering info. |
source | the source point (in Java2D space). |
useAnchor | use source point as zoom anchor? |
This method does nothing, because CategoryPlot
doesn't
support zooming on the domain.
factor | the zoom factor. |
---|---|
state | the plot state. |
source | the source point (in Java2D space) for the zoom. |
This method does nothing, because CategoryPlot
doesn't
support zooming on the domain.
lowerPercent | the lower bound. |
---|---|
upperPercent | the upper bound. |
state | the plot state. |
source | the source point (in Java2D space) for the zoom. |
Multiplies the range on the range axis/axes by the specified factor.
factor | the zoom factor. |
---|---|
info | the plot rendering info. |
source | the source point. |
useAnchor | a flag that controls whether or not the source point is used for the zoom anchor. |
Zooms in on the range axes.
lowerPercent | the lower bound. |
---|---|
upperPercent | the upper bound. |
state | the plot state. |
source | the source point (in Java2D space) for the zoom. |
Multiplies the range on the range axis/axes by the specified factor.
factor | the zoom factor. |
---|---|
state | the plot state. |
source | the source point (in Java2D space) for the zoom. |
Calculates the space required for the axes.
g2 | the graphics device. |
---|---|
plotArea | the plot area. |
Calculates the space required for the domain axis/axes.
g2 | the graphics device. |
---|---|
plotArea | the plot area. |
space | a carrier for the result (null permitted). |
Calculates the space required for the range axis/axes.
g2 | the graphics device. |
---|---|
plotArea | the plot area. |
space | a carrier for the result (null permitted). |
Draws the annotations.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
A utility method for drawing the plot's axes.
g2 | the graphics device. |
---|---|
plotArea | the plot area. |
dataArea | the data area. |
plotState | collects information about the plot (null
permitted). |
Draws a domain crosshair.
g2 | the graphics target. |
---|---|
dataArea | the data area. |
orientation | the plot orientation. |
datasetIndex | the dataset index. |
rowKey | the row key. |
columnKey | the column key. |
stroke | the stroke used to draw the crosshair line. |
paint | the paint used to draw the crosshair line. |
Draws the domain gridlines for the plot, if they are visible.
g2 | the graphics device. |
---|---|
dataArea | the area inside the axes. |
Draws the domain markers (if any) for an axis and layer. This method is typically called from within the draw() method.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
index | the renderer index. |
layer | the layer (foreground or background). |
Draws a range crosshair.
g2 | the graphics target. |
---|---|
dataArea | the data area. |
orientation | the plot orientation. |
value | the crosshair value. |
axis | the axis against which the value is measured. |
stroke | the stroke used to draw the crosshair line. |
paint | the paint used to draw the crosshair line. |
Draws the range gridlines for the plot, if they are visible.
g2 | the graphics device. |
---|---|
dataArea | the area inside the axes. |
ticks | the ticks. |
Utility method for drawing a line perpendicular to the range axis (used for crosshairs).
g2 | the graphics device. |
---|---|
dataArea | the area defined by the axes. |
value | the data value. |
stroke | the line stroke (null not permitted). |
paint | the line paint (null not permitted).
|
Draws the range markers (if any) for an axis and layer. This method is typically called from within the draw() method.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
index | the renderer index. |
layer | the layer (foreground or background). |
Draws a base line across the chart at value zero on the range axis.
g2 | the graphics device. |
---|---|
area | the data area. |