org.jfree.chart.plot
public class CategoryPlot extends Plot implements ValueAxisPlot, Pannable, Zoomable, RendererChangeListener, Cloneable, PublicCloneable, Serializable
Field Summary | |
---|---|
static Paint | DEFAULT_CROSSHAIR_PAINT
The default crosshair paint.
|
static Stroke | DEFAULT_CROSSHAIR_STROKE
The default crosshair stroke.
|
static boolean | DEFAULT_CROSSHAIR_VISIBLE
The default crosshair visibility.
|
static boolean | DEFAULT_DOMAIN_GRIDLINES_VISIBLE
The default visibility of the grid lines plotted against the domain
axis. |
static Paint | DEFAULT_GRIDLINE_PAINT The default grid line paint. |
static Stroke | DEFAULT_GRIDLINE_STROKE The default grid line stroke. |
static boolean | DEFAULT_RANGE_GRIDLINES_VISIBLE
The default visibility of the grid lines plotted against the range
axis. |
static Font | DEFAULT_VALUE_LABEL_FONT The default value label font. |
protected static ResourceBundle | localizationResources The resourceBundle for the localization. |
Constructor Summary | |
---|---|
CategoryPlot()
Default constructor. | |
CategoryPlot(CategoryDataset dataset, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryItemRenderer renderer)
Creates a new plot.
|
Method Summary | |
---|---|
void | addAnnotation(CategoryAnnotation annotation)
Adds an annotation to the plot and sends a PlotChangeEvent to all
registered listeners.
|
void | addAnnotation(CategoryAnnotation annotation, boolean notify)
Adds an annotation to the plot and, if requested, sends a
PlotChangeEvent to all registered listeners.
|
void | addDomainMarker(CategoryMarker marker)
Adds a marker for display (in the foreground) against the domain axis and
sends a PlotChangeEvent to all registered listeners. |
void | addDomainMarker(CategoryMarker marker, Layer layer)
Adds a marker for display against the domain axis and sends a
PlotChangeEvent to all registered listeners. |
void | addDomainMarker(int index, CategoryMarker marker, Layer layer)
Adds a marker for display by a particular renderer and sends a
PlotChangeEvent to all registered listeners.
|
void | addDomainMarker(int index, CategoryMarker marker, Layer layer, boolean notify)
Adds a marker for display by a particular renderer and, if requested,
sends a PlotChangeEvent to all registered listeners.
|
void | addRangeMarker(Marker marker)
Adds a marker for display (in the foreground) against the range axis and
sends a PlotChangeEvent to all registered listeners. |
void | addRangeMarker(Marker marker, Layer layer)
Adds a marker for display against the range axis and sends a
PlotChangeEvent to all registered listeners. |
void | addRangeMarker(int index, Marker marker, Layer layer)
Adds a marker for display by a particular renderer and sends a
PlotChangeEvent to all registered listeners.
|
void | addRangeMarker(int index, Marker marker, Layer layer, boolean notify)
Adds a marker for display by a particular renderer and sends a
PlotChangeEvent to all registered listeners.
|
protected AxisSpace | calculateAxisSpace(Graphics2D g2, Rectangle2D plotArea)
Calculates the space required for the axes.
|
protected AxisSpace | calculateDomainAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space)
Calculates the space required for the domain axis/axes.
|
protected AxisSpace | calculateRangeAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space)
Calculates the space required for the range axis/axes.
|
void | clearAnnotations()
Clears all the annotations and sends a PlotChangeEvent to all
registered listeners. |
void | clearDomainAxes()
Clears the domain axes from the plot and sends a PlotChangeEvent
to all registered listeners. |
void | clearDomainMarkers()
Clears all the domain markers for the plot and sends a
PlotChangeEvent to all registered listeners.
|
void | clearDomainMarkers(int index)
Clears all the domain markers for the specified renderer.
|
void | clearRangeAxes()
Clears the range axes from the plot and sends a PlotChangeEvent
to all registered listeners. |
void | clearRangeMarkers()
Clears all the range markers for the plot and sends a
PlotChangeEvent to all registered listeners.
|
void | clearRangeMarkers(int index)
Clears all the range markers for the specified renderer.
|
Object | clone()
Returns a clone of the plot.
|
void | configureDomainAxes()
Configures the domain axes. |
void | configureRangeAxes()
Configures the range axes. |
void | datasetChanged(DatasetChangeEvent event)
Receives notification of a change to the plot's dataset.
|
void | draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo state)
Draws the plot on a Java 2D graphics device (such as the screen or a
printer).
|
protected void | drawAnnotations(Graphics2D g2, Rectangle2D dataArea)
Draws the annotations.
|
protected Map | drawAxes(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, PlotRenderingInfo plotState)
A utility method for drawing the plot's axes.
|
void | drawBackground(Graphics2D g2, Rectangle2D area)
Draws the plot background (the background color and/or image).
|
protected void | drawDomainCrosshair(Graphics2D g2, Rectangle2D dataArea, PlotOrientation orientation, int datasetIndex, Comparable rowKey, Comparable columnKey, Stroke stroke, Paint paint)
Draws a domain crosshair.
|
protected void | drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea)
Draws the domain gridlines for the plot, if they are visible.
|
protected void | drawDomainMarkers(Graphics2D g2, Rectangle2D dataArea, int index, Layer layer)
Draws the domain markers (if any) for an axis and layer. |
protected void | drawRangeCrosshair(Graphics2D g2, Rectangle2D dataArea, PlotOrientation orientation, double value, ValueAxis axis, Stroke stroke, Paint paint)
Draws a range crosshair.
|
protected void | drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the range gridlines for the plot, if they are visible.
|
protected void | drawRangeLine(Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint)
Utility method for drawing a line perpendicular to the range axis (used
for crosshairs).
|
protected void | drawRangeMarkers(Graphics2D g2, Rectangle2D dataArea, int index, Layer layer)
Draws the range markers (if any) for an axis and layer. |
protected void | drawZeroRangeBaseline(Graphics2D g2, Rectangle2D area)
Draws a base line across the chart at value zero on the range axis.
|
boolean | equals(Object obj)
Tests the plot for equality with an arbitrary object.
|
double | getAnchorValue()
Returns the anchor value.
|
List | getAnnotations()
Returns the list of annotations.
|
RectangleInsets | getAxisOffset()
Returns the axis offset.
|
List | getCategories()
Returns a list of the categories in the plot's primary dataset.
|
List | getCategoriesForAxis(CategoryAxis axis)
Returns a list of the categories that should be displayed for the
specified axis.
|
SortOrder | getColumnRenderingOrder()
Returns the order in which the columns are rendered. |
int | getCrosshairDatasetIndex()
Returns the dataset index for the crosshair.
|
Range | getDataRange(ValueAxis axis)
Returns the range of data values that will be plotted against the range
axis. |
CategoryDataset | getDataset()
Returns the primary dataset for the plot.
|
CategoryDataset | getDataset(int index)
Returns the dataset at the given index.
|
int | getDatasetCount()
Returns the number of datasets.
|
DatasetRenderingOrder | getDatasetRenderingOrder()
Returns the dataset rendering order.
|
CategoryAxis | getDomainAxis()
Returns the domain axis for the plot. |
CategoryAxis | getDomainAxis(int index)
Returns a domain axis.
|
int | getDomainAxisCount()
Returns the number of domain axes.
|
RectangleEdge | getDomainAxisEdge()
Returns the domain axis edge. |
RectangleEdge | getDomainAxisEdge(int index)
Returns the edge for a domain axis.
|
CategoryAxis | getDomainAxisForDataset(int index)
Returns the domain axis for a dataset. |
int | getDomainAxisIndex(CategoryAxis axis)
Returns the index of the specified axis, or -1 if the axis
is not assigned to the plot.
|
AxisLocation | getDomainAxisLocation()
Returns the domain axis location for the primary domain axis.
|
AxisLocation | getDomainAxisLocation(int index)
Returns the location for a domain axis.
|
Comparable | getDomainCrosshairColumnKey()
Returns the column key for the domain crosshair.
|
Paint | getDomainCrosshairPaint()
Returns the paint used to draw the domain crosshair.
|
Comparable | getDomainCrosshairRowKey()
Returns the row key for the domain crosshair.
|
Stroke | getDomainCrosshairStroke()
Returns the stroke used to draw the domain crosshair.
|
Paint | getDomainGridlinePaint()
Returns the paint used to draw grid-lines against the domain axis.
|
CategoryAnchor | getDomainGridlinePosition()
Returns the position used for the domain gridlines.
|
Stroke | getDomainGridlineStroke()
Returns the stroke used to draw grid-lines against the domain axis.
|
Collection | getDomainMarkers(Layer layer)
Returns the list of domain markers (read only) for the specified layer.
|
Collection | getDomainMarkers(int index, Layer layer)
Returns a collection of domain markers for a particular renderer and
layer.
|
boolean | getDrawSharedDomainAxis()
Returns the flag that controls whether or not the shared domain axis is
drawn for each subplot.
|
AxisSpace | getFixedDomainAxisSpace()
Returns the fixed domain axis space.
|
LegendItemCollection | getFixedLegendItems()
Returns the fixed legend items, if any.
|
AxisSpace | getFixedRangeAxisSpace()
Returns the fixed range axis space.
|
int | getIndexOf(CategoryItemRenderer renderer)
Returns the index of the specified renderer, or -1 if the
renderer is not assigned to this plot.
|
LegendItemCollection | getLegendItems()
Returns the legend items for the plot. |
PlotOrientation | getOrientation()
Returns the orientation of the plot.
|
String | getPlotType()
Returns a string describing the type of plot.
|
ValueAxis | getRangeAxis()
Returns the range axis for the plot. |
ValueAxis | getRangeAxis(int index)
Returns a range axis.
|
int | getRangeAxisCount()
Returns the number of range axes.
|
RectangleEdge | getRangeAxisEdge()
Returns the edge where the primary range axis is located.
|
RectangleEdge | getRangeAxisEdge(int index)
Returns the edge for a range axis.
|
ValueAxis | getRangeAxisForDataset(int index)
Returns the range axis for a dataset. |
int | getRangeAxisIndex(ValueAxis axis)
Returns the index of the specified axis, or -1 if the axis
is not assigned to the plot.
|
AxisLocation | getRangeAxisLocation()
Returns the range axis location.
|
AxisLocation | getRangeAxisLocation(int index)
Returns the location for a range axis.
|
Paint | getRangeCrosshairPaint()
Returns the paint used to draw the range crosshair.
|
Stroke | getRangeCrosshairStroke()
Returns the pen-style ( Stroke ) used to draw the crosshair
(if visible).
|
double | getRangeCrosshairValue()
Returns the range crosshair value.
|
Paint | getRangeGridlinePaint()
Returns the paint used to draw the grid-lines against the range axis.
|
Stroke | getRangeGridlineStroke()
Returns the stroke used to draw the grid-lines against the range axis.
|
Collection | getRangeMarkers(Layer layer)
Returns the list of range markers (read only) for the specified layer.
|
Collection | getRangeMarkers(int index, Layer layer)
Returns a collection of range markers for a particular renderer and
layer.
|
Paint | getRangeMinorGridlinePaint()
Returns the paint for the minor grid lines (if any) plotted against the
range axis.
|
Stroke | getRangeMinorGridlineStroke()
Returns the stroke for the minor grid lines (if any) plotted against the
range axis.
|
Paint | getRangeZeroBaselinePaint()
Returns the paint for the zero baseline (if any) plotted against the
range axis.
|
Stroke | getRangeZeroBaselineStroke()
Returns the stroke used for the zero baseline against the range axis.
|
CategoryItemRenderer | getRenderer()
Returns a reference to the renderer for the plot.
|
CategoryItemRenderer | getRenderer(int index)
Returns the renderer at the given index.
|
int | getRendererCount()
Returns the number of renderer slots for this plot.
|
CategoryItemRenderer | getRendererForDataset(CategoryDataset dataset)
Returns the renderer for the specified dataset. |
SortOrder | getRowRenderingOrder()
Returns the order in which the rows should be rendered. |
int | getWeight()
Returns the weight for this plot when it is used as a subplot within a
combined plot.
|
void | handleClick(int x, int y, PlotRenderingInfo info)
Handles a 'click' on the plot by updating the anchor value.
|
int | indexOf(CategoryDataset dataset)
Returns the index of the specified dataset, or -1 if the
dataset does not belong to the plot.
|
boolean | isDomainCrosshairVisible()
Returns the flag that controls whether or not the domain crosshair is
displayed by the plot.
|
boolean | isDomainGridlinesVisible()
Returns the flag that controls whether the domain grid-lines are visible.
|
boolean | isDomainPannable()
Returns false always, because the plot cannot be panned
along the domain axis/axes.
|
boolean | isDomainZoomable()
Returns false to indicate that the domain axes are not
zoomable.
|
boolean | isRangeCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on"
to actual data values.
|
boolean | isRangeCrosshairVisible()
Returns a flag indicating whether or not the range crosshair is visible.
|
boolean | isRangeGridlinesVisible()
Returns the flag that controls whether the range grid-lines are visible.
|
boolean | isRangeMinorGridlinesVisible()
Returns true if the range axis minor grid is visible, and
false |
boolean | isRangePannable()
Returns true if panning is enabled for the range axes,
and false otherwise.
|
boolean | isRangeZeroBaselineVisible()
Returns a flag that controls whether or not a zero baseline is
displayed for the range axis.
|
boolean | isRangeZoomable()
Returns true to indicate that the range axes are zoomable.
|
void | mapDatasetToDomainAxes(int index, List axisIndices)
Maps the specified dataset to the axes in the list. |
void | mapDatasetToDomainAxis(int index, int axisIndex)
Maps a dataset to a particular domain axis.
|
void | mapDatasetToRangeAxes(int index, List axisIndices)
Maps the specified dataset to the axes in the list. |
void | mapDatasetToRangeAxis(int index, int axisIndex)
Maps a dataset to a particular range axis.
|
void | panDomainAxes(double percent, PlotRenderingInfo info, Point2D source)
Pans the domain axes by the specified percentage.
|
void | panRangeAxes(double percent, PlotRenderingInfo info, Point2D source)
Pans the range axes by the specified percentage.
|
boolean | removeAnnotation(CategoryAnnotation annotation)
Removes an annotation from the plot and sends a PlotChangeEvent
to all registered listeners.
|
boolean | removeAnnotation(CategoryAnnotation annotation, boolean notify)
Removes an annotation from the plot and, if requested, sends a
PlotChangeEvent to all registered listeners.
|
boolean | removeDomainMarker(Marker marker)
Removes a marker for the domain axis and sends a PlotChangeEvent
to all registered listeners.
|
boolean | removeDomainMarker(Marker marker, Layer layer)
Removes a marker for the domain axis in the specified layer and sends a
PlotChangeEvent to all registered listeners.
|
boolean | removeDomainMarker(int index, Marker marker, Layer layer)
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners.
|
boolean | removeDomainMarker(int index, Marker marker, Layer layer, boolean notify)
Removes a marker for a specific dataset/renderer and, if requested,
sends a PlotChangeEvent to all registered listeners.
|
boolean | removeRangeMarker(Marker marker)
Removes a marker for the range axis and sends a PlotChangeEvent
to all registered listeners.
|
boolean | removeRangeMarker(Marker marker, Layer layer)
Removes a marker for the range axis in the specified layer and sends a
PlotChangeEvent to all registered listeners.
|
boolean | removeRangeMarker(int index, Marker marker, Layer layer)
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners.
|
boolean | removeRangeMarker(int index, Marker marker, Layer layer, boolean notify)
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners.
|
boolean | render(Graphics2D g2, Rectangle2D dataArea, int index, PlotRenderingInfo info, CategoryCrosshairState crosshairState)
Draws a representation of a dataset within the dataArea region using the
appropriate renderer.
|
void | rendererChanged(RendererChangeEvent event)
Receives notification of a renderer change event.
|
void | setAnchorValue(double value)
Sets the anchor value and sends a PlotChangeEvent to all
registered listeners.
|
void | setAnchorValue(double value, boolean notify)
Sets the anchor value and, if requested, sends a PlotChangeEvent
to all registered listeners.
|
void | setAxisOffset(RectangleInsets offset)
Sets the axis offsets (gap between the data area and the axes) and
sends a PlotChangeEvent to all registered listeners.
|
void | setColumnRenderingOrder(SortOrder order)
Sets the column order in which the items in each dataset should be
rendered and sends a PlotChangeEvent to all registered
listeners. |
void | setCrosshairDatasetIndex(int index)
Sets the dataset index for the crosshair and sends a
PlotChangeEvent to all registered listeners.
|
void | setCrosshairDatasetIndex(int index, boolean notify)
Sets the dataset index for the crosshair and, if requested, sends a
PlotChangeEvent to all registered listeners.
|
void | setDataset(CategoryDataset dataset)
Sets the dataset for the plot, replacing the existing dataset, if there
is one. |
void | setDataset(int index, CategoryDataset dataset)
Sets a dataset for the plot.
|
void | setDatasetRenderingOrder(DatasetRenderingOrder order)
Sets the rendering order and sends a PlotChangeEvent to all
registered listeners. |
void | setDomainAxes(CategoryAxis[] axes)
Sets the domain axes for this plot and sends a PlotChangeEvent
to all registered listeners.
|
void | setDomainAxis(CategoryAxis axis)
Sets the domain axis for the plot and sends a PlotChangeEvent to
all registered listeners.
|
void | setDomainAxis(int index, CategoryAxis axis)
Sets a domain axis and sends a PlotChangeEvent to all
registered listeners.
|
void | setDomainAxis(int index, CategoryAxis axis, boolean notify)
Sets a domain axis and, if requested, sends a PlotChangeEvent to
all registered listeners.
|
void | setDomainAxisLocation(AxisLocation location)
Sets the location of the domain axis and sends a PlotChangeEvent
to all registered listeners.
|
void | setDomainAxisLocation(AxisLocation location, boolean notify)
Sets the location of the domain axis and, if requested, sends a
PlotChangeEvent to all registered listeners.
|
void | setDomainAxisLocation(int index, AxisLocation location)
Sets the location for a domain axis and sends a PlotChangeEvent
to all registered listeners.
|
void | setDomainAxisLocation(int index, AxisLocation location, boolean notify)
Sets the location for a domain axis and sends a PlotChangeEvent
to all registered listeners.
|
void | setDomainCrosshairColumnKey(Comparable key)
Sets the column key for the domain crosshair and sends
a PlotChangeEvent to all registered listeners.
|
void | setDomainCrosshairColumnKey(Comparable key, boolean notify)
Sets the column key for the domain crosshair and, if requested, sends
a PlotChangeEvent to all registered listeners.
|
void | setDomainCrosshairPaint(Paint paint)
Sets the paint used to draw the domain crosshair.
|
void | setDomainCrosshairRowKey(Comparable key)
Sets the row key for the domain crosshair and sends a
{PlotChangeEvent} to all registered listeners.
|
void | setDomainCrosshairRowKey(Comparable key, boolean notify)
Sets the row key for the domain crosshair and, if requested, sends a
{PlotChangeEvent} to all registered listeners.
|
void | setDomainCrosshairStroke(Stroke stroke)
Sets the stroke used to draw the domain crosshair, and sends a
PlotChangeEvent to all registered listeners.
|
void | setDomainCrosshairVisible(boolean flag)
Sets the flag that controls whether or not the domain crosshair is
displayed by the plot, and sends a PlotChangeEvent to all
registered listeners.
|
void | setDomainGridlinePaint(Paint paint)
Sets the paint used to draw the grid-lines (if any) against the domain
axis and sends a PlotChangeEvent to all registered listeners.
|
void | setDomainGridlinePosition(CategoryAnchor position)
Sets the position used for the domain gridlines and sends a
PlotChangeEvent to all registered listeners.
|
void | setDomainGridlinesVisible(boolean visible)
Sets the flag that controls whether or not grid-lines are drawn against
the domain axis.
|
void | setDomainGridlineStroke(Stroke stroke)
Sets the stroke used to draw grid-lines against the domain axis and
sends a PlotChangeEvent to all registered listeners.
|
void | setDrawSharedDomainAxis(boolean draw)
Sets the flag that controls whether the shared domain axis is drawn when
this plot is being used as a subplot.
|
void | setFixedDomainAxisSpace(AxisSpace space)
Sets the fixed domain axis space and sends a PlotChangeEvent to
all registered listeners.
|
void | setFixedDomainAxisSpace(AxisSpace space, boolean notify)
Sets the fixed domain axis space and sends a PlotChangeEvent to
all registered listeners.
|
void | setFixedLegendItems(LegendItemCollection items)
Sets the fixed legend items for the plot. |
void | setFixedRangeAxisSpace(AxisSpace space)
Sets the fixed range axis space and sends a PlotChangeEvent to
all registered listeners.
|
void | setFixedRangeAxisSpace(AxisSpace space, boolean notify)
Sets the fixed range axis space and sends a PlotChangeEvent to
all registered listeners.
|
void | setOrientation(PlotOrientation orientation)
Sets the orientation for the plot and sends a PlotChangeEvent to
all registered listeners.
|
void | setRangeAxes(ValueAxis[] axes)
Sets the range axes for this plot and sends a PlotChangeEvent
to all registered listeners.
|
void | setRangeAxis(ValueAxis axis)
Sets the range axis for the plot and sends a PlotChangeEvent to
all registered listeners.
|
void | setRangeAxis(int index, ValueAxis axis)
Sets a range axis and sends a PlotChangeEvent to all registered
listeners.
|
void | setRangeAxis(int index, ValueAxis axis, boolean notify)
Sets a range axis and, if requested, sends a PlotChangeEvent to
all registered listeners.
|
void | setRangeAxisLocation(AxisLocation location)
Sets the location of the range axis and sends a PlotChangeEvent
to all registered listeners.
|
void | setRangeAxisLocation(AxisLocation location, boolean notify)
Sets the location of the range axis and, if requested, sends a
PlotChangeEvent to all registered listeners.
|
void | setRangeAxisLocation(int index, AxisLocation location)
Sets the location for a range axis and sends a PlotChangeEvent
to all registered listeners.
|
void | setRangeAxisLocation(int index, AxisLocation location, boolean notify)
Sets the location for a range axis and sends a PlotChangeEvent
to all registered listeners.
|
void | setRangeCrosshairLockedOnData(boolean flag)
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.
|
void | setRangeCrosshairPaint(Paint paint)
Sets the paint used to draw the range crosshair (if visible) and
sends a PlotChangeEvent to all registered listeners.
|
void | setRangeCrosshairStroke(Stroke stroke)
Sets the pen-style ( Stroke ) used to draw the range
crosshair (if visible), and sends a PlotChangeEvent to all
registered listeners.
|
void | setRangeCrosshairValue(double value)
Sets the range crosshair value and, if the crosshair is visible, sends
a PlotChangeEvent to all registered listeners.
|
void | setRangeCrosshairValue(double value, boolean notify)
Sets the range crosshair value and, if requested, sends a
PlotChangeEvent to all registered listeners (but only if the
crosshair is visible).
|
void | setRangeCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the range crosshair is visible.
|
void | setRangeGridlinePaint(Paint paint)
Sets the paint used to draw the grid lines against the range axis and
sends a PlotChangeEvent to all registered listeners.
|
void | setRangeGridlinesVisible(boolean visible)
Sets the flag that controls whether or not grid-lines are drawn against
the range axis. |
void | setRangeGridlineStroke(Stroke stroke)
Sets the stroke used to draw the grid-lines against the range axis and
sends a PlotChangeEvent to all registered listeners.
|
void | setRangeMinorGridlinePaint(Paint paint)
Sets the paint for the minor grid lines plotted against the range axis
and sends a PlotChangeEvent to all registered listeners.
|
void | setRangeMinorGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the range axis minor grid
lines are visible.
|
void | setRangeMinorGridlineStroke(Stroke stroke)
Sets the stroke for the minor grid lines plotted against the range axis,
and sends a PlotChangeEvent to all registered listeners.
|
void | setRangePannable(boolean pannable)
Sets the flag that enables or disables panning of the plot along
the range axes.
|
void | setRangeZeroBaselinePaint(Paint paint)
Sets the paint for the zero baseline plotted against the range axis and
sends a PlotChangeEvent to all registered listeners.
|
void | setRangeZeroBaselineStroke(Stroke stroke)
Sets the stroke for the zero baseline for the range axis,
and sends a PlotChangeEvent to all registered listeners.
|
void | setRangeZeroBaselineVisible(boolean visible)
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.
|
void | setRenderer(CategoryItemRenderer renderer)
Sets the renderer at index 0 (sometimes referred to as the "primary"
renderer) and sends a PlotChangeEvent to all registered
listeners.
|
void | setRenderer(CategoryItemRenderer renderer, boolean notify)
Sets the renderer at index 0 (sometimes referred to as the "primary"
renderer) and, if requested, sends a PlotChangeEvent to all
registered listeners.
|
void | setRenderer(int index, CategoryItemRenderer renderer)
Sets the renderer at the specified index and sends a
PlotChangeEvent to all registered listeners.
|
void | setRenderer(int index, CategoryItemRenderer renderer, boolean notify)
Sets a renderer. |
void | setRenderers(CategoryItemRenderer[] renderers)
Sets the renderers for this plot and sends a PlotChangeEvent
to all registered listeners.
|
void | setRowRenderingOrder(SortOrder order)
Sets the row order in which the items in each dataset should be
rendered and sends a PlotChangeEvent to all registered
listeners. |
void | setWeight(int weight)
Sets the weight for the plot and sends a PlotChangeEvent to all
registered listeners.
|
void | zoom(double percent)
Zooms (in or out) on the plot's value axis.
|
void | zoomDomainAxes(double factor, PlotRenderingInfo state, Point2D source)
This method does nothing, because CategoryPlot doesn't
support zooming on the domain.
|
void | zoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source)
This method does nothing, because CategoryPlot doesn't
support zooming on the domain.
|
void | zoomDomainAxes(double factor, PlotRenderingInfo info, Point2D source, boolean useAnchor)
This method does nothing, because CategoryPlot doesn't
support zooming on the domain.
|
void | zoomRangeAxes(double factor, PlotRenderingInfo state, Point2D source)
Multiplies the range on the range axis/axes by the specified factor.
|
void | zoomRangeAxes(double factor, PlotRenderingInfo info, Point2D source, boolean useAnchor)
Multiplies the range on the range axis/axes by the specified factor.
|
void | zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source)
Zooms in on the range axes.
|
Since: 1.0.5
Since: 1.0.5
Since: 1.0.5
Parameters: dataset the dataset (null
permitted). domainAxis the domain axis (null
permitted). rangeAxis the range axis (null
permitted). renderer the item renderer (null
permitted).
Parameters: annotation the annotation (null
not permitted).
See Also: removeAnnotation
Parameters: annotation the annotation (null
not permitted). notify notify listeners?
Since: 1.0.10
Parameters: marker the marker (null
not permitted).
See Also: removeDomainMarker
Parameters: marker the marker (null
not permitted). layer the layer (foreground or background) (null
not permitted).
See Also: CategoryPlot
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.
Parameters: index the renderer index. marker the marker (null
not permitted). layer the layer (null
not permitted).
See Also: CategoryPlot
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.
Parameters: index the renderer index. marker the marker (null
not permitted). layer the layer (null
not permitted). notify notify listeners?
Since: 1.0.10
See Also: CategoryPlot
Parameters: marker the marker (null
not permitted).
See Also: removeRangeMarker
Parameters: marker the marker (null
not permitted). layer the layer (foreground or background) (null
not permitted).
See Also: CategoryPlot
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.
Parameters: index the renderer index. marker the marker. layer the layer.
See Also: CategoryPlot
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.
Parameters: index the renderer index. marker the marker. layer the layer. notify notify listeners?
Since: 1.0.10
See Also: CategoryPlot
Parameters: g2 the graphics device. plotArea the plot area.
Returns: The space required for the axes.
Parameters: g2 the graphics device. plotArea the plot area. space a carrier for the result (null
permitted).
Returns: The required space.
Parameters: g2 the graphics device. plotArea the plot area. space a carrier for the result (null
permitted).
Returns: The required space.
See Also: clearRangeMarkers
Parameters: index the renderer index.
See Also: CategoryPlot
See Also: clearDomainMarkers
Parameters: index the renderer index.
See Also: CategoryPlot
Returns: A clone.
Throws: CloneNotSupportedException if the cloning is not supported.
The range axis bounds will be recalculated if necessary.
Parameters: event information about the event (not used here).
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.
Parameters: 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
).
Parameters: g2 the graphics device. dataArea the data area.
Parameters: g2 the graphics device. plotArea the plot area. dataArea the data area. plotState collects information about the plot (null
permitted).
Returns: A map containing the axis states.
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.
Parameters: g2 the graphics device. area the area within which the plot should be drawn.
Parameters: 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.
Since: 1.0.11
Parameters: g2 the graphics device. dataArea the area inside the axes.
See Also: CategoryPlot
Parameters: g2 the graphics device. dataArea the data area. index the renderer index. layer the layer (foreground or background).
See Also: CategoryPlot
Parameters: 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.
Since: 1.0.5
Parameters: g2 the graphics device. dataArea the area inside the axes. ticks the ticks.
See Also: CategoryPlot
Parameters: 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).
Parameters: g2 the graphics device. dataArea the data area. index the renderer index. layer the layer (foreground or background).
See Also: CategoryPlot
Parameters: g2 the graphics device. area the data area.
Since: 1.0.13
Parameters: obj the object to test against (null
permitted).
Returns: A boolean.
Returns: The anchor value.
See Also: CategoryPlot
Returns: The list of annotations (never null
).
See Also: addAnnotation clearAnnotations
Returns: The axis offset (never null
).
See Also: setAxisOffset
Returns: A list of the categories in the plot's primary dataset.
See Also: getCategoriesForAxis
Parameters: axis the axis (null
not permitted)
Returns: The categories.
Since: 1.0.3
SortOrder.ASCENDING
.
Returns: The column rendering order (never null
See Also: setColumnRenderingOrder
Returns: The dataset index.
Since: 1.0.11
null
, this method returns
null
.
Parameters: axis the axis.
Returns: The data range.
Returns: The primary dataset (possibly null
).
See Also: setDataset
Parameters: index the dataset index.
Returns: The dataset (possibly null
).
See Also: CategoryPlot
Returns: The number of datasets.
Since: 1.0.2
Returns: The order (never null
).
See Also: setDatasetRenderingOrder
null
, then the method will return the parent plot's
domain axis (if there is a parent plot).
Returns: The domain axis (null
permitted).
See Also: setDomainAxis
Parameters: index the axis index.
Returns: The axis (null
possible).
See Also: CategoryPlot
Returns: The axis count.
Returns: The edge (never null
).
Parameters: index the axis index.
Returns: The edge (never null
).
Parameters: index the dataset index.
Returns: The domain axis.
See Also: CategoryPlot
-1
if the axis
is not assigned to the plot.
Parameters: axis the axis (null
not permitted).
Returns: The axis index.
Since: 1.0.3
See Also: CategoryPlot
Returns: The location (never null
).
See Also: getRangeAxisLocation
Parameters: index the axis index.
Returns: The location.
See Also: CategoryPlot
Returns: The column key.
Since: 1.0.11
Returns: The paint (never null
).
Since: 1.0.11
Returns: The row key.
Since: 1.0.11
Returns: The stroke (never null
).
Since: 1.0.11
Returns: The paint (never null
).
See Also: setDomainGridlinePaint
Returns: The gridline position (never null
).
See Also: setDomainGridlinePosition
Returns: The stroke (never null
).
See Also: setDomainGridlineStroke
Parameters: layer the layer (foreground or background).
Returns: The list of domain markers.
Parameters: index the renderer index. layer the layer.
Returns: A collection of markers (possibly null
).
Returns: A boolean.
See Also: CategoryPlot
Returns: The fixed domain axis space (possibly null
).
See Also: setFixedDomainAxisSpace
Returns: The legend items (possibly null
).
See Also: setFixedLegendItems
Returns: The fixed range axis space (possibly null
).
See Also: setFixedRangeAxisSpace
-1
if the
renderer is not assigned to this plot.
Parameters: renderer the renderer (null
permitted).
Returns: The renderer index.
Returns: The legend items.
Returns: The orientation of the plot (never null
).
See Also: setOrientation
Returns: The type.
Returns: The range axis (possibly null
).
Parameters: index the axis index.
Returns: The axis (null
possible).
Returns: The axis count.
Returns: The edge (never null
).
Parameters: index the axis index.
Returns: The edge.
Parameters: index the dataset index.
Returns: The range axis.
See Also: CategoryPlot
-1
if the axis
is not assigned to the plot.
Parameters: axis the axis (null
not permitted).
Returns: The axis index.
Since: 1.0.7
See Also: CategoryPlot
Returns: The location (never null
).
Parameters: index the axis index.
Returns: The location.
See Also: CategoryPlot
Returns: The paint (never null
).
See Also: setRangeCrosshairPaint isRangeCrosshairVisible getRangeCrosshairStroke
Stroke
) used to draw the crosshair
(if visible).
Returns: The crosshair stroke (never null
).
See Also: setRangeCrosshairStroke isRangeCrosshairVisible getRangeCrosshairPaint
Returns: The value.
See Also: CategoryPlot
Returns: The paint (never null
).
See Also: setRangeGridlinePaint
Returns: The stroke (never null
).
See Also: setRangeGridlineStroke
Parameters: layer the layer (foreground or background).
Returns: The list of range markers.
See Also: CategoryPlot
Parameters: index the renderer index. layer the layer.
Returns: A collection of markers (possibly null
).
Returns: The paint (never null
).
Since: 1.0.13
Returns: The stroke (never null
).
Since: 1.0.13
Returns: The paint (never null
).
Since: 1.0.13
Returns: The stroke (never null
).
Since: 1.0.13
Returns: The renderer.
See Also: setRenderer
Parameters: index the renderer index.
Returns: The renderer (possibly null
).
See Also: CategoryPlot
Returns: The number of renderer slots.
Since: 1.0.11
null
.
Parameters: dataset the dataset (null
permitted).
Returns: The renderer (possibly null
).
SortOrder.ASCENDING
.
Returns: The order (never null
).
See Also: setRowRenderingOrder
Returns: The weight.
See Also: CategoryPlot
Parameters: 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.
-1
if the
dataset does not belong to the plot.
Parameters: dataset the dataset (null
not permitted).
Returns: The index.
Since: 1.0.11
Returns: A boolean.
Since: 1.0.11
See Also: CategoryPlot
Returns: The true
or false
.
See Also: CategoryPlot
false
always, because the plot cannot be panned
along the domain axis/axes.
Returns: A boolean.
Since: 1.0.13
false
to indicate that the domain axes are not
zoomable.
Returns: A boolean.
See Also: isRangeZoomable
Returns: The flag.
See Also: CategoryPlot
Returns: The flag.
See Also: CategoryPlot
Returns: The flag.
See Also: CategoryPlot
true
if the range axis minor grid is visible, and
false otherwise.
Returns: A boolean.
Since: 1.0.13
true
if panning is enabled for the range axes,
and false
otherwise.
Returns: A boolean.
Since: 1.0.13
Returns: A boolean.
Since: 1.0.13
true
to indicate that the range axes are zoomable.
Returns: A boolean.
See Also: isDomainZoomable
Parameters: index the dataset index (zero-based). axisIndices the axis indices (null
permitted).
Since: 1.0.12
Parameters: index the dataset index (zero-based). axisIndex the axis index (zero-based).
See Also: CategoryPlot
Parameters: index the dataset index (zero-based). axisIndices the axis indices (null
permitted).
Since: 1.0.12
Parameters: index the dataset index (zero-based). axisIndex the axis index (zero-based).
See Also: CategoryPlot
Parameters: 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.
Since: 1.0.13
Parameters: 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.
Since: 1.0.13
Parameters: annotation the annotation (null
not permitted).
Returns: A boolean (indicates whether or not the annotation was removed).
See Also: addAnnotation
Parameters: annotation the annotation (null
not permitted). notify notify listeners?
Returns: A boolean (indicates whether or not the annotation was removed).
Since: 1.0.10
Parameters: marker the marker.
Returns: A boolean indicating whether or not the marker was actually removed.
Since: 1.0.7
Parameters: marker the marker (null
not permitted). layer the layer (foreground or background).
Returns: A boolean indicating whether or not the marker was actually removed.
Since: 1.0.7
Parameters: index the dataset/renderer index. marker the marker. layer the layer (foreground or background).
Returns: A boolean indicating whether or not the marker was actually removed.
Since: 1.0.7
Parameters: index the dataset/renderer index. marker the marker. layer the layer (foreground or background). notify notify listeners?
Returns: A boolean indicating whether or not the marker was actually removed.
Since: 1.0.10
Parameters: marker the marker.
Returns: A boolean indicating whether or not the marker was actually removed.
Since: 1.0.7
See Also: addRangeMarker
Parameters: marker the marker (null
not permitted). layer the layer (foreground or background).
Returns: A boolean indicating whether or not the marker was actually removed.
Since: 1.0.7
See Also: CategoryPlot
Parameters: index the dataset/renderer index. marker the marker. layer the layer (foreground or background).
Returns: A boolean indicating whether or not the marker was actually removed.
Since: 1.0.7
See Also: CategoryPlot
Parameters: index the dataset/renderer index. marker the marker. layer the layer (foreground or background). notify notify listeners.
Returns: A boolean indicating whether or not the marker was actually removed.
Since: 1.0.10
See Also: CategoryPlot
Parameters: 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).
Returns: A boolean that indicates whether or not real data was found.
Since: 1.0.11
Parameters: event the event.
Parameters: value the anchor value.
See Also: getAnchorValue
Parameters: value the value. notify notify listeners?
See Also: getAnchorValue
Parameters: offset the offset (null
not permitted).
See Also: getAxisOffset
Parameters: order the order (null
not permitted).
See Also: getColumnRenderingOrder setRowRenderingOrder
Parameters: index the index.
Since: 1.0.11
Parameters: index the index. notify notify listeners?
Since: 1.0.11
Parameters: dataset the dataset (null
permitted).
See Also: getDataset
Parameters: index the dataset index. dataset the dataset (null
permitted).
See Also: CategoryPlot
Parameters: order the rendering order (null
not permitted).
See Also: getDatasetRenderingOrder
Parameters: axes the axes (null
not permitted).
See Also: (ValueAxis[])
Parameters: axis the axis (null
permitted).
See Also: getDomainAxis
Parameters: index the axis index. axis the axis (null
permitted).
See Also: CategoryPlot
Parameters: index the axis index. axis the axis (null
permitted). notify notify listeners?
Parameters: location the axis location (null
not permitted).
See Also: getDomainAxisLocation CategoryPlot
Parameters: location the axis location (null
not permitted). notify a flag that controls whether listeners are notified.
Parameters: index the axis index. location the location.
See Also: CategoryPlot CategoryPlot
Parameters: index the axis index. location the location. notify notify listeners?
Since: 1.0.5
See Also: CategoryPlot CategoryPlot
Parameters: key the key.
Since: 1.0.11
Parameters: key the key. notify notify listeners?
Since: 1.0.11
Parameters: paint the paint (null
not permitted).
Since: 1.0.11
See Also: getDomainCrosshairPaint
Parameters: key the key.
Since: 1.0.11
Parameters: key the key. notify notify listeners?
Since: 1.0.11
Parameters: stroke the stroke (null
not permitted).
Since: 1.0.11
See Also: getDomainCrosshairStroke
Parameters: flag the new flag value.
Since: 1.0.11
See Also: isDomainCrosshairVisible CategoryPlot
Parameters: paint the paint (null
not permitted).
See Also: getDomainGridlinePaint
Parameters: position the position (null
not permitted).
See Also: getDomainGridlinePosition
If the flag value changes, a PlotChangeEvent is sent to all registered listeners.
Parameters: visible the new value of the flag.
See Also: isDomainGridlinesVisible
Parameters: stroke the stroke (null
not permitted).
See Also: getDomainGridlineStroke
Parameters: draw a boolean.
See Also: getDrawSharedDomainAxis
Parameters: space the space (null
permitted).
See Also: getFixedDomainAxisSpace
Parameters: space the space (null
permitted). notify notify listeners?
Since: 1.0.7
null
if you prefer the legend items to be created
automatically.
Parameters: items the legend items (null
permitted).
See Also: getFixedLegendItems
Parameters: space the space (null
permitted).
See Also: getFixedRangeAxisSpace
Parameters: space the space (null
permitted). notify notify listeners?
Since: 1.0.7
Parameters: orientation the orientation (null
not permitted).
See Also: getOrientation
Parameters: axes the axes (null
not permitted).
See Also: (CategoryAxis[])
Parameters: axis the axis (null
permitted).
Parameters: index the axis index. axis the axis.
Parameters: index the axis index. axis the axis. notify notify listeners?
Parameters: location the location (null
not permitted).
See Also: CategoryPlot setDomainAxisLocation
Parameters: location the location (null
not permitted). notify notify listeners?
See Also: CategoryPlot
Parameters: index the axis index. location the location.
See Also: CategoryPlot CategoryPlot
Parameters: index the axis index. location the location. notify notify listeners?
See Also: CategoryPlot CategoryPlot
Parameters: flag the flag.
See Also: isRangeCrosshairLockedOnData
Parameters: paint the paint (null
not permitted).
See Also: getRangeCrosshairPaint
Stroke
) used to draw the range
crosshair (if visible), and sends a PlotChangeEvent to all
registered listeners.
Parameters: stroke the new crosshair stroke (null
not
permitted).
See Also: getRangeCrosshairStroke
Parameters: value the new value.
See Also: getRangeCrosshairValue
Parameters: value the new value. notify a flag that controls whether or not listeners are notified.
See Also: getRangeCrosshairValue
Parameters: flag the new value of the flag.
See Also: isRangeCrosshairVisible
Parameters: paint the paint (null
not permitted).
See Also: getRangeGridlinePaint
Parameters: visible the new value of the flag.
See Also: isRangeGridlinesVisible
Parameters: stroke the stroke (null
not permitted).
See Also: getRangeGridlineStroke
Parameters: paint the paint (null
not permitted).
Since: 1.0.13
If the flag value is changed, a PlotChangeEvent is sent to all registered listeners.
Parameters: visible the new value of the flag.
Since: 1.0.13
Parameters: stroke the stroke (null
not permitted).
Since: 1.0.13
Parameters: pannable the new flag value.
Since: 1.0.13
Parameters: paint the paint (null
not permitted).
Since: 1.0.13
Parameters: stroke the stroke (null
not permitted).
Since: 1.0.13
Parameters: visible the flag.
Since: 1.0.13
Parameters: renderer the renderer (null
permitted.
See Also: getRenderer
You can set the renderer to null
, but this is not
recommended because:
Parameters: renderer the renderer (null
permitted). notify notify listeners?
See Also: getRenderer
Parameters: index the index. renderer the renderer (null
permitted).
See Also: CategoryPlot CategoryPlot
Parameters: index the index. renderer the renderer (null
permitted). notify notify listeners?
See Also: CategoryPlot
Parameters: renderers the renderers.
Parameters: order the order (null
not permitted).
See Also: getRowRenderingOrder setColumnRenderingOrder
Parameters: weight the weight.
See Also: getWeight
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).
Parameters: percent the zoom amount.
CategoryPlot
doesn't
support zooming on the domain.
Parameters: factor the zoom factor. state the plot state. source the source point (in Java2D space) for the zoom.
CategoryPlot
doesn't
support zooming on the domain.
Parameters: lowerPercent the lower bound. upperPercent the upper bound. state the plot state. source the source point (in Java2D space) for the zoom.
CategoryPlot
doesn't
support zooming on the domain.
Parameters: factor the zoom factor. info the plot rendering info. source the source point (in Java2D space). useAnchor use source point as zoom anchor?
Since: 1.0.7
Parameters: factor the zoom factor. state the plot state. source the source point (in Java2D space) for the zoom.
Parameters: 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.
Since: 1.0.7
Parameters: lowerPercent the lower bound. upperPercent the upper bound. state the plot state. source the source point (in Java2D space) for the zoom.