public class MyXYPlot
extends org.jfree.chart.plot.XYPlot
implements org.jfree.chart.plot.ValueAxisPlot, org.jfree.chart.plot.Zoomable, org.jfree.chart.event.RendererChangeListener, java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
XYDataset
interface.
XYPlot
makes use of an XYItemRenderer
to draw each point
on the plot. By using different renderers, various chart types can be
produced.
The ChartFactory
class contains static methods for
creating pre-configured charts.
Modifier and Type | Field and Description |
---|---|
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 java.awt.Paint |
DEFAULT_GRIDLINE_PAINT
The default grid line paint.
|
static java.awt.Stroke |
DEFAULT_GRIDLINE_STROKE
The default grid line stroke.
|
protected static java.util.ResourceBundle |
localizationResources
The resourceBundle for the localization.
|
Constructor and Description |
---|
MyXYPlot()
Default constructor.
|
MyXYPlot(org.jfree.data.xy.XYDataset dataset,
org.jfree.chart.axis.ValueAxis domainAxis,
org.jfree.chart.axis.ValueAxis rangeAxis,
org.jfree.chart.renderer.xy.XYItemRenderer renderer)
Creates a new plot.
|
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(org.jfree.chart.annotations.XYAnnotation annotation)
Adds an annotation to the plot and sends a
PlotChangeEvent to all
registered listeners. |
void |
addDomainMarker(int index,
org.jfree.chart.plot.Marker marker,
org.jfree.ui.Layer layer)
Adds a marker for a renderer and sends a
PlotChangeEvent to
all registered listeners. |
void |
addDomainMarker(org.jfree.chart.plot.Marker marker)
Adds a marker for the domain axis and sends a
PlotChangeEvent
to all registered listeners. |
void |
addDomainMarker(org.jfree.chart.plot.Marker marker,
org.jfree.ui.Layer layer)
Adds a marker for the domain axis in the specified layer and sends a
PlotChangeEvent to all registered listeners. |
void |
addRangeMarker(int index,
org.jfree.chart.plot.Marker marker,
org.jfree.ui.Layer layer)
Adds a marker for a renderer and sends a
PlotChangeEvent to
all registered listeners. |
void |
addRangeMarker(org.jfree.chart.plot.Marker marker)
Adds a marker for the range axis and sends a
PlotChangeEvent to
all registered listeners. |
void |
addRangeMarker(org.jfree.chart.plot.Marker marker,
org.jfree.ui.Layer layer)
Adds a marker for the range axis in the specified layer and sends a
PlotChangeEvent to all registered listeners. |
protected org.jfree.chart.axis.AxisSpace |
calculateAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea)
Calculates the space required for all the axes in the plot.
|
protected org.jfree.chart.axis.AxisSpace |
calculateDomainAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
org.jfree.chart.axis.AxisSpace space)
Calculates the space required for the domain axis/axes.
|
protected org.jfree.chart.axis.AxisSpace |
calculateRangeAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
org.jfree.chart.axis.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 |
clearDatasets()
Clear the data sets
|
void |
clearDomainAxes()
Clears the domain axes from the plot and sends a
PlotChangeEvent
to all registered listeners. |
void |
clearDomainMarkers()
Clears all the (foreground and background) domain markers and sends a
PlotChangeEvent to all registered listeners. |
void |
clearDomainMarkers(int index)
Clears the (foreground and background) domain markers for a particular
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 and sends a
PlotChangeEvent to all
registered listeners. |
void |
clearRangeMarkers(int index)
Clears the (foreground and background) range markers for a particular
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(org.jfree.data.general.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,
org.jfree.chart.plot.PlotState parentState,
org.jfree.chart.plot.PlotRenderingInfo info)
Draws the plot within the specified area on a graphics device.
|
void |
drawAnnotations(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
org.jfree.chart.plot.PlotRenderingInfo info)
Draws the annotations for the plot.
|
protected java.util.Map |
drawAxes(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
org.jfree.chart.plot.PlotRenderingInfo plotState)
A utility method for drawing the axes.
|
void |
drawBackground(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
Draws the background for the plot.
|
protected void |
drawDomainGridlines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
java.util.List ticks)
Draws the 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.
|
void |
drawDomainTickBands(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
java.util.List ticks)
Draws the domain tick bands, if any.
|
protected void |
drawHorizontalLine(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
double value,
java.awt.Stroke stroke,
java.awt.Paint paint)
Utility method for drawing a horizontal line across the data area of the
plot.
|
protected void |
drawQuadrants(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
Draws the quadrants.
|
protected void |
drawRangeGridlines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area,
java.util.List ticks)
Draws the gridlines for the plot's primary range axis, if they are
visible.
|
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 a renderer and layer.
|
void |
drawRangeTickBands(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
java.util.List ticks)
Draws the range tick bands, if any.
|
protected void |
drawVerticalLine(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
double value,
java.awt.Stroke stroke,
java.awt.Paint paint)
Utility method for drawing a vertical line on the data area of the plot.
|
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 this plot for equality with another object.
|
org.jfree.ui.RectangleInsets |
getAxisOffset()
Returns the axis offset.
|
org.jfree.data.Range |
getDataRange(org.jfree.chart.axis.ValueAxis axis)
Returns the range for the specified axis.
|
org.jfree.data.xy.XYDataset |
getDataset()
Returns the primary dataset for the plot.
|
org.jfree.data.xy.XYDataset |
getDataset(int index)
Returns a dataset.
|
int |
getDatasetCount()
Returns the number of datasets.
|
org.jfree.chart.plot.DatasetRenderingOrder |
getDatasetRenderingOrder()
Returns the dataset rendering order.
|
org.jfree.chart.axis.ValueAxis |
getDomainAxis()
Returns the domain axis for the plot.
|
org.jfree.chart.axis.ValueAxis |
getDomainAxis(int index)
Returns a domain axis.
|
int |
getDomainAxisCount()
Returns the number of domain axes.
|
org.jfree.ui.RectangleEdge |
getDomainAxisEdge()
Returns the edge for the primary domain axis (taking into account the
plot's orientation.
|
org.jfree.ui.RectangleEdge |
getDomainAxisEdge(int index)
Returns the edge for a domain axis.
|
org.jfree.chart.axis.ValueAxis |
getDomainAxisForDataset(int index)
Returns the domain axis for a dataset.
|
int |
getDomainAxisIndex(org.jfree.chart.axis.ValueAxis axis)
Returns the index of the given domain axis.
|
org.jfree.chart.axis.AxisLocation |
getDomainAxisLocation()
Returns the location of the primary domain axis.
|
org.jfree.chart.axis.AxisLocation |
getDomainAxisLocation(int index)
Returns the location for a domain axis.
|
java.awt.Paint |
getDomainCrosshairPaint()
Returns the domain crosshair color.
|
java.awt.Stroke |
getDomainCrosshairStroke()
Returns the
Stroke used to draw the crosshair (if visible). |
double |
getDomainCrosshairValue()
Returns the domain crosshair value.
|
java.awt.Paint |
getDomainGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the domain
axis.
|
java.awt.Stroke |
getDomainGridlineStroke()
Returns the stroke for the grid-lines (if any) plotted 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.
|
java.awt.Paint |
getDomainTickBandPaint()
Returns the paint used for the domain tick bands.
|
org.jfree.chart.axis.AxisSpace |
getFixedDomainAxisSpace()
Returns the fixed domain axis space.
|
org.jfree.chart.LegendItemCollection |
getFixedLegendItems()
Returns the fixed legend items, if any.
|
org.jfree.chart.axis.AxisSpace |
getFixedRangeAxisSpace()
Returns the fixed range axis space.
|
int |
getIndexOf(org.jfree.chart.renderer.xy.XYItemRenderer renderer)
Returns the index of the specified renderer, or
-1 if the
renderer is not assigned to this plot. |
org.jfree.chart.LegendItemCollection |
getLegendItems()
Returns the legend items for the plot.
|
org.jfree.chart.plot.PlotOrientation |
getOrientation()
Returns the orientation of the plot.
|
java.lang.String |
getPlotType()
Returns the plot type as a string.
|
java.awt.geom.Point2D |
getQuadrantOrigin()
Returns the origin for the quadrants that can be displayed on the plot.
|
java.awt.Paint |
getQuadrantPaint(int index)
Returns the paint used for the specified quadrant.
|
org.jfree.chart.axis.ValueAxis |
getRangeAxis()
Returns the range axis for the plot.
|
org.jfree.chart.axis.ValueAxis |
getRangeAxis(int index)
Returns a range axis.
|
int |
getRangeAxisCount()
Returns the number of range axes.
|
org.jfree.ui.RectangleEdge |
getRangeAxisEdge()
Returns the edge for the primary range axis.
|
org.jfree.ui.RectangleEdge |
getRangeAxisEdge(int index)
Returns the edge for a range axis.
|
org.jfree.chart.axis.ValueAxis |
getRangeAxisForDataset(int index)
Returns the range axis for a dataset.
|
int |
getRangeAxisIndex(org.jfree.chart.axis.ValueAxis axis)
Returns the index of the given range axis.
|
org.jfree.chart.axis.AxisLocation |
getRangeAxisLocation()
Returns the location of the primary range axis.
|
org.jfree.chart.axis.AxisLocation |
getRangeAxisLocation(int index)
Returns the location for a range axis.
|
java.awt.Paint |
getRangeCrosshairPaint()
Returns the range crosshair color.
|
java.awt.Stroke |
getRangeCrosshairStroke()
Returns the Stroke used to draw the crosshair (if visible).
|
double |
getRangeCrosshairValue()
Returns the range crosshair value.
|
java.awt.Paint |
getRangeGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the range
axis.
|
java.awt.Stroke |
getRangeGridlineStroke()
Returns the stroke for the grid lines (if any) plotted 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 |
getRangeTickBandPaint()
Returns the paint used for the range tick bands.
|
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.
|
org.jfree.chart.renderer.xy.XYItemRenderer |
getRenderer()
Returns the renderer for the primary dataset.
|
org.jfree.chart.renderer.xy.XYItemRenderer |
getRenderer(int index)
Returns the renderer for a dataset, or
null . |
org.jfree.chart.renderer.xy.XYItemRenderer |
getRendererForDataset(org.jfree.data.xy.XYDataset dataset)
Returns the renderer for the specified dataset.
|
int |
getSeriesCount()
Returns the number of series in the primary dataset for this plot.
|
org.jfree.chart.plot.SeriesRenderingOrder |
getSeriesRenderingOrder()
Returns the series rendering order.
|
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,
org.jfree.chart.plot.PlotRenderingInfo info)
Handles a 'click' on the plot by updating the anchor values...
|
int |
indexOf(org.jfree.data.xy.XYDataset dataset)
Returns the index of the specified dataset, or
-1 if the
dataset does not belong to the plot. |
boolean |
isDomainCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on"
to actual data values.
|
boolean |
isDomainCrosshairVisible()
Returns a flag indicating whether or not the domain crosshair is visible.
|
boolean |
isDomainGridlinesVisible()
Returns
true if the domain gridlines are visible, and
false |
boolean |
isDomainZoomable()
Returns
true |
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
true if the range axis grid is visible, and
false |
boolean |
isRangeZeroBaselineVisible()
Returns a flag that controls whether or not a zero baseline is
displayed for the range axis.
|
boolean |
isRangeZoomable()
Returns
true |
void |
mapDatasetToDomainAxis(int index,
int axisIndex)
Maps a dataset to a particular domain axis.
|
void |
mapDatasetToRangeAxis(int index,
int axisIndex)
Maps a dataset to a particular range axis.
|
boolean |
removeAnnotation(org.jfree.chart.annotations.XYAnnotation annotation)
Removes an annotation from the plot and sends a
PlotChangeEvent
to all registered listeners. |
boolean |
render(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
int index,
org.jfree.chart.plot.PlotRenderingInfo info,
org.jfree.chart.plot.CrosshairState crosshairState)
Draws a representation of the data within the dataArea region, using the
current renderer.
|
void |
rendererChanged(org.jfree.chart.event.RendererChangeEvent event)
Receives notification of a renderer change event.
|
void |
setAxisOffset(org.jfree.ui.RectangleInsets offset)
Sets the axis offsets (gap between the data area and the axes).
|
void |
setDataset(int index,
org.jfree.data.xy.XYDataset dataset)
Sets a dataset for the plot.
|
void |
setDataset(org.jfree.data.xy.XYDataset dataset)
Sets the primary dataset for the plot, replacing the existing dataset if
there is one.
|
void |
setDatasetRenderingOrder(org.jfree.chart.plot.DatasetRenderingOrder order)
Sets the rendering order and sends a
PlotChangeEvent to all
registered listeners. |
void |
setDomainAxes(org.jfree.chart.axis.ValueAxis[] axes)
Sets the domain axes for this plot and sends a
PlotChangeEvent
to all registered listeners. |
void |
setDomainAxis(int index,
org.jfree.chart.axis.ValueAxis axis)
Sets a domain axis and sends a
PlotChangeEvent to all
registered listeners. |
void |
setDomainAxis(int index,
org.jfree.chart.axis.ValueAxis axis,
boolean notify)
Sets a domain axis and, if requested, sends a
PlotChangeEvent to
all registered listeners. |
void |
setDomainAxis(org.jfree.chart.axis.ValueAxis axis)
Sets the domain axis for the plot and sends a
PlotChangeEvent
to all registered listeners. |
void |
setDomainAxisLocation(org.jfree.chart.axis.AxisLocation location)
Sets the location of the domain axis and sends a
PlotChangeEvent
to all registered listeners. |
void |
setDomainAxisLocation(org.jfree.chart.axis.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,
org.jfree.chart.axis.AxisLocation location)
Sets the location for a domain axis and sends a
PlotChangeEvent
to all registered listeners. |
void |
setDomainCrosshairLockedOnData(boolean flag)
Sets the flag indicating whether or not the domain crosshair should
"lock-on" to actual data values.
|
void |
setDomainCrosshairPaint(java.awt.Paint paint)
Sets the Paint used to color the crosshairs (if visible) and notifies
registered listeners that the axis has been modified.
|
void |
setDomainCrosshairStroke(java.awt.Stroke stroke)
Sets the Stroke used to draw the crosshairs (if visible) and notifies
registered listeners that the axis has been modified.
|
void |
setDomainCrosshairValue(double value)
Sets the domain crosshair value and sends a
PlotChangeEvent to
all registered listeners (provided that the domain crosshair is visible). |
void |
setDomainCrosshairValue(double value,
boolean notify)
Sets the domain crosshair value and, if requested, sends a
PlotChangeEvent to all registered listeners (provided that the
domain crosshair is visible). |
void |
setDomainCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the domain crosshair is visible.
|
void |
setDomainGridlinePaint(java.awt.Paint paint)
Sets the paint for the grid lines plotted against the domain axis.
|
void |
setDomainGridlineStroke(java.awt.Stroke stroke)
Sets the stroke for the grid lines plotted against the domain axis.
|
void |
setDomainGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the domain grid-lines are
visible.
|
void |
setDomainTickBandPaint(java.awt.Paint paint)
Sets the paint for the domain tick bands.
|
void |
setFixedDomainAxisSpace(org.jfree.chart.axis.AxisSpace space)
Sets the fixed domain axis space.
|
void |
setFixedLegendItems(org.jfree.chart.LegendItemCollection items)
Sets the fixed legend items for the plot.
|
void |
setFixedRangeAxisSpace(org.jfree.chart.axis.AxisSpace space)
Sets the fixed range axis space.
|
void |
setOrientation(org.jfree.chart.plot.PlotOrientation orientation)
Sets the orientation for the plot.
|
void |
setQuadrantOrigin(java.awt.geom.Point2D origin)
Sets the quadrant origin and sends a
PlotChangeEvent to all
registered listeners. |
void |
setQuadrantPaint(int index,
java.awt.Paint paint)
Sets the paint used for the specified quadrant and sends a
PlotChangeEvent to all registered listeners. |
void |
setRangeAxes(org.jfree.chart.axis.ValueAxis[] axes)
Sets the range axes for this plot and sends a
PlotChangeEvent
to all registered listeners. |
void |
setRangeAxis(int index,
org.jfree.chart.axis.ValueAxis axis)
Sets a range axis and sends a
PlotChangeEvent to all registered
listeners. |
void |
setRangeAxis(int index,
org.jfree.chart.axis.ValueAxis axis,
boolean notify)
Sets a range axis and, if requested, sends a
PlotChangeEvent to
all registered listeners. |
void |
setRangeAxis(org.jfree.chart.axis.ValueAxis axis)
Sets the range axis for the plot and sends a
PlotChangeEvent to
all registered listeners. |
void |
setRangeAxisLocation(org.jfree.chart.axis.AxisLocation location)
Sets the location of the primary range axis and sends a
PlotChangeEvent to all registered listeners. |
void |
setRangeAxisLocation(org.jfree.chart.axis.AxisLocation location,
boolean notify)
Sets the location of the primary range axis and, if requested, sends a
PlotChangeEvent to all registered listeners. |
void |
setRangeAxisLocation(int index,
org.jfree.chart.axis.AxisLocation location)
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.
|
void |
setRangeCrosshairPaint(java.awt.Paint paint)
Sets the Paint used to color the crosshairs (if visible) and notifies
registered listeners that the axis has been modified.
|
void |
setRangeCrosshairStroke(java.awt.Stroke stroke)
Sets the Stroke used to draw the crosshairs (if visible) and notifies
registered listeners that the axis has been modified.
|
void |
setRangeCrosshairValue(double value)
Sets the domain crosshair value.
|
void |
setRangeCrosshairValue(double value,
boolean notify)
Sets the range crosshair value.
|
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 for the grid lines plotted against the range axis and
sends a
PlotChangeEvent to all registered listeners. |
void |
setRangeGridlineStroke(java.awt.Stroke stroke)
Sets the stroke for the grid lines plotted against the range axis,
and sends a
PlotChangeEvent to all registered listeners. |
void |
setRangeGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the range axis grid lines
are visible.
|
void |
setRangeTickBandPaint(java.awt.Paint paint)
Sets the paint for the range tick bands.
|
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(int index,
org.jfree.chart.renderer.xy.XYItemRenderer renderer)
Sets a renderer and sends a
PlotChangeEvent is sent to all
registered listeners. |
void |
setRenderer(org.jfree.chart.renderer.xy.XYItemRenderer renderer)
Sets the renderer for the primary dataset and sends a
PlotChangeEvent to all registered listeners. |
void |
setSeriesRenderingOrder(org.jfree.chart.plot.SeriesRenderingOrder order)
Sets the series order and sends a
PlotChangeEvent to all
registered listeners. |
void |
setWeight(int weight)
Sets the weight for the plot.
|
void |
zoomDomainAxes(double lowerPercent,
double upperPercent,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source)
Zooms in on the domain axis/axes.
|
void |
zoomDomainAxes(double factor,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source)
Multiplies the range on the domain axis/axes by the specified factor.
|
void |
zoomRangeAxes(double lowerPercent,
double upperPercent,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source)
Zooms in on the range axes.
|
void |
zoomRangeAxes(double factor,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source)
Multiplies the range on the range axis/axes by the specified factor.
|
addAnnotation, addDomainMarker, addRangeMarker, annotationChanged, drawDomainCrosshair, drawRangeCrosshair, drawZeroDomainBaseline, getAnnotations, getDomainMinorGridlinePaint, getDomainMinorGridlineStroke, getDomainZeroBaselinePaint, getDomainZeroBaselineStroke, getRangeMinorGridlinePaint, getRangeMinorGridlineStroke, getRendererCount, getShadowGenerator, isDomainMinorGridlinesVisible, isDomainPannable, isDomainZeroBaselineVisible, isRangeMinorGridlinesVisible, isRangePannable, mapDatasetToDomainAxes, mapDatasetToRangeAxes, panDomainAxes, panRangeAxes, removeAnnotation, removeDomainMarker, removeDomainMarker, removeDomainMarker, removeDomainMarker, removeRangeMarker, removeRangeMarker, removeRangeMarker, removeRangeMarker, setDomainAxisLocation, setDomainMinorGridlinePaint, setDomainMinorGridlineStroke, setDomainMinorGridlinesVisible, setDomainPannable, setDomainZeroBaselinePaint, setDomainZeroBaselineStroke, setDomainZeroBaselineVisible, setFixedDomainAxisSpace, setFixedRangeAxisSpace, setRangeAxisLocation, setRangeMinorGridlinePaint, setRangeMinorGridlineStroke, setRangeMinorGridlinesVisible, setRangePannable, setRenderer, setRenderers, setShadowGenerator, zoomDomainAxes, zoomRangeAxes
addChangeListener, axisChanged, createAndAddEntity, drawBackgroundImage, drawNoDataMessage, drawOutline, fillBackground, fillBackground, fireChangeEvent, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRectX, getRectY, getRootPlot, isNotify, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setDatasetGroup, setDrawingSupplier, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setNotify, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent, zoom
public static final java.awt.Stroke DEFAULT_GRIDLINE_STROKE
public static final java.awt.Paint DEFAULT_GRIDLINE_PAINT
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
public MyXYPlot()
public MyXYPlot(org.jfree.data.xy.XYDataset dataset, org.jfree.chart.axis.ValueAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis, org.jfree.chart.renderer.xy.XYItemRenderer renderer)
dataset
- the dataset (null
permitted).domainAxis
- the domain axis (null
permitted).rangeAxis
- the range axis (null
permitted).renderer
- the renderer (null
permitted).public java.lang.String getPlotType()
getPlotType
in class org.jfree.chart.plot.XYPlot
public org.jfree.chart.plot.PlotOrientation getOrientation()
getOrientation
in interface org.jfree.chart.plot.Pannable
getOrientation
in interface org.jfree.chart.plot.Zoomable
getOrientation
in class org.jfree.chart.plot.XYPlot
public void setOrientation(org.jfree.chart.plot.PlotOrientation orientation)
setOrientation
in class org.jfree.chart.plot.XYPlot
orientation
- the orientation (null
not allowed).public org.jfree.ui.RectangleInsets getAxisOffset()
getAxisOffset
in class org.jfree.chart.plot.XYPlot
null
).public void setAxisOffset(org.jfree.ui.RectangleInsets offset)
setAxisOffset
in class org.jfree.chart.plot.XYPlot
offset
- the offset (null
not permitted).public org.jfree.chart.axis.ValueAxis getDomainAxis()
getDomainAxis
in class org.jfree.chart.plot.XYPlot
public org.jfree.chart.axis.ValueAxis getDomainAxis(int index)
getDomainAxis
in class org.jfree.chart.plot.XYPlot
index
- the axis index.null
possible).public void setDomainAxis(org.jfree.chart.axis.ValueAxis axis)
PlotChangeEvent
to all registered listeners.setDomainAxis
in class org.jfree.chart.plot.XYPlot
axis
- the new axis (null
permitted).public void setDomainAxis(int index, org.jfree.chart.axis.ValueAxis axis)
PlotChangeEvent
to all
registered listeners.setDomainAxis
in class org.jfree.chart.plot.XYPlot
index
- the axis index.axis
- the axis.public void setDomainAxis(int index, org.jfree.chart.axis.ValueAxis axis, boolean notify)
PlotChangeEvent
to
all registered listeners.setDomainAxis
in class org.jfree.chart.plot.XYPlot
index
- the axis index.axis
- the axis.notify
- notify listeners?public void setDomainAxes(org.jfree.chart.axis.ValueAxis[] axes)
PlotChangeEvent
to all registered listeners.setDomainAxes
in class org.jfree.chart.plot.XYPlot
axes
- the axes.public org.jfree.chart.axis.AxisLocation getDomainAxisLocation()
getDomainAxisLocation
in class org.jfree.chart.plot.XYPlot
null
).public void setDomainAxisLocation(org.jfree.chart.axis.AxisLocation location)
PlotChangeEvent
to all registered listeners.setDomainAxisLocation
in class org.jfree.chart.plot.XYPlot
location
- the location (null
not permitted).public void setDomainAxisLocation(org.jfree.chart.axis.AxisLocation location, boolean notify)
PlotChangeEvent
to all registered listeners.setDomainAxisLocation
in class org.jfree.chart.plot.XYPlot
location
- the location (null
not permitted).notify
- notify listeners?public org.jfree.ui.RectangleEdge getDomainAxisEdge()
getDomainAxisEdge
in class org.jfree.chart.plot.XYPlot
public int getDomainAxisCount()
getDomainAxisCount
in class org.jfree.chart.plot.XYPlot
public void clearDomainAxes()
PlotChangeEvent
to all registered listeners.clearDomainAxes
in class org.jfree.chart.plot.XYPlot
public void configureDomainAxes()
configureDomainAxes
in class org.jfree.chart.plot.XYPlot
public org.jfree.chart.axis.AxisLocation getDomainAxisLocation(int index)
getDomainAxisLocation
in class org.jfree.chart.plot.XYPlot
index
- the axis index.null
).public void setDomainAxisLocation(int index, org.jfree.chart.axis.AxisLocation location)
PlotChangeEvent
to all registered listeners.setDomainAxisLocation
in class org.jfree.chart.plot.XYPlot
index
- the axis index.location
- the location (null
permitted).public org.jfree.ui.RectangleEdge getDomainAxisEdge(int index)
getDomainAxisEdge
in class org.jfree.chart.plot.XYPlot
index
- the axis index.public org.jfree.chart.axis.ValueAxis getRangeAxis()
getRangeAxis
in class org.jfree.chart.plot.XYPlot
public void setRangeAxis(org.jfree.chart.axis.ValueAxis axis)
PlotChangeEvent
to
all registered listeners.setRangeAxis
in class org.jfree.chart.plot.XYPlot
axis
- the axis (null
permitted).public org.jfree.chart.axis.AxisLocation getRangeAxisLocation()
getRangeAxisLocation
in class org.jfree.chart.plot.XYPlot
null
).public void setRangeAxisLocation(org.jfree.chart.axis.AxisLocation location)
PlotChangeEvent
to all registered listeners.setRangeAxisLocation
in class org.jfree.chart.plot.XYPlot
location
- the location (null
not permitted).public void setRangeAxisLocation(org.jfree.chart.axis.AxisLocation location, boolean notify)
PlotChangeEvent
to all registered listeners.setRangeAxisLocation
in class org.jfree.chart.plot.XYPlot
location
- the location (null
not permitted).notify
- notify listeners?public org.jfree.ui.RectangleEdge getRangeAxisEdge()
getRangeAxisEdge
in class org.jfree.chart.plot.XYPlot
public org.jfree.chart.axis.ValueAxis getRangeAxis(int index)
getRangeAxis
in class org.jfree.chart.plot.XYPlot
index
- the axis index.null
possible).public void setRangeAxis(int index, org.jfree.chart.axis.ValueAxis axis)
PlotChangeEvent
to all registered
listeners.setRangeAxis
in class org.jfree.chart.plot.XYPlot
index
- the axis index.axis
- the axis (null
permitted).public void setRangeAxis(int index, org.jfree.chart.axis.ValueAxis axis, boolean notify)
PlotChangeEvent
to
all registered listeners.setRangeAxis
in class org.jfree.chart.plot.XYPlot
index
- the axis index.axis
- the axis (null
permitted).notify
- and notify the listenerspublic void setRangeAxes(org.jfree.chart.axis.ValueAxis[] axes)
PlotChangeEvent
to all registered listeners.setRangeAxes
in class org.jfree.chart.plot.XYPlot
axes
- the axes.public int getRangeAxisCount()
getRangeAxisCount
in class org.jfree.chart.plot.XYPlot
public void clearRangeAxes()
PlotChangeEvent
to all registered listeners.clearRangeAxes
in class org.jfree.chart.plot.XYPlot
public void configureRangeAxes()
configureRangeAxes
in class org.jfree.chart.plot.XYPlot
public org.jfree.chart.axis.AxisLocation getRangeAxisLocation(int index)
getRangeAxisLocation
in class org.jfree.chart.plot.XYPlot
index
- the axis index.null
).public void setRangeAxisLocation(int index, org.jfree.chart.axis.AxisLocation location)
PlotChangeEvent
to all registered listeners.setRangeAxisLocation
in class org.jfree.chart.plot.XYPlot
index
- the axis index.location
- the location (null
permitted).public org.jfree.ui.RectangleEdge getRangeAxisEdge(int index)
getRangeAxisEdge
in class org.jfree.chart.plot.XYPlot
index
- the axis index.public org.jfree.data.xy.XYDataset getDataset()
getDataset
in class org.jfree.chart.plot.XYPlot
null
).public org.jfree.data.xy.XYDataset getDataset(int index)
getDataset
in class org.jfree.chart.plot.XYPlot
index
- the dataset index.null
).public void setDataset(org.jfree.data.xy.XYDataset dataset)
setDataset
in class org.jfree.chart.plot.XYPlot
dataset
- the dataset (null
permitted).public void clearDatasets()
public void setDataset(int index, org.jfree.data.xy.XYDataset dataset)
setDataset
in class org.jfree.chart.plot.XYPlot
index
- the dataset index.dataset
- the dataset (null
permitted).public int getDatasetCount()
getDatasetCount
in class org.jfree.chart.plot.XYPlot
public int indexOf(org.jfree.data.xy.XYDataset dataset)
-1
if the
dataset does not belong to the plot.indexOf
in class org.jfree.chart.plot.XYPlot
dataset
- the dataset (null
not permitted).public void mapDatasetToDomainAxis(int index, int axisIndex)
mapDatasetToDomainAxis
in class org.jfree.chart.plot.XYPlot
index
- the dataset index (zero-based).axisIndex
- the axis index.public void mapDatasetToRangeAxis(int index, int axisIndex)
mapDatasetToRangeAxis
in class org.jfree.chart.plot.XYPlot
index
- the dataset index (zero-based).axisIndex
- the axis index.public org.jfree.chart.renderer.xy.XYItemRenderer getRenderer()
getRenderer
in class org.jfree.chart.plot.XYPlot
null
).public org.jfree.chart.renderer.xy.XYItemRenderer getRenderer(int index)
null
.getRenderer
in class org.jfree.chart.plot.XYPlot
index
- the renderer index.null
).public void setRenderer(org.jfree.chart.renderer.xy.XYItemRenderer renderer)
PlotChangeEvent
to all registered listeners. If the renderer
is set to null
, no data will be displayed.setRenderer
in class org.jfree.chart.plot.XYPlot
renderer
- the renderer (null
permitted).public void setRenderer(int index, org.jfree.chart.renderer.xy.XYItemRenderer renderer)
PlotChangeEvent
is sent to all
registered listeners.setRenderer
in class org.jfree.chart.plot.XYPlot
index
- the index.renderer
- the renderer.public org.jfree.chart.plot.DatasetRenderingOrder getDatasetRenderingOrder()
getDatasetRenderingOrder
in class org.jfree.chart.plot.XYPlot
null
).public void setDatasetRenderingOrder(org.jfree.chart.plot.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.setDatasetRenderingOrder
in class org.jfree.chart.plot.XYPlot
order
- the rendering order (null
not permitted).public org.jfree.chart.plot.SeriesRenderingOrder getSeriesRenderingOrder()
getSeriesRenderingOrder
in class org.jfree.chart.plot.XYPlot
null
).public void setSeriesRenderingOrder(org.jfree.chart.plot.SeriesRenderingOrder order)
PlotChangeEvent
to all
registered listeners. By default, the plot renders the primary series
last (so that the primary series appears to be on top).
You can reverse this if you want to.setSeriesRenderingOrder
in class org.jfree.chart.plot.XYPlot
order
- the rendering order (null
not permitted).public int getIndexOf(org.jfree.chart.renderer.xy.XYItemRenderer renderer)
-1
if the
renderer is not assigned to this plot.getIndexOf
in class org.jfree.chart.plot.XYPlot
renderer
- the renderer (null
permitted).public org.jfree.chart.renderer.xy.XYItemRenderer getRendererForDataset(org.jfree.data.xy.XYDataset dataset)
getRendererForDataset
in class org.jfree.chart.plot.XYPlot
dataset
- the dataset (null
permitted).null
).public int getWeight()
getWeight
in class org.jfree.chart.plot.XYPlot
public void setWeight(int weight)
setWeight
in class org.jfree.chart.plot.XYPlot
weight
- the weight.public boolean isDomainGridlinesVisible()
true
if the domain gridlines are visible, and
false otherwise.
isDomainGridlinesVisible
in class org.jfree.chart.plot.XYPlot
true
or false
.public void setDomainGridlinesVisible(boolean visible)
If the flag value is changed, a PlotChangeEvent
is sent to all
registered listeners.
setDomainGridlinesVisible
in class org.jfree.chart.plot.XYPlot
visible
- the new value of the flag.public java.awt.Stroke getDomainGridlineStroke()
getDomainGridlineStroke
in class org.jfree.chart.plot.XYPlot
public void setDomainGridlineStroke(java.awt.Stroke stroke)
If you set this to null
, no grid lines will be drawn.
setDomainGridlineStroke
in class org.jfree.chart.plot.XYPlot
stroke
- the stroke (null
permitted).public java.awt.Paint getDomainGridlinePaint()
getDomainGridlinePaint
in class org.jfree.chart.plot.XYPlot
public void setDomainGridlinePaint(java.awt.Paint paint)
If you set this to null
, no grid lines will be drawn.
setDomainGridlinePaint
in class org.jfree.chart.plot.XYPlot
paint
- the paint (null
permitted).public boolean isRangeGridlinesVisible()
true
if the range axis grid is visible, and
false otherwise.
isRangeGridlinesVisible
in class org.jfree.chart.plot.XYPlot
public void setRangeGridlinesVisible(boolean visible)
If the flag value is changed, a PlotChangeEvent
is sent to all
registered listeners.
setRangeGridlinesVisible
in class org.jfree.chart.plot.XYPlot
visible
- the new value of the flag.public java.awt.Stroke getRangeGridlineStroke()
getRangeGridlineStroke
in class org.jfree.chart.plot.XYPlot
null
).public void setRangeGridlineStroke(java.awt.Stroke stroke)
PlotChangeEvent
to all registered listeners.setRangeGridlineStroke
in class org.jfree.chart.plot.XYPlot
stroke
- the stroke (null
not permitted).public java.awt.Paint getRangeGridlinePaint()
getRangeGridlinePaint
in class org.jfree.chart.plot.XYPlot
null
).public void setRangeGridlinePaint(java.awt.Paint paint)
PlotChangeEvent
to all registered listeners.setRangeGridlinePaint
in class org.jfree.chart.plot.XYPlot
paint
- the paint (null
permitted).public boolean isRangeZeroBaselineVisible()
isRangeZeroBaselineVisible
in class org.jfree.chart.plot.XYPlot
public void setRangeZeroBaselineVisible(boolean visible)
PlotChangeEvent
to
all registered listeners.setRangeZeroBaselineVisible
in class org.jfree.chart.plot.XYPlot
visible
- the flag.public java.awt.Stroke getRangeZeroBaselineStroke()
getRangeZeroBaselineStroke
in class org.jfree.chart.plot.XYPlot
null
).public void setRangeZeroBaselineStroke(java.awt.Stroke stroke)
PlotChangeEvent
to all registered listeners.setRangeZeroBaselineStroke
in class org.jfree.chart.plot.XYPlot
stroke
- the stroke (null
not permitted).public java.awt.Paint getRangeZeroBaselinePaint()
getRangeZeroBaselinePaint
in class org.jfree.chart.plot.XYPlot
null
).public void setRangeZeroBaselinePaint(java.awt.Paint paint)
PlotChangeEvent
to all registered listeners.setRangeZeroBaselinePaint
in class org.jfree.chart.plot.XYPlot
paint
- the paint (null
permitted).public java.awt.Paint getDomainTickBandPaint()
null
, no tick bands will be drawn.getDomainTickBandPaint
in class org.jfree.chart.plot.XYPlot
null
).public void setDomainTickBandPaint(java.awt.Paint paint)
setDomainTickBandPaint
in class org.jfree.chart.plot.XYPlot
paint
- the paint (null
permitted).public java.awt.Paint getRangeTickBandPaint()
null
, no tick bands will be drawn.getRangeTickBandPaint
in class org.jfree.chart.plot.XYPlot
null
).public void setRangeTickBandPaint(java.awt.Paint paint)
setRangeTickBandPaint
in class org.jfree.chart.plot.XYPlot
paint
- the paint (null
permitted).public java.awt.geom.Point2D getQuadrantOrigin()
getQuadrantOrigin
in class org.jfree.chart.plot.XYPlot
null
).public void setQuadrantOrigin(java.awt.geom.Point2D origin)
PlotChangeEvent
to all
registered listeners.setQuadrantOrigin
in class org.jfree.chart.plot.XYPlot
origin
- the origin (null
not permitted).public java.awt.Paint getQuadrantPaint(int index)
getQuadrantPaint
in class org.jfree.chart.plot.XYPlot
index
- the quadrant index (0-3).null
).public void setQuadrantPaint(int index, java.awt.Paint paint)
PlotChangeEvent
to all registered listeners.setQuadrantPaint
in class org.jfree.chart.plot.XYPlot
index
- the quadrant index (0-3).paint
- the paint (null
permitted).public void addDomainMarker(org.jfree.chart.plot.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.
addDomainMarker
in class org.jfree.chart.plot.XYPlot
marker
- the marker (null
not permitted).public void addDomainMarker(org.jfree.chart.plot.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.
addDomainMarker
in class org.jfree.chart.plot.XYPlot
marker
- the marker (null
not permitted).layer
- the layer (foreground or background).public void clearDomainMarkers()
PlotChangeEvent
to all registered listeners.clearDomainMarkers
in class org.jfree.chart.plot.XYPlot
public void clearDomainMarkers(int index)
clearDomainMarkers
in class org.jfree.chart.plot.XYPlot
index
- the renderer index.public void addDomainMarker(int index, org.jfree.chart.plot.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 domain axis (that the renderer is mapped to), however this is entirely up to the renderer.
addDomainMarker
in class org.jfree.chart.plot.XYPlot
index
- the renderer index.marker
- the marker.layer
- the layer (foreground or background).public void addRangeMarker(org.jfree.chart.plot.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.
addRangeMarker
in class org.jfree.chart.plot.XYPlot
marker
- the marker (null
not permitted).public void addRangeMarker(org.jfree.chart.plot.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.
addRangeMarker
in class org.jfree.chart.plot.XYPlot
marker
- the marker (null
not permitted).layer
- the layer (foreground or background).public void clearRangeMarkers()
PlotChangeEvent
to all
registered listeners.clearRangeMarkers
in class org.jfree.chart.plot.XYPlot
public void addRangeMarker(int index, org.jfree.chart.plot.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.
addRangeMarker
in class org.jfree.chart.plot.XYPlot
index
- the renderer index.marker
- the marker.layer
- the layer (foreground or background).public void clearRangeMarkers(int index)
clearRangeMarkers
in class org.jfree.chart.plot.XYPlot
index
- the renderer index.public void addAnnotation(org.jfree.chart.annotations.XYAnnotation annotation)
PlotChangeEvent
to all
registered listeners.addAnnotation
in class org.jfree.chart.plot.XYPlot
annotation
- the annotation (null
not permitted).public boolean removeAnnotation(org.jfree.chart.annotations.XYAnnotation annotation)
PlotChangeEvent
to all registered listeners.removeAnnotation
in class org.jfree.chart.plot.XYPlot
annotation
- the annotation (null
not permitted).public void clearAnnotations()
PlotChangeEvent
to all
registered listeners.clearAnnotations
in class org.jfree.chart.plot.XYPlot
protected org.jfree.chart.axis.AxisSpace calculateAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea)
calculateAxisSpace
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.plotArea
- the plot area.protected org.jfree.chart.axis.AxisSpace calculateDomainAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, org.jfree.chart.axis.AxisSpace space)
calculateDomainAxisSpace
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.plotArea
- the plot area.space
- a carrier for the result (null
permitted).protected org.jfree.chart.axis.AxisSpace calculateRangeAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, org.jfree.chart.axis.AxisSpace space)
calculateRangeAxisSpace
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.plotArea
- the plot area.space
- a carrier for the result (null
permitted).public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, java.awt.geom.Point2D anchor, org.jfree.chart.plot.PlotState parentState, org.jfree.chart.plot.PlotRenderingInfo info)
draw
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.area
- the plot area (in Java2D space).anchor
- an anchor point in Java2D space (null
permitted).parentState
- the state from the parent plot, if there is one
(null
permitted).info
- collects chart drawing information (null
permitted).public void drawBackground(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area)
drawBackground
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.area
- the area.protected void drawQuadrants(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area)
drawQuadrants
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.area
- the area.public void drawDomainTickBands(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, java.util.List ticks)
drawDomainTickBands
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.dataArea
- the data area.ticks
- the ticks.public void drawRangeTickBands(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, java.util.List ticks)
drawRangeTickBands
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.dataArea
- the data area.ticks
- the ticks.protected java.util.Map drawAxes(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea, org.jfree.chart.plot.PlotRenderingInfo plotState)
drawAxes
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device (null
not permitted).plotArea
- the plot area (null
not permitted).dataArea
- the data area (null
not permitted).plotState
- collects information about the plot (null
permitted).public boolean render(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, int index, org.jfree.chart.plot.PlotRenderingInfo info, org.jfree.chart.plot.CrosshairState crosshairState)
The info
and crosshairState
arguments may be
null
.
render
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.dataArea
- the region in which the data is to be drawn.index
- the dataset index.info
- an optional object for collection dimension information.crosshairState
- collects crosshair information
(null
permitted).public org.jfree.chart.axis.ValueAxis getDomainAxisForDataset(int index)
getDomainAxisForDataset
in class org.jfree.chart.plot.XYPlot
index
- the dataset index.public org.jfree.chart.axis.ValueAxis getRangeAxisForDataset(int index)
getRangeAxisForDataset
in class org.jfree.chart.plot.XYPlot
index
- the dataset index.protected void drawDomainGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, java.util.List ticks)
drawDomainGridlines
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.dataArea
- the data area.ticks
- the ticks.protected void drawRangeGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, java.util.List ticks)
drawRangeGridlines
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.area
- the data area.ticks
- the ticks.protected void drawZeroRangeBaseline(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area)
drawZeroRangeBaseline
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.area
- the data area.public void drawAnnotations(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, org.jfree.chart.plot.PlotRenderingInfo info)
drawAnnotations
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.dataArea
- the data area.info
- the chart rendering info.protected void drawDomainMarkers(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, int index, org.jfree.ui.Layer layer)
drawDomainMarkers
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.dataArea
- the data area.index
- the renderer index.layer
- the layer (foreground or background).protected void drawRangeMarkers(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, int index, org.jfree.ui.Layer layer)
drawRangeMarkers
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.dataArea
- the data area.index
- the renderer index.layer
- the layer (foreground or background).public java.util.Collection getDomainMarkers(org.jfree.ui.Layer layer)
getDomainMarkers
in class org.jfree.chart.plot.XYPlot
layer
- the layer (foreground or background).public java.util.Collection getRangeMarkers(org.jfree.ui.Layer layer)
getRangeMarkers
in class org.jfree.chart.plot.XYPlot
layer
- the layer (foreground or background).public java.util.Collection getDomainMarkers(int index, org.jfree.ui.Layer layer)
getDomainMarkers
in class org.jfree.chart.plot.XYPlot
index
- the renderer index.layer
- the layer.null
).public java.util.Collection getRangeMarkers(int index, org.jfree.ui.Layer layer)
getRangeMarkers
in class org.jfree.chart.plot.XYPlot
index
- the renderer index.layer
- the layer.null
).protected void drawHorizontalLine(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, double value, java.awt.Stroke stroke, java.awt.Paint paint)
drawHorizontalLine
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.dataArea
- the data area.value
- the coordinate, where to draw the line.stroke
- the stroke to use.paint
- the paint to use.protected void drawVerticalLine(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, double value, java.awt.Stroke stroke, java.awt.Paint paint)
drawVerticalLine
in class org.jfree.chart.plot.XYPlot
g2
- the graphics device.dataArea
- the data area.value
- the coordinate, where to draw the line.stroke
- the stroke to use.paint
- the paint to use.public void handleClick(int x, int y, org.jfree.chart.plot.PlotRenderingInfo info)
handleClick
in class org.jfree.chart.plot.XYPlot
x
- the x-coordinate, where the click occurred, in Java2D space.y
- the y-coordinate, where the click occurred, in Java2D space.info
- object containing information about the plot dimensions.public int getDomainAxisIndex(org.jfree.chart.axis.ValueAxis axis)
getDomainAxisIndex
in class org.jfree.chart.plot.XYPlot
axis
- the axis.public int getRangeAxisIndex(org.jfree.chart.axis.ValueAxis axis)
getRangeAxisIndex
in class org.jfree.chart.plot.XYPlot
axis
- the axis.public org.jfree.data.Range getDataRange(org.jfree.chart.axis.ValueAxis axis)
getDataRange
in interface org.jfree.chart.plot.ValueAxisPlot
getDataRange
in class org.jfree.chart.plot.XYPlot
axis
- the axis.public void datasetChanged(org.jfree.data.general.DatasetChangeEvent event)
The axis ranges are updated if necessary.
datasetChanged
in interface org.jfree.data.general.DatasetChangeListener
datasetChanged
in class org.jfree.chart.plot.XYPlot
event
- information about the event (not used here).public void rendererChanged(org.jfree.chart.event.RendererChangeEvent event)
rendererChanged
in interface org.jfree.chart.event.RendererChangeListener
rendererChanged
in class org.jfree.chart.plot.XYPlot
event
- the event.public boolean isDomainCrosshairVisible()
isDomainCrosshairVisible
in class org.jfree.chart.plot.XYPlot
public void setDomainCrosshairVisible(boolean flag)
setDomainCrosshairVisible
in class org.jfree.chart.plot.XYPlot
flag
- the new value of the flag.public boolean isDomainCrosshairLockedOnData()
isDomainCrosshairLockedOnData
in class org.jfree.chart.plot.XYPlot
public void setDomainCrosshairLockedOnData(boolean flag)
setDomainCrosshairLockedOnData
in class org.jfree.chart.plot.XYPlot
flag
- the flag.public double getDomainCrosshairValue()
getDomainCrosshairValue
in class org.jfree.chart.plot.XYPlot
public void setDomainCrosshairValue(double value)
PlotChangeEvent
to
all registered listeners (provided that the domain crosshair is visible).setDomainCrosshairValue
in class org.jfree.chart.plot.XYPlot
value
- the value.public void setDomainCrosshairValue(double value, boolean notify)
PlotChangeEvent
to all registered listeners (provided that the
domain crosshair is visible).setDomainCrosshairValue
in class org.jfree.chart.plot.XYPlot
value
- the new value.notify
- notify listeners?public java.awt.Stroke getDomainCrosshairStroke()
Stroke
used to draw the crosshair (if visible).getDomainCrosshairStroke
in class org.jfree.chart.plot.XYPlot
public void setDomainCrosshairStroke(java.awt.Stroke stroke)
setDomainCrosshairStroke
in class org.jfree.chart.plot.XYPlot
stroke
- the new crosshair stroke.public java.awt.Paint getDomainCrosshairPaint()
getDomainCrosshairPaint
in class org.jfree.chart.plot.XYPlot
public void setDomainCrosshairPaint(java.awt.Paint paint)
setDomainCrosshairPaint
in class org.jfree.chart.plot.XYPlot
paint
- the new crosshair paint.public boolean isRangeCrosshairVisible()
isRangeCrosshairVisible
in class org.jfree.chart.plot.XYPlot
public void setRangeCrosshairVisible(boolean flag)
setRangeCrosshairVisible
in class org.jfree.chart.plot.XYPlot
flag
- the new value of the flag.public boolean isRangeCrosshairLockedOnData()
isRangeCrosshairLockedOnData
in class org.jfree.chart.plot.XYPlot
public void setRangeCrosshairLockedOnData(boolean flag)
setRangeCrosshairLockedOnData
in class org.jfree.chart.plot.XYPlot
flag
- the flag.public double getRangeCrosshairValue()
getRangeCrosshairValue
in class org.jfree.chart.plot.XYPlot
public void setRangeCrosshairValue(double value)
Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.
setRangeCrosshairValue
in class org.jfree.chart.plot.XYPlot
value
- the new value.public void setRangeCrosshairValue(double value, boolean notify)
Registered listeners are notified that the axis has been modified, but only if the crosshair is visible.
setRangeCrosshairValue
in class org.jfree.chart.plot.XYPlot
value
- the new value.notify
- a flag that controls whether or not listeners are
notified.public java.awt.Stroke getRangeCrosshairStroke()
getRangeCrosshairStroke
in class org.jfree.chart.plot.XYPlot
public void setRangeCrosshairStroke(java.awt.Stroke stroke)
setRangeCrosshairStroke
in class org.jfree.chart.plot.XYPlot
stroke
- the new crosshair stroke.public java.awt.Paint getRangeCrosshairPaint()
getRangeCrosshairPaint
in class org.jfree.chart.plot.XYPlot
public void setRangeCrosshairPaint(java.awt.Paint paint)
setRangeCrosshairPaint
in class org.jfree.chart.plot.XYPlot
paint
- the new crosshair paint.public org.jfree.chart.axis.AxisSpace getFixedDomainAxisSpace()
getFixedDomainAxisSpace
in class org.jfree.chart.plot.XYPlot
null
).public void setFixedDomainAxisSpace(org.jfree.chart.axis.AxisSpace space)
setFixedDomainAxisSpace
in class org.jfree.chart.plot.XYPlot
space
- the space.public org.jfree.chart.axis.AxisSpace getFixedRangeAxisSpace()
getFixedRangeAxisSpace
in class org.jfree.chart.plot.XYPlot
public void setFixedRangeAxisSpace(org.jfree.chart.axis.AxisSpace space)
setFixedRangeAxisSpace
in class org.jfree.chart.plot.XYPlot
space
- the space.public void zoomDomainAxes(double factor, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source)
zoomDomainAxes
in interface org.jfree.chart.plot.Zoomable
zoomDomainAxes
in class org.jfree.chart.plot.XYPlot
factor
- the zoom factor.info
- the plot rendering info.source
- the source point.public void zoomDomainAxes(double lowerPercent, double upperPercent, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source)
zoomDomainAxes
in interface org.jfree.chart.plot.Zoomable
zoomDomainAxes
in class org.jfree.chart.plot.XYPlot
lowerPercent
- a percentage that determines the new lower bound
for the axis (e.g. 0.20 is twenty percent).upperPercent
- a percentage that determines the new upper bound
for the axis (e.g. 0.80 is eighty percent).info
- the plot rendering info.source
- the source point.public void zoomRangeAxes(double factor, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source)
zoomRangeAxes
in interface org.jfree.chart.plot.Zoomable
zoomRangeAxes
in class org.jfree.chart.plot.XYPlot
factor
- the zoom factor.info
- the plot rendering info.source
- the source point.public void zoomRangeAxes(double lowerPercent, double upperPercent, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source)
zoomRangeAxes
in interface org.jfree.chart.plot.Zoomable
zoomRangeAxes
in class org.jfree.chart.plot.XYPlot
lowerPercent
- the lower bound.upperPercent
- the upper bound.info
- the plot rendering info.source
- the source point.public boolean isDomainZoomable()
true
isDomainZoomable
in interface org.jfree.chart.plot.Zoomable
isDomainZoomable
in class org.jfree.chart.plot.XYPlot
public boolean isRangeZoomable()
true
isRangeZoomable
in interface org.jfree.chart.plot.Zoomable
isRangeZoomable
in class org.jfree.chart.plot.XYPlot
public int getSeriesCount()
null
, the method returns 0.getSeriesCount
in class org.jfree.chart.plot.XYPlot
public org.jfree.chart.LegendItemCollection getFixedLegendItems()
getFixedLegendItems
in class org.jfree.chart.plot.XYPlot
null
).public void setFixedLegendItems(org.jfree.chart.LegendItemCollection items)
null
if you prefer the legend items to be created
automatically.setFixedLegendItems
in class org.jfree.chart.plot.XYPlot
items
- the legend items (null
permitted).public org.jfree.chart.LegendItemCollection getLegendItems()
getLegendItems
in interface org.jfree.chart.LegendItemSource
getLegendItems
in class org.jfree.chart.plot.XYPlot
public boolean equals(java.lang.Object obj)
equals
in class org.jfree.chart.plot.XYPlot
obj
- the object (null
permitted).true
or false
.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class org.jfree.chart.plot.XYPlot
java.lang.CloneNotSupportedException
- this can occur if some component of
the plot cannot be cloned.