|
Header
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jfree.chart.plot.Plot org.jfree.chart.plot.CategoryPlot
public class CategoryPlot
A general plotting class that uses data from a CategoryDataset
and
renders each data item using a CategoryItemRenderer
.
Field Summary | |
---|---|
static java.awt.Paint |
DEFAULT_CROSSHAIR_PAINT
The default crosshair paint. |
static java.awt.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 java.awt.Paint |
DEFAULT_GRIDLINE_PAINT
The default grid line paint. |
static java.awt.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 java.awt.Font |
DEFAULT_VALUE_LABEL_FONT
The default value label font. |
protected static java.util.ResourceBundle |
localizationResources
The resourceBundle for the localization. |
Fields inherited from class org.jfree.chart.plot.Plot |
---|
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 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,
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. |
protected AxisSpace |
calculateAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea)
Calculates the space required for the axes. |
protected AxisSpace |
calculateDomainAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
AxisSpace space)
Calculates the space required for the domain axis/axes. |
protected AxisSpace |
calculateRangeAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.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. |
java.lang.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(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area,
java.awt.geom.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(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea)
Draws the annotations. |
protected java.util.Map |
drawAxes(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
PlotRenderingInfo plotState)
A utility method for drawing the plot's axes. |
void |
drawBackground(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
Draws the plot background (the background color and/or image). |
protected void |
drawDomainCrosshair(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
PlotOrientation orientation,
int datasetIndex,
java.lang.Comparable rowKey,
java.lang.Comparable columnKey,
java.awt.Stroke stroke,
java.awt.Paint paint)
Draws a domain crosshair. |
protected void |
drawDomainGridlines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea)
Draws the domain gridlines for the plot, if they are visible. |
protected void |
drawDomainMarkers(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
int index,
org.jfree.ui.Layer layer)
Draws the domain markers (if any) for an axis and layer. |
protected void |
drawRangeCrosshair(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
PlotOrientation orientation,
double value,
ValueAxis axis,
java.awt.Stroke stroke,
java.awt.Paint paint)
Draws a range crosshair. |
protected void |
drawRangeGridlines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
java.util.List ticks)
Draws the range gridlines for the plot, if they are visible. |
protected void |
drawRangeLine(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
double value,
java.awt.Stroke stroke,
java.awt.Paint paint)
Utility method for drawing a line perpendicular to the range axis (used for crosshairs). |
protected void |
drawRangeMarkers(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
int index,
org.jfree.ui.Layer layer)
Draws the range markers (if any) for an axis and layer. |
protected void |
drawZeroRangeBaseline(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
Draws a base line across the chart at value zero on the range axis. |
boolean |
equals(java.lang.Object obj)
Tests the plot for equality with an arbitrary object. |
double |
getAnchorValue()
Returns the anchor value. |
java.util.List |
getAnnotations()
Returns the list of annotations. |
org.jfree.ui.RectangleInsets |
getAxisOffset()
Returns the axis offset. |
java.util.List |
getCategories()
Returns a list of the categories in the plot's primary dataset. |
java.util.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 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. |
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. |
java.lang.Comparable |
getDomainCrosshairColumnKey()
Returns the column key for the domain crosshair. |
java.awt.Paint |
getDomainCrosshairPaint()
Returns the paint used to draw the domain crosshair. |
java.lang.Comparable |
getDomainCrosshairRowKey()
Returns the row key for the domain crosshair. |
java.awt.Stroke |
getDomainCrosshairStroke()
Returns the stroke used to draw the domain crosshair. |
java.awt.Paint |
getDomainGridlinePaint()
Returns the paint used to draw grid-lines against the domain axis. |
CategoryAnchor |
getDomainGridlinePosition()
Returns the position used for the domain gridlines. |
java.awt.Stroke |
getDomainGridlineStroke()
Returns the stroke used to draw grid-lines against the domain axis. |
java.util.Collection |
getDomainMarkers(int index,
org.jfree.ui.Layer layer)
Returns a collection of domain markers for a particular renderer and layer. |
java.util.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. |
java.lang.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. |
java.awt.Paint |
getRangeCrosshairPaint()
Returns the paint used to draw the range crosshair. |
java.awt.Stroke |
getRangeCrosshairStroke()
Returns the pen-style ( Stroke ) used to draw the crosshair
(if visible). |
double |
getRangeCrosshairValue()
Returns the range crosshair value. |
java.awt.Paint |
getRangeGridlinePaint()
Returns the paint used to draw the grid-lines against the range axis. |
java.awt.Stroke |
getRangeGridlineStroke()
Returns the stroke used to draw the grid-lines against the range axis. |
java.util.Collection |
getRangeMarkers(int index,
org.jfree.ui.Layer layer)
Returns a collection of range markers for a particular renderer and layer. |
java.util.Collection |
getRangeMarkers(org.jfree.ui.Layer layer)
Returns the list of range markers (read only) for the specified layer. |
java.awt.Paint |
getRangeMinorGridlinePaint()
Returns the paint for the minor grid lines (if any) plotted against the range axis. |
java.awt.Stroke |
getRangeMinorGridlineStroke()
Returns the stroke for the minor grid lines (if any) plotted against the range axis. |
java.awt.Paint |
getRangeZeroBaselinePaint()
Returns the paint for the zero baseline (if any) plotted against the range axis. |
java.awt.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. |
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,
java.util.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,
java.util.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,
java.awt.geom.Point2D source)
Pans the domain axes by the specified percentage. |
void |
panRangeAxes(double percent,
PlotRenderingInfo info,
java.awt.geom.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(java.awt.Graphics2D g2,
java.awt.geom.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. |
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(java.lang.Comparable key)
Sets the column key for the domain crosshair and sends a PlotChangeEvent to all registered listeners. |
void |
setDomainCrosshairColumnKey(java.lang.Comparable key,
boolean notify)
Sets the column key for the domain crosshair and, if requested, sends a PlotChangeEvent to all registered listeners. |
void |
setDomainCrosshairPaint(java.awt.Paint paint)
Sets the paint used to draw the domain crosshair. |
void |
setDomainCrosshairRowKey(java.lang.Comparable key)
Sets the row key for the domain crosshair and sends a {PlotChangeEvent} to all registered listeners. |
void |
setDomainCrosshairRowKey(java.lang.Comparable key,
boolean notify)
Sets the row key for the domain crosshair and, if requested, sends a {PlotChangeEvent} to all registered listeners. |
void |
setDomainCrosshairStroke(java.awt.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(java.awt.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(java.awt.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(java.awt.Paint paint)
Sets the paint used to draw the range crosshair (if visible) and sends a PlotChangeEvent to all registered listeners. |
void |
setRangeCrosshairStroke(java.awt.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(java.awt.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(java.awt.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(java.awt.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(java.awt.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(java.awt.Paint paint)
Sets the paint for the zero baseline plotted against the range axis and sends a PlotChangeEvent to all registered listeners. |
void |
setRangeZeroBaselineStroke(java.awt.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(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 |
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,
java.awt.geom.Point2D source)
This method does nothing, because CategoryPlot doesn't
support zooming on the domain. |
void |
zoomDomainAxes(double factor,
PlotRenderingInfo state,
java.awt.geom.Point2D source)
This method does nothing, because CategoryPlot doesn't
support zooming on the domain. |
void |
zoomDomainAxes(double factor,
PlotRenderingInfo info,
java.awt.geom.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,
java.awt.geom.Point2D source)
Zooms in on the range axes. |
void |
zoomRangeAxes(double factor,
PlotRenderingInfo state,
java.awt.geom.Point2D source)
Multiplies the range on the range axis/axes by the specified factor. |
void |
zoomRangeAxes(double factor,
PlotRenderingInfo info,
java.awt.geom.Point2D source,
boolean useAnchor)
Multiplies the range on the range axis/axes by the specified factor. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEFAULT_DOMAIN_GRIDLINES_VISIBLE
public static final boolean DEFAULT_RANGE_GRIDLINES_VISIBLE
public static final java.awt.Stroke DEFAULT_GRIDLINE_STROKE
public static final java.awt.Paint DEFAULT_GRIDLINE_PAINT
public static final java.awt.Font DEFAULT_VALUE_LABEL_FONT
public static final boolean DEFAULT_CROSSHAIR_VISIBLE
public static final java.awt.Stroke DEFAULT_CROSSHAIR_STROKE
public static final java.awt.Paint DEFAULT_CROSSHAIR_PAINT
protected static java.util.ResourceBundle localizationResources
Constructor Detail |
---|
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).Method Detail |
---|
public java.lang.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)
index
- the dataset index.
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.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, java.util.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.
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, java.util.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.
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)
PlotChangeEvent
to all registered
listeners.
renderer
- the renderer (null
permitted.getRenderer()
public void setRenderer(CategoryItemRenderer renderer, boolean notify)
PlotChangeEvent
to all
registered listeners.
You can set the renderer to null
, but this is not
recommended because:
renderer
- the renderer (null
permitted).notify
- notify listeners?getRenderer()
public void setRenderer(int index, CategoryItemRenderer renderer)
PlotChangeEvent
to all registered listeners.
index
- the index.renderer
- the renderer (null
permitted).getRenderer(int)
,
setRenderer(int, CategoryItemRenderer, boolean)
public void setRenderer(int index, CategoryItemRenderer renderer, boolean notify)
PlotChangeEvent
is sent to all registered
listeners.
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
See Also: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 java.awt.Stroke getDomainGridlineStroke()
null
).setDomainGridlineStroke(Stroke)
public void setDomainGridlineStroke(java.awt.Stroke stroke)
PlotChangeEvent
to all registered listeners.
stroke
- the stroke (null
not permitted).getDomainGridlineStroke()
public java.awt.Paint getDomainGridlinePaint()
null
).setDomainGridlinePaint(Paint)
public void setDomainGridlinePaint(java.awt.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 java.awt.Stroke getRangeZeroBaselineStroke()
null
).setRangeZeroBaselineStroke(Stroke)
public void setRangeZeroBaselineStroke(java.awt.Stroke stroke)
PlotChangeEvent
to all registered listeners.
stroke
- the stroke (null
not permitted).getRangeZeroBaselineStroke()
public java.awt.Paint getRangeZeroBaselinePaint()
null
).setRangeZeroBaselinePaint(Paint)
public void setRangeZeroBaselinePaint(java.awt.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 java.awt.Stroke getRangeGridlineStroke()
null
).setRangeGridlineStroke(Stroke)
public void setRangeGridlineStroke(java.awt.Stroke stroke)
PlotChangeEvent
to all registered listeners.
stroke
- the stroke (null
not permitted).getRangeGridlineStroke()
public java.awt.Paint getRangeGridlinePaint()
null
).setRangeGridlinePaint(Paint)
public void setRangeGridlinePaint(java.awt.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.
- Returns:
- A boolean.
- Since:
- 1.0.13
- See Also:
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 java.awt.Stroke getRangeMinorGridlineStroke()
null
).setRangeMinorGridlineStroke(Stroke)
public void setRangeMinorGridlineStroke(java.awt.Stroke stroke)
PlotChangeEvent
to all registered listeners.
stroke
- the stroke (null
not permitted).getRangeMinorGridlineStroke()
public java.awt.Paint getRangeMinorGridlinePaint()
null
).setRangeMinorGridlinePaint(Paint)
public void setRangeMinorGridlinePaint(java.awt.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).
zoom
in class Plot
percent
- the zoom amount.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 java.util.Collection getDomainMarkers(org.jfree.ui.Layer layer)
layer
- the layer (foreground or background).
public java.util.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 java.util.Collection getRangeMarkers(org.jfree.ui.Layer layer)
layer
- the layer (foreground or background).
getRangeMarkers(int, Layer)
public java.util.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 java.lang.Comparable getDomainCrosshairRowKey()
public void setDomainCrosshairRowKey(java.lang.Comparable key)
key
- the key.public void setDomainCrosshairRowKey(java.lang.Comparable key, boolean notify)
key
- the key.notify
- notify listeners?public java.lang.Comparable getDomainCrosshairColumnKey()
public void setDomainCrosshairColumnKey(java.lang.Comparable key)
PlotChangeEvent
to all registered listeners.
key
- the key.public void setDomainCrosshairColumnKey(java.lang.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 java.awt.Paint getDomainCrosshairPaint()
null
).setDomainCrosshairPaint(Paint)
,
getDomainCrosshairStroke()
public void setDomainCrosshairPaint(java.awt.Paint paint)
paint
- the paint (null
not permitted).getDomainCrosshairPaint()
public java.awt.Stroke getDomainCrosshairStroke()
null
).setDomainCrosshairStroke(Stroke)
,
getDomainCrosshairPaint()
public void setDomainCrosshairStroke(java.awt.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 java.awt.Stroke getRangeCrosshairStroke()
Stroke
) used to draw the crosshair
(if visible).
null
).setRangeCrosshairStroke(Stroke)
,
isRangeCrosshairVisible()
,
getRangeCrosshairPaint()
public void setRangeCrosshairStroke(java.awt.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 java.awt.Paint getRangeCrosshairPaint()
null
).setRangeCrosshairPaint(Paint)
,
isRangeCrosshairVisible()
,
getRangeCrosshairStroke()
public void setRangeCrosshairPaint(java.awt.Paint paint)
PlotChangeEvent
to all registered listeners.
paint
- the paint (null
not permitted).getRangeCrosshairPaint()
public java.util.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.
protected AxisSpace calculateDomainAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, AxisSpace space)
g2
- the graphics device.plotArea
- the plot area.space
- a carrier for the result (null
permitted).
protected AxisSpace calculateRangeAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, AxisSpace space)
g2
- the graphics device.plotArea
- the plot area.space
- a carrier for the result (null
permitted).
protected AxisSpace calculateAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea)
g2
- the graphics device.plotArea
- the plot area.
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, java.awt.geom.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(java.awt.Graphics2D g2, java.awt.geom.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.protected java.util.Map drawAxes(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea, PlotRenderingInfo plotState)
g2
- the graphics device.plotArea
- the plot area.dataArea
- the data area.plotState
- collects information about the plot (null
permitted).
public boolean render(java.awt.Graphics2D g2, java.awt.geom.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).
protected void drawDomainGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.dataArea
- the area inside the axes.drawRangeGridlines(Graphics2D, Rectangle2D, List)
protected void drawRangeGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, java.util.List ticks)
g2
- the graphics device.dataArea
- the area inside the axes.ticks
- the ticks.drawDomainGridlines(Graphics2D, Rectangle2D)
protected void drawZeroRangeBaseline(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area)
g2
- the graphics device.area
- the data area.setRangeZeroBaselineVisible(boolean)
protected void drawAnnotations(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.dataArea
- the data area.protected void drawDomainMarkers(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, int index, org.jfree.ui.Layer layer)
g2
- the graphics device.dataArea
- the data area.index
- the renderer index.layer
- the layer (foreground or background).drawRangeMarkers(Graphics2D, Rectangle2D, int, Layer)
protected void drawRangeMarkers(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, int index, org.jfree.ui.Layer layer)
g2
- the graphics device.dataArea
- the data area.index
- the renderer index.layer
- the layer (foreground or background).drawDomainMarkers(Graphics2D, Rectangle2D, int, Layer)
protected void drawRangeLine(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, double value, java.awt.Stroke stroke, java.awt.Paint paint)
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).protected void drawDomainCrosshair(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, PlotOrientation orientation, int datasetIndex, java.lang.Comparable rowKey, java.lang.Comparable columnKey, java.awt.Stroke stroke, java.awt.Paint paint)
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.drawRangeCrosshair(Graphics2D, Rectangle2D, PlotOrientation,
double, ValueAxis, Stroke, Paint)
protected void drawRangeCrosshair(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, PlotOrientation orientation, double value, ValueAxis axis, java.awt.Stroke stroke, java.awt.Paint paint)
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.drawDomainCrosshair(Graphics2D, Rectangle2D, PlotOrientation, int,
Comparable, Comparable, Stroke, Paint)
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 java.util.List getCategories()
getCategoriesForAxis(CategoryAxis)
public java.util.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
public boolean isRangePannable()
true
if panning is enabled for the range axes,
and false
otherwise.
isRangePannable
in interface Pannable
public void setRangePannable(boolean pannable)
pannable
- the new flag value.public void panDomainAxes(double percent, PlotRenderingInfo info, java.awt.geom.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, java.awt.geom.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, java.awt.geom.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, java.awt.geom.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, java.awt.geom.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, java.awt.geom.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, java.awt.geom.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, java.awt.geom.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(java.lang.Object obj)
equals
in class Plot
obj
- the object to test against (null
permitted).
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class Plot
java.lang.CloneNotSupportedException
- if the cloning is not supported.
|
Footer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |