public class CategoryPlot extends Plot implements ValueAxisPlot, Pannable, Zoomable, AnnotationChangeListener, RendererChangeListener, Cloneable, org.jfree.util.PublicCloneable, Serializable
CategoryDataset
and
renders each data item using a CategoryItemRenderer
.Modifier and Type | Field and Description |
---|---|
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.
|
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_LEGEND_ITEM_BOX, DEFAULT_LEGEND_ITEM_CIRCLE, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO
Constructor and Description |
---|
CategoryPlot()
Default constructor.
|
CategoryPlot(CategoryDataset dataset,
CategoryAxis domainAxis,
ValueAxis rangeAxis,
CategoryItemRenderer renderer)
Creates a new plot.
|
Modifier and Type | Method and Description |
---|---|
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,
org.jfree.ui.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,
org.jfree.ui.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,
org.jfree.ui.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(int index,
Marker marker,
org.jfree.ui.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,
org.jfree.ui.Layer layer,
boolean notify)
Adds a marker for display by a particular renderer and 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,
org.jfree.ui.Layer layer)
Adds a marker for display against the range axis and sends a
PlotChangeEvent to all registered listeners. |
void |
annotationChanged(AnnotationChangeEvent event)
Receives notification of a change to an
Annotation added to
this plot. |
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).
|
void |
drawBackground(Graphics2D g2,
Rectangle2D area)
Draws the plot background (the background color and/or image).
|
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.
|
org.jfree.ui.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.
|
org.jfree.util.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 with the given index, or
null if there is
no dataset. |
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.
|
org.jfree.ui.RectangleEdge |
getDomainAxisEdge()
Returns the domain axis edge.
|
org.jfree.ui.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(int index,
org.jfree.ui.Layer layer)
Returns a collection of domain markers for a particular renderer and
layer.
|
Collection |
getDomainMarkers(org.jfree.ui.Layer layer)
Returns the list of domain markers (read only) for the specified 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.
|
org.jfree.ui.RectangleEdge |
getRangeAxisEdge()
Returns the edge where the primary range axis is located.
|
org.jfree.ui.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(int index,
org.jfree.ui.Layer layer)
Returns a collection of range markers for a particular renderer and
layer.
|
Collection |
getRangeMarkers(org.jfree.ui.Layer layer)
Returns the list of range markers (read only) for the specified 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.
|
org.jfree.util.SortOrder |
getRowRenderingOrder()
Returns the order in which the rows should be rendered.
|
ShadowGenerator |
getShadowGenerator()
Returns the shadow generator for the plot, if any.
|
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 otherwise. |
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(int index,
Marker marker,
org.jfree.ui.Layer layer)
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners. |
boolean |
removeDomainMarker(int index,
Marker marker,
org.jfree.ui.Layer layer,
boolean notify)
Removes a marker for a specific dataset/renderer 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,
org.jfree.ui.Layer layer)
Removes a marker for the domain axis in the specified layer and sends a
PlotChangeEvent to all registered listeners. |
boolean |
removeRangeMarker(int index,
Marker marker,
org.jfree.ui.Layer layer)
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners. |
boolean |
removeRangeMarker(int index,
Marker marker,
org.jfree.ui.Layer layer,
boolean notify)
Removes a marker for a specific dataset/renderer and 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,
org.jfree.ui.Layer layer)
Removes a marker for the range axis in the specified layer 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(org.jfree.ui.RectangleInsets offset)
Sets the axis offsets (gap between the data area and the axes) and
sends a
PlotChangeEvent to all registered listeners. |
void |
setColumnRenderingOrder(org.jfree.util.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 and sends a change notification to all
registered listeners.
|
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 |
setDomainGridlineStroke(Stroke stroke)
Sets the stroke used to draw grid-lines against the domain axis 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 |
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(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 |
setRangeAxis(ValueAxis axis)
Sets the range axis for the plot and 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 |
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 |
setRangeGridlinesVisible(boolean visible)
Sets the flag that controls whether or not grid-lines are drawn against
the range axis.
|
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 |
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 |
setRangeMinorGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the range axis minor grid
lines are visible.
|
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 change event 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 change event to all registered
listeners.
|
void |
setRenderer(int index,
CategoryItemRenderer renderer)
Sets the renderer to use for the dataset with the specified index and
sends a change event to all registered listeners.
|
void |
setRenderer(int index,
CategoryItemRenderer renderer,
boolean notify)
Sets the renderer to use for the dataset with the specified index and,
if requested, sends a change event to all registered listeners.
|
void |
setRenderers(CategoryItemRenderer[] renderers)
Sets the renderers for this plot and sends a
PlotChangeEvent
to all registered listeners. |
void |
setRowRenderingOrder(org.jfree.util.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 |
setShadowGenerator(ShadowGenerator generator)
Sets the shadow generator for the plot 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 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 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 lowerPercent,
double upperPercent,
PlotRenderingInfo state,
Point2D source)
Zooms in on the range axes.
|
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.
|
addChangeListener, axisChanged, drawBackgroundImage, drawOutline, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRootPlot, isNotify, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setDrawingSupplier, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setNotify, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent
public static final boolean DEFAULT_DOMAIN_GRIDLINES_VISIBLE
public static final boolean DEFAULT_RANGE_GRIDLINES_VISIBLE
public static final Stroke DEFAULT_GRIDLINE_STROKE
public static final Paint DEFAULT_GRIDLINE_PAINT
public static final Font DEFAULT_VALUE_LABEL_FONT
public static final boolean DEFAULT_CROSSHAIR_VISIBLE
public static final Stroke DEFAULT_CROSSHAIR_STROKE
public static final Paint DEFAULT_CROSSHAIR_PAINT
public CategoryPlot()
public CategoryPlot(CategoryDataset dataset, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryItemRenderer renderer)
dataset
- the dataset (null
permitted).domainAxis
- the domain axis (null
permitted).rangeAxis
- the range axis (null
permitted).renderer
- the item renderer (null
permitted).public String getPlotType()
getPlotType
in class Plot
public PlotOrientation getOrientation()
getOrientation
in interface Pannable
getOrientation
in interface Zoomable
null
).setOrientation(PlotOrientation)
public void setOrientation(PlotOrientation orientation)
PlotChangeEvent
to
all registered listeners.orientation
- the orientation (null
not permitted).getOrientation()
public org.jfree.ui.RectangleInsets getAxisOffset()
null
).setAxisOffset(RectangleInsets)
public void setAxisOffset(org.jfree.ui.RectangleInsets offset)
PlotChangeEvent
to all registered listeners.offset
- the offset (null
not permitted).getAxisOffset()
public CategoryAxis getDomainAxis()
null
, then the method will return the parent plot's
domain axis (if there is a parent plot).null
permitted).setDomainAxis(CategoryAxis)
public CategoryAxis getDomainAxis(int index)
index
- the axis index.null
possible).setDomainAxis(int, CategoryAxis)
public void setDomainAxis(CategoryAxis axis)
PlotChangeEvent
to
all registered listeners.axis
- the axis (null
permitted).getDomainAxis()
public void setDomainAxis(int index, CategoryAxis axis)
PlotChangeEvent
to all
registered listeners.index
- the axis index.axis
- the axis (null
permitted).getDomainAxis(int)
public void setDomainAxis(int index, CategoryAxis axis, boolean notify)
PlotChangeEvent
to
all registered listeners.index
- the axis index.axis
- the axis (null
permitted).notify
- notify listeners?public void setDomainAxes(CategoryAxis[] axes)
PlotChangeEvent
to all registered listeners.axes
- the axes (null
not permitted).setRangeAxes(ValueAxis[])
public int getDomainAxisIndex(CategoryAxis axis)
-1
if the axis
is not assigned to the plot.axis
- the axis (null
not permitted).getDomainAxis(int)
,
getRangeAxisIndex(ValueAxis)
public AxisLocation getDomainAxisLocation()
null
).getRangeAxisLocation()
public AxisLocation getDomainAxisLocation(int index)
index
- the axis index.setDomainAxisLocation(int, AxisLocation)
public void setDomainAxisLocation(AxisLocation location)
PlotChangeEvent
to all registered listeners.location
- the axis location (null
not permitted).getDomainAxisLocation()
,
setDomainAxisLocation(int, AxisLocation)
public void setDomainAxisLocation(AxisLocation location, boolean notify)
PlotChangeEvent
to all registered listeners.location
- the axis location (null
not permitted).notify
- a flag that controls whether listeners are notified.public void setDomainAxisLocation(int index, AxisLocation location)
PlotChangeEvent
to all registered listeners.index
- the axis index.location
- the location.getDomainAxisLocation(int)
,
setRangeAxisLocation(int, AxisLocation)
public void setDomainAxisLocation(int index, AxisLocation location, boolean notify)
PlotChangeEvent
to all registered listeners.index
- the axis index.location
- the location.notify
- notify listeners?getDomainAxisLocation(int)
,
setRangeAxisLocation(int, AxisLocation, boolean)
public org.jfree.ui.RectangleEdge getDomainAxisEdge()
null
).public org.jfree.ui.RectangleEdge getDomainAxisEdge(int index)
index
- the axis index.null
).public int getDomainAxisCount()
public void clearDomainAxes()
PlotChangeEvent
to all registered listeners.public void configureDomainAxes()
public ValueAxis getRangeAxis()
null
).public ValueAxis getRangeAxis(int index)
index
- the axis index.null
possible).public void setRangeAxis(ValueAxis axis)
PlotChangeEvent
to
all registered listeners.axis
- the axis (null
permitted).public void setRangeAxis(int index, ValueAxis axis)
PlotChangeEvent
to all registered
listeners.index
- the axis index.axis
- the axis.public void setRangeAxis(int index, ValueAxis axis, boolean notify)
PlotChangeEvent
to
all registered listeners.index
- the axis index.axis
- the axis.notify
- notify listeners?public void setRangeAxes(ValueAxis[] axes)
PlotChangeEvent
to all registered listeners.axes
- the axes (null
not permitted).setDomainAxes(CategoryAxis[])
public int getRangeAxisIndex(ValueAxis axis)
-1
if the axis
is not assigned to the plot.axis
- the axis (null
not permitted).getRangeAxis(int)
,
getDomainAxisIndex(CategoryAxis)
public AxisLocation getRangeAxisLocation()
null
).public AxisLocation getRangeAxisLocation(int index)
index
- the axis index.setRangeAxisLocation(int, AxisLocation)
public void setRangeAxisLocation(AxisLocation location)
PlotChangeEvent
to all registered listeners.location
- the location (null
not permitted).setRangeAxisLocation(AxisLocation, boolean)
,
setDomainAxisLocation(AxisLocation)
public void setRangeAxisLocation(AxisLocation location, boolean notify)
PlotChangeEvent
to all registered listeners.location
- the location (null
not permitted).notify
- notify listeners?setDomainAxisLocation(AxisLocation, boolean)
public void setRangeAxisLocation(int index, AxisLocation location)
PlotChangeEvent
to all registered listeners.index
- the axis index.location
- the location.getRangeAxisLocation(int)
,
setRangeAxisLocation(int, AxisLocation, boolean)
public void setRangeAxisLocation(int index, AxisLocation location, boolean notify)
PlotChangeEvent
to all registered listeners.index
- the axis index.location
- the location.notify
- notify listeners?getRangeAxisLocation(int)
,
setDomainAxisLocation(int, AxisLocation, boolean)
public org.jfree.ui.RectangleEdge getRangeAxisEdge()
null
).public org.jfree.ui.RectangleEdge getRangeAxisEdge(int index)
index
- the axis index.public int getRangeAxisCount()
public void clearRangeAxes()
PlotChangeEvent
to all registered listeners.public void configureRangeAxes()
public CategoryDataset getDataset()
null
).setDataset(CategoryDataset)
public CategoryDataset getDataset(int index)
null
if there is
no dataset.index
- the dataset index (must be >= 0).null
).setDataset(int, CategoryDataset)
public void setDataset(CategoryDataset dataset)
datasetChanged(DatasetChangeEvent)
method, which adjusts the
axis ranges if necessary and sends a PlotChangeEvent
to all
registered listeners.dataset
- the dataset (null
permitted).getDataset()
public void setDataset(int index, CategoryDataset dataset)
index
- the dataset index (must be >= 0).dataset
- the dataset (null
permitted).getDataset(int)
public int getDatasetCount()
public int indexOf(CategoryDataset dataset)
-1
if the
dataset does not belong to the plot.dataset
- the dataset (null
not permitted).public void mapDatasetToDomainAxis(int index, int axisIndex)
index
- the dataset index (zero-based).axisIndex
- the axis index (zero-based).getDomainAxisForDataset(int)
public void mapDatasetToDomainAxes(int index, List axisIndices)
index
- the dataset index (zero-based).axisIndices
- the axis indices (null
permitted).public CategoryAxis getDomainAxisForDataset(int index)
mapDatasetToDomainAxis(int, int)
method.index
- the dataset index (must be >= 0).mapDatasetToDomainAxis(int, int)
public void mapDatasetToRangeAxis(int index, int axisIndex)
index
- the dataset index (zero-based).axisIndex
- the axis index (zero-based).getRangeAxisForDataset(int)
public void mapDatasetToRangeAxes(int index, List axisIndices)
index
- the dataset index (zero-based).axisIndices
- the axis indices (null
permitted).public ValueAxis getRangeAxisForDataset(int index)
mapDatasetToRangeAxis(int, int)
method.index
- the dataset index (must be >= 0).mapDatasetToRangeAxis(int, int)
public int getRendererCount()
public CategoryItemRenderer getRenderer()
setRenderer(CategoryItemRenderer)
public CategoryItemRenderer getRenderer(int index)
index
- the renderer index.null
).setRenderer(int, CategoryItemRenderer)
public void setRenderer(CategoryItemRenderer renderer)
renderer
- the renderer (null
permitted.getRenderer()
public void setRenderer(CategoryItemRenderer renderer, boolean notify)
You can set the renderer to null
, but this is not
recommended because:
renderer
- the renderer (null
permitted).notify
- notify listeners?getRenderer()
public void setRenderer(int index, CategoryItemRenderer renderer)
index
- the index.renderer
- the renderer (null
permitted).getRenderer(int)
,
setRenderer(int, CategoryItemRenderer, boolean)
public void setRenderer(int index, CategoryItemRenderer renderer, boolean notify)
index
- the index.renderer
- the renderer (null
permitted).notify
- notify listeners?getRenderer(int)
public void setRenderers(CategoryItemRenderer[] renderers)
PlotChangeEvent
to all registered listeners.renderers
- the renderers.public CategoryItemRenderer getRendererForDataset(CategoryDataset dataset)
null
.dataset
- the dataset (null
permitted).null
).public int getIndexOf(CategoryItemRenderer renderer)
-1
if the
renderer is not assigned to this plot.renderer
- the renderer (null
permitted).public DatasetRenderingOrder getDatasetRenderingOrder()
null
).setDatasetRenderingOrder(DatasetRenderingOrder)
public void setDatasetRenderingOrder(DatasetRenderingOrder order)
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).getDatasetRenderingOrder()
public org.jfree.util.SortOrder getColumnRenderingOrder()
SortOrder.ASCENDING
.null
).setColumnRenderingOrder(SortOrder)
public void setColumnRenderingOrder(org.jfree.util.SortOrder order)
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).getColumnRenderingOrder()
,
setRowRenderingOrder(SortOrder)
public org.jfree.util.SortOrder getRowRenderingOrder()
SortOrder.ASCENDING
.null
).setRowRenderingOrder(SortOrder)
public void setRowRenderingOrder(org.jfree.util.SortOrder order)
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).getRowRenderingOrder()
,
setColumnRenderingOrder(SortOrder)
public boolean isDomainGridlinesVisible()
true
or false
.setDomainGridlinesVisible(boolean)
public void setDomainGridlinesVisible(boolean visible)
If the flag value changes, a PlotChangeEvent
is sent to all
registered listeners.
visible
- the new value of the flag.isDomainGridlinesVisible()
public CategoryAnchor getDomainGridlinePosition()
null
).setDomainGridlinePosition(CategoryAnchor)
public void setDomainGridlinePosition(CategoryAnchor position)
PlotChangeEvent
to all registered listeners.position
- the position (null
not permitted).getDomainGridlinePosition()
public Stroke getDomainGridlineStroke()
null
).setDomainGridlineStroke(Stroke)
public void setDomainGridlineStroke(Stroke stroke)
PlotChangeEvent
to all registered listeners.stroke
- the stroke (null
not permitted).getDomainGridlineStroke()
public Paint getDomainGridlinePaint()
null
).setDomainGridlinePaint(Paint)
public void setDomainGridlinePaint(Paint paint)
PlotChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getDomainGridlinePaint()
public boolean isRangeZeroBaselineVisible()
setRangeZeroBaselineVisible(boolean)
public void setRangeZeroBaselineVisible(boolean visible)
PlotChangeEvent
to
all registered listeners.visible
- the flag.isRangeZeroBaselineVisible()
public Stroke getRangeZeroBaselineStroke()
null
).setRangeZeroBaselineStroke(Stroke)
public void setRangeZeroBaselineStroke(Stroke stroke)
PlotChangeEvent
to all registered listeners.stroke
- the stroke (null
not permitted).getRangeZeroBaselineStroke()
public Paint getRangeZeroBaselinePaint()
null
).setRangeZeroBaselinePaint(Paint)
public void setRangeZeroBaselinePaint(Paint paint)
PlotChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getRangeZeroBaselinePaint()
public boolean isRangeGridlinesVisible()
setRangeGridlinesVisible(boolean)
public void setRangeGridlinesVisible(boolean visible)
PlotChangeEvent
is
sent to all registered listeners.visible
- the new value of the flag.isRangeGridlinesVisible()
public Stroke getRangeGridlineStroke()
null
).setRangeGridlineStroke(Stroke)
public void setRangeGridlineStroke(Stroke stroke)
PlotChangeEvent
to all registered listeners.stroke
- the stroke (null
not permitted).getRangeGridlineStroke()
public Paint getRangeGridlinePaint()
null
).setRangeGridlinePaint(Paint)
public void setRangeGridlinePaint(Paint paint)
PlotChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getRangeGridlinePaint()
public boolean isRangeMinorGridlinesVisible()
true
if the range axis minor grid is visible, and
false
otherwise.setRangeMinorGridlinesVisible(boolean)
public void setRangeMinorGridlinesVisible(boolean visible)
If the flag value is changed, a PlotChangeEvent
is sent to all
registered listeners.
visible
- the new value of the flag.isRangeMinorGridlinesVisible()
public Stroke getRangeMinorGridlineStroke()
null
).setRangeMinorGridlineStroke(Stroke)
public void setRangeMinorGridlineStroke(Stroke stroke)
PlotChangeEvent
to all registered listeners.stroke
- the stroke (null
not permitted).getRangeMinorGridlineStroke()
public Paint getRangeMinorGridlinePaint()
null
).setRangeMinorGridlinePaint(Paint)
public void setRangeMinorGridlinePaint(Paint paint)
PlotChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getRangeMinorGridlinePaint()
public LegendItemCollection getFixedLegendItems()
null
).setFixedLegendItems(LegendItemCollection)
public void setFixedLegendItems(LegendItemCollection items)
null
if you prefer the legend items to be created
automatically.items
- the legend items (null
permitted).getFixedLegendItems()
public LegendItemCollection getLegendItems()
getLegendItems
in interface LegendItemSource
getLegendItems
in class Plot
public void handleClick(int x, int y, PlotRenderingInfo info)
handleClick
in class Plot
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.public void zoom(double percent)
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).
public void annotationChanged(AnnotationChangeEvent event)
Annotation
added to
this plot.annotationChanged
in interface AnnotationChangeListener
annotationChanged
in class Plot
event
- information about the event (not used here).public void datasetChanged(DatasetChangeEvent event)
The range axis bounds will be recalculated if necessary.
datasetChanged
in interface DatasetChangeListener
datasetChanged
in class Plot
event
- information about the event (not used here).public void rendererChanged(RendererChangeEvent event)
rendererChanged
in interface RendererChangeListener
event
- the event.public void addDomainMarker(CategoryMarker marker)
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).removeDomainMarker(Marker)
public void addDomainMarker(CategoryMarker marker, org.jfree.ui.Layer layer)
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).removeDomainMarker(Marker, Layer)
public void addDomainMarker(int index, CategoryMarker marker, org.jfree.ui.Layer layer)
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).removeDomainMarker(int, Marker, Layer)
public void addDomainMarker(int index, CategoryMarker marker, org.jfree.ui.Layer layer, boolean notify)
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?removeDomainMarker(int, Marker, Layer, boolean)
public void clearDomainMarkers()
PlotChangeEvent
to all registered listeners.clearRangeMarkers()
public Collection getDomainMarkers(org.jfree.ui.Layer layer)
layer
- the layer (foreground or background).public Collection getDomainMarkers(int index, org.jfree.ui.Layer layer)
index
- the renderer index.layer
- the layer.null
).public void clearDomainMarkers(int index)
index
- the renderer index.clearRangeMarkers(int)
public boolean removeDomainMarker(Marker marker)
PlotChangeEvent
to all registered listeners.marker
- the marker.public boolean removeDomainMarker(Marker marker, org.jfree.ui.Layer layer)
PlotChangeEvent
to all registered listeners.marker
- the marker (null
not permitted).layer
- the layer (foreground or background).public boolean removeDomainMarker(int index, Marker marker, org.jfree.ui.Layer layer)
PlotChangeEvent
to all registered listeners.index
- the dataset/renderer index.marker
- the marker.layer
- the layer (foreground or background).public boolean removeDomainMarker(int index, Marker marker, org.jfree.ui.Layer layer, boolean notify)
PlotChangeEvent
to all registered listeners.index
- the dataset/renderer index.marker
- the marker.layer
- the layer (foreground or background).notify
- notify listeners?public void addRangeMarker(Marker marker)
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).removeRangeMarker(Marker)
public void addRangeMarker(Marker marker, org.jfree.ui.Layer layer)
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).removeRangeMarker(Marker, Layer)
public void addRangeMarker(int index, Marker marker, org.jfree.ui.Layer layer)
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.removeRangeMarker(int, Marker, Layer)
public void addRangeMarker(int index, Marker marker, org.jfree.ui.Layer layer, boolean notify)
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?removeRangeMarker(int, Marker, Layer, boolean)
public void clearRangeMarkers()
PlotChangeEvent
to all registered listeners.clearDomainMarkers()
public Collection getRangeMarkers(org.jfree.ui.Layer layer)
layer
- the layer (foreground or background).getRangeMarkers(int, Layer)
public Collection getRangeMarkers(int index, org.jfree.ui.Layer layer)
index
- the renderer index.layer
- the layer.null
).public void clearRangeMarkers(int index)
index
- the renderer index.clearDomainMarkers(int)
public boolean removeRangeMarker(Marker marker)
PlotChangeEvent
to all registered listeners.marker
- the marker.addRangeMarker(Marker)
public boolean removeRangeMarker(Marker marker, org.jfree.ui.Layer layer)
PlotChangeEvent
to all registered listeners.marker
- the marker (null
not permitted).layer
- the layer (foreground or background).addRangeMarker(Marker, Layer)
public boolean removeRangeMarker(int index, Marker marker, org.jfree.ui.Layer layer)
PlotChangeEvent
to all registered listeners.index
- the dataset/renderer index.marker
- the marker.layer
- the layer (foreground or background).addRangeMarker(int, Marker, Layer)
public boolean removeRangeMarker(int index, Marker marker, org.jfree.ui.Layer layer, boolean notify)
PlotChangeEvent
to all registered listeners.index
- the dataset/renderer index.marker
- the marker.layer
- the layer (foreground or background).notify
- notify listeners.addRangeMarker(int, Marker, Layer, boolean)
public boolean isDomainCrosshairVisible()
setDomainCrosshairVisible(boolean)
public void setDomainCrosshairVisible(boolean flag)
PlotChangeEvent
to all
registered listeners.flag
- the new flag value.isDomainCrosshairVisible()
,
setRangeCrosshairVisible(boolean)
public Comparable getDomainCrosshairRowKey()
public void setDomainCrosshairRowKey(Comparable key)
key
- the key.public void setDomainCrosshairRowKey(Comparable key, boolean notify)
key
- the key.notify
- notify listeners?public Comparable getDomainCrosshairColumnKey()
public void setDomainCrosshairColumnKey(Comparable key)
PlotChangeEvent
to all registered listeners.key
- the key.public void setDomainCrosshairColumnKey(Comparable key, boolean notify)
PlotChangeEvent
to all registered listeners.key
- the key.notify
- notify listeners?public int getCrosshairDatasetIndex()
public void setCrosshairDatasetIndex(int index)
PlotChangeEvent
to all registered listeners.index
- the index.public void setCrosshairDatasetIndex(int index, boolean notify)
PlotChangeEvent
to all registered listeners.index
- the index.notify
- notify listeners?public Paint getDomainCrosshairPaint()
null
).setDomainCrosshairPaint(Paint)
,
getDomainCrosshairStroke()
public void setDomainCrosshairPaint(Paint paint)
paint
- the paint (null
not permitted).getDomainCrosshairPaint()
public Stroke getDomainCrosshairStroke()
null
).setDomainCrosshairStroke(Stroke)
,
getDomainCrosshairPaint()
public void setDomainCrosshairStroke(Stroke stroke)
PlotChangeEvent
to all registered listeners.stroke
- the stroke (null
not permitted).getDomainCrosshairStroke()
public boolean isRangeCrosshairVisible()
setRangeCrosshairVisible(boolean)
public void setRangeCrosshairVisible(boolean flag)
flag
- the new value of the flag.isRangeCrosshairVisible()
public boolean isRangeCrosshairLockedOnData()
setRangeCrosshairLockedOnData(boolean)
public void setRangeCrosshairLockedOnData(boolean flag)
PlotChangeEvent
to all registered listeners.flag
- the flag.isRangeCrosshairLockedOnData()
public double getRangeCrosshairValue()
setRangeCrosshairValue(double)
public void setRangeCrosshairValue(double value)
PlotChangeEvent
to all registered listeners.value
- the new value.getRangeCrosshairValue()
public void setRangeCrosshairValue(double value, boolean notify)
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.getRangeCrosshairValue()
public Stroke getRangeCrosshairStroke()
Stroke
) used to draw the crosshair
(if visible).null
).setRangeCrosshairStroke(Stroke)
,
isRangeCrosshairVisible()
,
getRangeCrosshairPaint()
public void setRangeCrosshairStroke(Stroke stroke)
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).getRangeCrosshairStroke()
public Paint getRangeCrosshairPaint()
null
).setRangeCrosshairPaint(Paint)
,
isRangeCrosshairVisible()
,
getRangeCrosshairStroke()
public void setRangeCrosshairPaint(Paint paint)
PlotChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getRangeCrosshairPaint()
public List getAnnotations()
null
).addAnnotation(CategoryAnnotation)
,
clearAnnotations()
public void addAnnotation(CategoryAnnotation annotation)
PlotChangeEvent
to all
registered listeners.annotation
- the annotation (null
not permitted).removeAnnotation(CategoryAnnotation)
public void addAnnotation(CategoryAnnotation annotation, boolean notify)
PlotChangeEvent
to all registered listeners.annotation
- the annotation (null
not permitted).notify
- notify listeners?public boolean removeAnnotation(CategoryAnnotation annotation)
PlotChangeEvent
to all registered listeners.annotation
- the annotation (null
not permitted).addAnnotation(CategoryAnnotation)
public boolean removeAnnotation(CategoryAnnotation annotation, boolean notify)
PlotChangeEvent
to all registered listeners.annotation
- the annotation (null
not permitted).notify
- notify listeners?public void clearAnnotations()
PlotChangeEvent
to all
registered listeners.public ShadowGenerator getShadowGenerator()
null
).public void setShadowGenerator(ShadowGenerator generator)
PlotChangeEvent
to all registered listeners.generator
- the generator (null
permitted).public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo state)
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.
draw
in class Plot
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
).public void drawBackground(Graphics2D g2, Rectangle2D area)
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.
drawBackground
in class Plot
g2
- the graphics device.area
- the area within which the plot should be drawn.public boolean render(Graphics2D g2, Rectangle2D dataArea, int index, PlotRenderingInfo info, CategoryCrosshairState crosshairState)
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).public Range getDataRange(ValueAxis axis)
null
, this method returns
null
.getDataRange
in interface ValueAxisPlot
axis
- the axis.public int getWeight()
setWeight(int)
public void setWeight(int weight)
PlotChangeEvent
to all
registered listeners.weight
- the weight.getWeight()
public AxisSpace getFixedDomainAxisSpace()
null
).setFixedDomainAxisSpace(AxisSpace)
public void setFixedDomainAxisSpace(AxisSpace space)
PlotChangeEvent
to
all registered listeners.space
- the space (null
permitted).getFixedDomainAxisSpace()
public void setFixedDomainAxisSpace(AxisSpace space, boolean notify)
PlotChangeEvent
to
all registered listeners.space
- the space (null
permitted).notify
- notify listeners?getFixedDomainAxisSpace()
public AxisSpace getFixedRangeAxisSpace()
null
).setFixedRangeAxisSpace(AxisSpace)
public void setFixedRangeAxisSpace(AxisSpace space)
PlotChangeEvent
to
all registered listeners.space
- the space (null
permitted).getFixedRangeAxisSpace()
public void setFixedRangeAxisSpace(AxisSpace space, boolean notify)
PlotChangeEvent
to
all registered listeners.space
- the space (null
permitted).notify
- notify listeners?getFixedRangeAxisSpace()
public List getCategories()
getCategoriesForAxis(CategoryAxis)
public List getCategoriesForAxis(CategoryAxis axis)
axis
- the axis (null
not permitted)public boolean getDrawSharedDomainAxis()
setDrawSharedDomainAxis(boolean)
public void setDrawSharedDomainAxis(boolean draw)
draw
- a boolean.getDrawSharedDomainAxis()
public boolean isDomainPannable()
false
always, because the plot cannot be panned
along the domain axis/axes.isDomainPannable
in interface Pannable
isRangePannable()
public boolean isRangePannable()
true
if panning is enabled for the range axes,
and false
otherwise.isRangePannable
in interface Pannable
setRangePannable(boolean)
,
isDomainPannable()
public void setRangePannable(boolean pannable)
pannable
- the new flag value.isRangePannable()
public void panDomainAxes(double percent, PlotRenderingInfo info, Point2D source)
panDomainAxes
in interface Pannable
percent
- the distance to pan (as a percentage of the axis length).info
- the plot infosource
- the source point where the pan action started.public void panRangeAxes(double percent, PlotRenderingInfo info, Point2D source)
panRangeAxes
in interface Pannable
percent
- the distance to pan (as a percentage of the axis length).info
- the plot infosource
- the source point where the pan action started.public boolean isDomainZoomable()
false
to indicate that the domain axes are not
zoomable.isDomainZoomable
in interface Zoomable
isRangeZoomable()
public boolean isRangeZoomable()
true
to indicate that the range axes are zoomable.isRangeZoomable
in interface Zoomable
isDomainZoomable()
public void zoomDomainAxes(double factor, PlotRenderingInfo state, Point2D source)
CategoryPlot
doesn't
support zooming on the domain.zoomDomainAxes
in interface Zoomable
factor
- the zoom factor.state
- the plot state.source
- the source point (in Java2D space) for the zoom.Zoomable.zoomRangeAxes(double, PlotRenderingInfo, Point2D)
public void zoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source)
CategoryPlot
doesn't
support zooming on the domain.zoomDomainAxes
in interface Zoomable
lowerPercent
- the lower bound.upperPercent
- the upper bound.state
- the plot state.source
- the source point (in Java2D space) for the zoom.Zoomable.zoomRangeAxes(double, double, PlotRenderingInfo, Point2D)
public void zoomDomainAxes(double factor, PlotRenderingInfo info, Point2D source, boolean useAnchor)
CategoryPlot
doesn't
support zooming on the domain.zoomDomainAxes
in interface Zoomable
factor
- the zoom factor.info
- the plot rendering info.source
- the source point (in Java2D space).useAnchor
- use source point as zoom anchor?zoomRangeAxes(double, PlotRenderingInfo, Point2D, boolean)
public void zoomRangeAxes(double factor, PlotRenderingInfo state, Point2D source)
zoomRangeAxes
in interface Zoomable
factor
- the zoom factor.state
- the plot state.source
- the source point (in Java2D space) for the zoom.Zoomable.zoomDomainAxes(double, PlotRenderingInfo, Point2D)
public void zoomRangeAxes(double factor, PlotRenderingInfo info, Point2D source, boolean useAnchor)
zoomRangeAxes
in interface Zoomable
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.zoomDomainAxes(double, PlotRenderingInfo, Point2D, boolean)
public void zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source)
zoomRangeAxes
in interface Zoomable
lowerPercent
- the lower bound.upperPercent
- the upper bound.state
- the plot state.source
- the source point (in Java2D space) for the zoom.Zoomable.zoomDomainAxes(double, double, PlotRenderingInfo, Point2D)
public double getAnchorValue()
setAnchorValue(double)
public void setAnchorValue(double value)
PlotChangeEvent
to all
registered listeners.value
- the anchor value.getAnchorValue()
public void setAnchorValue(double value, boolean notify)
PlotChangeEvent
to all registered listeners.value
- the value.notify
- notify listeners?getAnchorValue()
public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class Plot
CloneNotSupportedException
- if the cloning is not supported.Jas4pp 1.5 © Java Analysis Studio for Particle Physics