org.jfree.chart.plot
public class XYPlot extends Plot implements ValueAxisPlot, Zoomable, RendererChangeListener, Cloneable, PublicCloneable, Serializable
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.
Field Summary | |
---|---|
static Paint | DEFAULT_CROSSHAIR_PAINT The default crosshair paint. |
static Stroke | DEFAULT_CROSSHAIR_STROKE The default crosshair stroke. |
static boolean | DEFAULT_CROSSHAIR_VISIBLE The default crosshair visibility. |
static Paint | DEFAULT_GRIDLINE_PAINT The default grid line paint. |
static Stroke | DEFAULT_GRIDLINE_STROKE The default grid line stroke. |
protected static ResourceBundle | localizationResources The resourceBundle for the localization. |
Constructor Summary | |
---|---|
XYPlot()
Creates a new XYPlot instance with no dataset, no axes and
no renderer. | |
XYPlot(XYDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, XYItemRenderer renderer)
Creates a new plot with the specified dataset, axes and renderer. |
Method Summary | |
---|---|
void | addAnnotation(XYAnnotation annotation)
Adds an annotation to the plot and sends a PlotChangeEvent to
all registered listeners.
|
void | addDomainMarker(Marker marker)
Adds a marker for the domain axis and sends a PlotChangeEvent
to all registered listeners.
|
void | addDomainMarker(Marker marker, Layer layer)
Adds a marker for the domain axis in the specified layer and sends a
PlotChangeEvent to all registered listeners.
|
void | addDomainMarker(int index, Marker marker, Layer layer)
Adds a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners.
|
void | addRangeMarker(Marker marker)
Adds a marker for the range axis and sends a PlotChangeEvent to
all registered listeners.
|
void | addRangeMarker(Marker marker, Layer layer)
Adds a marker for the range axis in the specified layer and sends a
PlotChangeEvent to all registered listeners.
|
void | addRangeMarker(int index, Marker marker, Layer layer)
Adds a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners.
|
protected AxisSpace | calculateAxisSpace(Graphics2D g2, Rectangle2D plotArea)
Calculates the space required for all the axes in the plot.
|
protected AxisSpace | calculateDomainAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space)
Calculates the space required for the domain axis/axes.
|
protected AxisSpace | calculateRangeAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space)
Calculates the space required for the range axis/axes.
|
void | clearAnnotations()
Clears all the annotations and sends a PlotChangeEvent to all
registered listeners.
|
void | clearDomainAxes()
Clears the domain axes from the plot and sends a PlotChangeEvent
to all registered listeners.
|
void | clearDomainMarkers()
Clears all the (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.
|
Object | clone()
Returns a clone of the plot.
|
void | configureDomainAxes()
Configures the domain axes. |
void | configureRangeAxes()
Configures the range axes.
|
void | datasetChanged(DatasetChangeEvent event)
Receives notification of a change to the plot's dataset.
|
void | draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
Draws the plot within the specified area on a graphics device.
|
void | drawAnnotations(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info)
Draws the annotations for the plot.
|
protected Map | drawAxes(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, PlotRenderingInfo plotState)
A utility method for drawing the axes.
|
void | drawBackground(Graphics2D g2, Rectangle2D area)
Draws the background for the plot.
|
protected void | drawDomainCrosshair(Graphics2D g2, Rectangle2D dataArea, PlotOrientation orientation, double value, ValueAxis axis, Stroke stroke, Paint paint)
Draws a domain crosshair.
|
protected void | drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the gridlines for the plot, if they are visible.
|
protected void | drawDomainMarkers(Graphics2D g2, Rectangle2D dataArea, int index, Layer layer)
Draws the domain markers (if any) for an axis and layer. |
void | drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the domain tick bands, if any.
|
protected void | drawHorizontalLine(Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint)
Utility method for drawing a horizontal line across the data area of the
plot.
|
protected void | drawQuadrants(Graphics2D g2, Rectangle2D area)
Draws the quadrants.
|
protected void | drawRangeCrosshair(Graphics2D g2, Rectangle2D dataArea, PlotOrientation orientation, double value, ValueAxis axis, Stroke stroke, Paint paint)
Draws a range crosshair.
|
protected void | drawRangeGridlines(Graphics2D g2, Rectangle2D area, List ticks)
Draws the gridlines for the plot's primary range axis, if they are
visible.
|
protected void | drawRangeMarkers(Graphics2D g2, Rectangle2D dataArea, int index, Layer layer)
Draws the range markers (if any) for a renderer and layer. |
void | drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the range tick bands, if any.
|
protected void | drawVerticalLine(Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint)
Utility method for drawing a vertical line on the data area of the plot.
|
protected void | drawZeroDomainBaseline(Graphics2D g2, Rectangle2D area)
Draws a base line across the chart at value zero on the domain axis.
|
protected void | drawZeroRangeBaseline(Graphics2D g2, Rectangle2D area)
Draws a base line across the chart at value zero on the range axis.
|
boolean | equals(Object obj)
Tests this plot for equality with another object.
|
List | getAnnotations()
Returns the list of annotations.
|
RectangleInsets | getAxisOffset()
Returns the axis offset.
|
Range | getDataRange(ValueAxis axis)
Returns the range for the specified axis.
|
XYDataset | getDataset()
Returns the primary dataset for the plot.
|
XYDataset | getDataset(int index)
Returns a dataset.
|
int | getDatasetCount()
Returns the number of datasets.
|
DatasetRenderingOrder | getDatasetRenderingOrder()
Returns the dataset rendering order.
|
ValueAxis | getDomainAxis()
Returns the domain axis with index 0. |
ValueAxis | getDomainAxis(int index)
Returns the domain axis with the specified index, or null .
|
int | getDomainAxisCount()
Returns the number of domain axes.
|
RectangleEdge | getDomainAxisEdge()
Returns the edge for the primary domain axis (taking into account the
plot's orientation).
|
RectangleEdge | getDomainAxisEdge(int index)
Returns the edge for a domain axis.
|
ValueAxis | getDomainAxisForDataset(int index)
Returns the domain axis for a dataset.
|
int | getDomainAxisIndex(ValueAxis axis)
Returns the index of the given domain axis.
|
AxisLocation | getDomainAxisLocation()
Returns the location of the primary domain axis.
|
AxisLocation | getDomainAxisLocation(int index)
Returns the location for a domain axis. |
Paint | getDomainCrosshairPaint()
Returns the domain crosshair paint.
|
Stroke | getDomainCrosshairStroke()
Returns the Stroke used to draw the crosshair (if visible).
|
double | getDomainCrosshairValue()
Returns the domain crosshair value.
|
Paint | getDomainGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the domain
axis.
|
Stroke | getDomainGridlineStroke()
Returns the stroke for the grid-lines (if any) plotted against the
domain axis.
|
Collection | getDomainMarkers(Layer layer)
Returns the list of domain markers (read only) for the specified layer.
|
Collection | getDomainMarkers(int index, Layer layer)
Returns a collection of domain markers for a particular renderer and
layer.
|
Paint | getDomainTickBandPaint()
Returns the paint used for the domain tick bands. |
Paint | getDomainZeroBaselinePaint()
Returns the paint for the zero baseline (if any) plotted against the
domain axis.
|
Stroke | getDomainZeroBaselineStroke()
Returns the stroke used for the zero baseline against the domain axis.
|
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(XYItemRenderer renderer)
Returns the index of the specified renderer, or -1 if the
renderer is not assigned to this plot.
|
LegendItemCollection | getLegendItems()
Returns the legend items for the plot. |
PlotOrientation | getOrientation()
Returns the orientation of the plot.
|
String | getPlotType()
Returns the plot type as a string.
|
Point2D | getQuadrantOrigin()
Returns the origin for the quadrants that can be displayed on the plot.
|
Paint | getQuadrantPaint(int index)
Returns the paint used for the specified quadrant.
|
ValueAxis | getRangeAxis()
Returns the range axis for the plot. |
ValueAxis | getRangeAxis(int index)
Returns a range axis.
|
int | getRangeAxisCount()
Returns the number of range axes.
|
RectangleEdge | getRangeAxisEdge()
Returns the edge for the primary range axis.
|
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 given range axis.
|
AxisLocation | getRangeAxisLocation()
Returns the location of the primary range axis.
|
AxisLocation | getRangeAxisLocation(int index)
Returns the location for a range axis. |
Paint | getRangeCrosshairPaint()
Returns the range crosshair paint.
|
Stroke | getRangeCrosshairStroke()
Returns the stroke used to draw the crosshair (if visible).
|
double | getRangeCrosshairValue()
Returns the range crosshair value.
|
Paint | getRangeGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the range
axis.
|
Stroke | getRangeGridlineStroke()
Returns the stroke for the grid lines (if any) plotted against the
range axis.
|
Collection | getRangeMarkers(Layer layer)
Returns the list of range markers (read only) for the specified layer.
|
Collection | getRangeMarkers(int index, Layer layer)
Returns a collection of range markers for a particular renderer and
layer.
|
Paint | getRangeTickBandPaint()
Returns the paint used for the range tick bands. |
Paint | getRangeZeroBaselinePaint()
Returns the paint for the zero baseline (if any) plotted against the
range axis.
|
Stroke | getRangeZeroBaselineStroke()
Returns the stroke used for the zero baseline against the range axis.
|
XYItemRenderer | getRenderer()
Returns the renderer for the primary dataset.
|
XYItemRenderer | getRenderer(int index)
Returns the renderer for a dataset, or null .
|
XYItemRenderer | getRendererForDataset(XYDataset dataset)
Returns the renderer for the specified dataset. |
int | getSeriesCount()
Returns the number of series in the primary dataset for this 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, PlotRenderingInfo info)
Handles a 'click' on the plot by updating the anchor values.
|
int | indexOf(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 | isDomainZeroBaselineVisible()
Returns a flag that controls whether or not a zero baseline is
displayed for the domain axis.
|
boolean | isDomainZoomable()
Returns true , indicating that the domain axis/axes for this
plot are 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 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 , indicating that the range axis/axes for this
plot are zoomable.
|
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(XYAnnotation annotation)
Removes an annotation from the plot and sends a PlotChangeEvent
to all registered listeners.
|
boolean | render(Graphics2D g2, Rectangle2D dataArea, int index, PlotRenderingInfo info, CrosshairState crosshairState)
Draws a representation of the data within the dataArea region, using the
current renderer.
|
void | rendererChanged(RendererChangeEvent event)
Receives notification of a renderer change event.
|
void | setAxisOffset(RectangleInsets offset)
Sets the axis offsets (gap between the data area and the axes) and sends
a PlotChangeEvent to all registered listeners.
|
void | setDataset(XYDataset dataset)
Sets the primary dataset for the plot, replacing the existing dataset if
there is one.
|
void | setDataset(int index, XYDataset 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(ValueAxis[] axes)
Sets the domain axes for this plot and sends a PlotChangeEvent
to all registered listeners.
|
void | setDomainAxis(ValueAxis axis)
Sets the domain axis for the plot and sends a PlotChangeEvent
to all registered listeners.
|
void | setDomainAxis(int index, ValueAxis axis)
Sets a domain axis and sends a PlotChangeEvent to all
registered listeners.
|
void | setDomainAxis(int index, ValueAxis 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 primary 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 axis location for a domain axis and, if requested, 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(Paint paint)
Sets the paint used to draw the crosshairs (if visible) and sends a
PlotChangeEvent to all registered listeners.
|
void | setDomainCrosshairStroke(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
and, if the flag changes, sends a PlotChangeEvent to all
registered listeners.
|
void | setDomainGridlinePaint(Paint paint)
Sets the paint for the grid lines plotted against the domain axis, and
sends a PlotChangeEvent to all registered listeners.
|
void | setDomainGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the domain grid-lines are
visible.
|
void | setDomainGridlineStroke(Stroke stroke)
Sets the stroke for the grid lines plotted against the domain axis, and
sends a PlotChangeEvent to all registered listeners.
|
void | setDomainTickBandPaint(Paint paint)
Sets the paint for the domain tick bands.
|
void | setDomainZeroBaselinePaint(Paint paint)
Sets the paint for the zero baseline plotted against the domain axis and
sends a PlotChangeEvent to all registered listeners.
|
void | setDomainZeroBaselineStroke(Stroke stroke)
Sets the stroke for the zero baseline for the domain axis,
and sends a PlotChangeEvent to all registered listeners.
|
void | setDomainZeroBaselineVisible(boolean visible)
Sets the flag that controls whether or not the zero baseline is
displayed for the domain axis, and sends a PlotChangeEvent to
all registered listeners.
|
void | setFixedDomainAxisSpace(AxisSpace space)
Sets the fixed domain axis space.
|
void | setFixedLegendItems(LegendItemCollection items)
Sets the fixed legend items for the plot. |
void | setFixedRangeAxisSpace(AxisSpace space)
Sets the fixed range axis space.
|
void | setOrientation(PlotOrientation orientation)
Sets the orientation for the plot and sends a PlotChangeEvent to
all registered listeners.
|
void | setQuadrantOrigin(Point2D origin)
Sets the quadrant origin and sends a PlotChangeEvent to all
registered listeners.
|
void | setQuadrantPaint(int index, Paint paint)
Sets the paint used for the specified quadrant and sends a
PlotChangeEvent to all registered listeners.
|
void | setRangeAxes(ValueAxis[] axes)
Sets the range axes for this plot and sends a PlotChangeEvent
to all registered listeners.
|
void | setRangeAxis(ValueAxis axis)
Sets the range axis for the plot and sends a PlotChangeEvent to
all registered listeners.
|
void | setRangeAxis(int index, ValueAxis axis)
Sets a range axis and sends a PlotChangeEvent to all registered
listeners.
|
void | setRangeAxis(int index, ValueAxis axis, boolean notify)
Sets a range axis and, if requested, sends a PlotChangeEvent to
all registered listeners.
|
void | setRangeAxisLocation(AxisLocation location)
Sets the location of the primary range axis and sends a
PlotChangeEvent to all registered listeners.
|
void | setRangeAxisLocation(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, 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 axis location for a domain axis and, if requested, 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(Paint paint)
Sets the paint used to color the crosshairs (if visible) and sends a
PlotChangeEvent to all registered listeners.
|
void | setRangeCrosshairStroke(Stroke stroke)
Sets the stroke used to draw the crosshairs (if visible) and sends a
PlotChangeEvent to all registered listeners.
|
void | setRangeCrosshairValue(double value)
Sets the range crosshair value.
|
void | setRangeCrosshairValue(double value, boolean notify)
Sets the range crosshair value and sends a PlotChangeEvent to
all registered listeners, but only if the crosshair is visible.
|
void | setRangeCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the range crosshair is visible.
|
void | setRangeGridlinePaint(Paint paint)
Sets the paint 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 | setRangeGridlineStroke(Stroke stroke)
Sets the stroke for the grid lines plotted against the range axis,
and sends a PlotChangeEvent to all registered listeners.
|
void | setRangeTickBandPaint(Paint paint)
Sets the paint for the range tick bands.
|
void | setRangeZeroBaselinePaint(Paint paint)
Sets the paint for the zero baseline plotted against the range axis and
sends a PlotChangeEvent to all registered listeners.
|
void | setRangeZeroBaselineStroke(Stroke stroke)
Sets the stroke for the zero baseline for the range axis,
and sends a PlotChangeEvent to all registered listeners.
|
void | setRangeZeroBaselineVisible(boolean visible)
Sets the flag that controls whether or not the zero baseline is
displayed for the range axis, and sends a PlotChangeEvent to
all registered listeners.
|
void | setRenderer(XYItemRenderer renderer)
Sets the renderer for the primary dataset and sends a
PlotChangeEvent to all registered listeners. |
void | setRenderer(int index, XYItemRenderer renderer)
Sets a renderer and sends a PlotChangeEvent to all
registered listeners.
|
void | setRenderer(int index, XYItemRenderer renderer, boolean notify)
Sets a renderer and sends a PlotChangeEvent to all
registered listeners.
|
void | setRenderers(XYItemRenderer[] renderers)
Sets the renderers for this plot and sends a PlotChangeEvent
to all registered listeners.
|
void | setSeriesRenderingOrder(SeriesRenderingOrder order)
Sets the series order 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 | zoomDomainAxes(double factor, PlotRenderingInfo info, Point2D source)
Multiplies the range on the domain axis/axes by the specified factor.
|
void | zoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source)
Zooms in on the domain axis/axes. |
void | zoomRangeAxes(double factor, PlotRenderingInfo info, Point2D source)
Multiplies the range on the range axis/axes by the specified factor.
|
void | zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source)
Zooms in on the range axes.
|
XYPlot
instance with no dataset, no axes and
no renderer. You should specify these items before using the plot.null
, but in that case you should
take care to specify the value before using the plot (otherwise a
NullPointerException
may be thrown).
Parameters: dataset the dataset (null
permitted). domainAxis the domain axis (null
permitted). rangeAxis the range axis (null
permitted). renderer the renderer (null
permitted).
Parameters: annotation the annotation (null
not permitted).
See Also: getAnnotations removeAnnotation
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.
Parameters: marker the marker (null
not permitted).
See Also: XYPlot clearDomainMarkers
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.
Parameters: marker the marker (null
not permitted). layer the layer (foreground or background).
See Also: XYPlot
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.
Parameters: index the dataset/renderer index. marker the marker. layer the layer (foreground or background).
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.
Parameters: marker the marker (null
not permitted).
See Also: XYPlot
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.
Parameters: marker the marker (null
not permitted). layer the layer (foreground or background).
See Also: XYPlot
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.
Parameters: index the dataset/renderer index. marker the marker. layer the layer (foreground or background).
Parameters: g2 the graphics device. plotArea the plot area.
Returns: The required space.
Parameters: g2 the graphics device. plotArea the plot area. space a carrier for the result (null
permitted).
Returns: The required space.
Parameters: g2 the graphics device. plotArea the plot area. space a carrier for the result (null
permitted).
Returns: The required space.
See Also: addAnnotation
See Also: clearRangeAxes
See Also: XYPlot
Parameters: index the renderer index.
See Also: XYPlot
See Also: clearDomainAxes
See Also: clearRangeMarkers
Parameters: index the renderer index.
Returns: A clone.
Throws: CloneNotSupportedException this can occur if some component of the plot cannot be cloned.
See Also: configureDomainAxes
The axis ranges are updated if necessary.
Parameters: event information about the event (not used here).
Parameters: 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).
Parameters: g2 the graphics device. dataArea the data area. info the chart rendering info.
Parameters: 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).
Returns: A map containing the state for each axis drawn.
Parameters: g2 the graphics device. area the area.
Parameters: g2 the graphics target. dataArea the data area. orientation the plot orientation. value the crosshair value. axis the axis against which the value is measured. stroke the stroke used to draw the crosshair line. paint the paint used to draw the crosshair line.
Since: 1.0.4
Parameters: g2 the graphics device. dataArea the data area. ticks the ticks.
Parameters: g2 the graphics device. dataArea the data area. index the renderer index. layer the layer (foreground or background).
Parameters: g2 the graphics device. dataArea the data area. ticks the ticks.
See Also: setDomainTickBandPaint
Parameters: 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.
Parameters: g2 the graphics device. area the area.
See Also: setQuadrantOrigin XYPlot
Parameters: g2 the graphics target. dataArea the data area. orientation the plot orientation. value the crosshair value. axis the axis against which the value is measured. stroke the stroke used to draw the crosshair line. paint the paint used to draw the crosshair line.
Since: 1.0.4
Parameters: g2 the graphics device. area the data area. ticks the ticks.
Parameters: g2 the graphics device. dataArea the data area. index the renderer index. layer the layer (foreground or background).
Parameters: g2 the graphics device. dataArea the data area. ticks the ticks.
See Also: setRangeTickBandPaint
Parameters: 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.
Parameters: g2 the graphics device. area the data area.
Since: 1.0.5
Parameters: g2 the graphics device. area the data area.
See Also: XYPlot
Parameters: obj the object (null
permitted).
Returns: true
or false
.
Returns: The list of annotations.
Since: 1.0.1
See Also: addAnnotation
Returns: The axis offset (never null
).
See Also: setAxisOffset
Parameters: axis the axis.
Returns: The range.
Returns: The primary dataset (possibly null
).
See Also: XYPlot setDataset
Parameters: index the dataset index.
Returns: The dataset (possibly null
).
See Also: XYPlot
Returns: The number of datasets.
Returns: The order (never null
).
See Also: setDatasetRenderingOrder
null
, then the method will return the parent plot's
domain axis (if there is a parent plot).
Returns: The domain axis (possibly null
).
See Also: XYPlot setDomainAxis
null
.
Parameters: index the axis index.
Returns: The axis (null
possible).
See Also: XYPlot
Returns: The axis count.
See Also: getRangeAxisCount
Returns: The edge.
See Also: getDomainAxisLocation getOrientation
Parameters: index the axis index.
Returns: The edge.
See Also: XYPlot
Parameters: index the dataset index.
Returns: The axis.
Parameters: axis the axis.
Returns: The axis index.
See Also: getRangeAxisIndex
Returns: The location (never null
).
See Also: setDomainAxisLocation
Parameters: index the axis index.
Returns: The location (never null
).
See Also: XYPlot
Returns: The crosshair paint (never null
).
See Also: setDomainCrosshairPaint isDomainCrosshairVisible getDomainCrosshairStroke
Returns: The crosshair stroke (never null
).
See Also: setDomainCrosshairStroke isDomainCrosshairVisible getDomainCrosshairPaint
Returns: The value.
See Also: XYPlot
Returns: The paint (never null
).
See Also: setDomainGridlinePaint
Returns: The stroke (never null
).
See Also: setDomainGridlineStroke
Parameters: layer the layer (foreground or background).
Returns: The list of domain markers.
See Also: getRangeMarkers
Parameters: index the renderer index. layer the layer.
Returns: A collection of markers (possibly null
).
See Also: XYPlot
null
, no tick bands will be drawn.
Returns: The paint (possibly null
).
See Also: setDomainTickBandPaint
Returns: The paint (never null
).
Since: 1.0.5
See Also: setDomainZeroBaselinePaint
Returns: The stroke (never null
).
Since: 1.0.5
See Also: setDomainZeroBaselineStroke
Returns: The fixed domain axis space (possibly null
).
See Also: setFixedDomainAxisSpace
Returns: The legend items (possibly null
).
See Also: setFixedLegendItems
Returns: The fixed range axis space (possibly null
).
See Also: setFixedRangeAxisSpace
-1
if the
renderer is not assigned to this plot.
Parameters: renderer the renderer (null
permitted).
Returns: The renderer index.
Returns: The legend items.
Returns: The orientation (never null
).
See Also: setOrientation
Returns: A short string describing the type of plot.
Returns: The origin point (never null
).
See Also: setQuadrantOrigin
Parameters: index the quadrant index (0-3).
Returns: The paint (possibly null
).
See Also: XYPlot
null
, then the method will return the parent plot's range
axis (if there is a parent plot).
Returns: The range axis.
See Also: XYPlot setRangeAxis
Parameters: index the axis index.
Returns: The axis (null
possible).
See Also: XYPlot
Returns: The axis count.
See Also: getDomainAxisCount
Returns: The range axis edge.
See Also: getRangeAxisLocation getOrientation
Parameters: index the axis index.
Returns: The edge.
See Also: XYPlot getOrientation
Parameters: index the dataset index.
Returns: The axis.
Parameters: axis the axis.
Returns: The axis index.
See Also: getDomainAxisIndex
Returns: The location (never null
).
See Also: setRangeAxisLocation
Parameters: index the axis index.
Returns: The location (never null
).
See Also: XYPlot
Returns: The crosshair paint (never null
).
See Also: setRangeCrosshairPaint isRangeCrosshairVisible getRangeCrosshairStroke
Returns: The crosshair stroke (never null
).
See Also: setRangeCrosshairStroke isRangeCrosshairVisible getRangeCrosshairPaint
Returns: The value.
See Also: XYPlot
Returns: The paint (never null
).
See Also: setRangeGridlinePaint
Returns: The stroke (never null
).
See Also: setRangeGridlineStroke
Parameters: layer the layer (foreground or background).
Returns: The list of range markers.
See Also: getDomainMarkers
Parameters: index the renderer index. layer the layer.
Returns: A collection of markers (possibly null
).
See Also: XYPlot
null
, no tick bands will be drawn.
Returns: The paint (possibly null
).
See Also: setRangeTickBandPaint
Returns: The paint (never null
).
See Also: setRangeZeroBaselinePaint
Returns: The stroke (never null
).
See Also: setRangeZeroBaselineStroke
Returns: The item renderer (possibly null
).
See Also: setRenderer
null
.
Parameters: index the renderer index.
Returns: The renderer (possibly null
).
See Also: XYPlot
Parameters: dataset the dataset (null
permitted).
Returns: The renderer (possibly null
).
null
, the method returns 0.
Returns: The series count.
Returns: the order (never null
).
See Also: setSeriesRenderingOrder
Returns: The weight.
See Also: XYPlot
Parameters: 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.
-1
if the
dataset does not belong to the plot.
Parameters: dataset the dataset (null
not permitted).
Returns: The index.
Returns: The flag.
See Also: XYPlot
Returns: The flag.
See Also: XYPlot
true
if the domain gridlines are visible, and
false otherwise.
Returns: true
or false
.
See Also: XYPlot
Returns: A boolean.
Since: 1.0.5
See Also: XYPlot
true
, indicating that the domain axis/axes for this
plot are zoomable.
Returns: A boolean.
See Also: isRangeZoomable
Returns: The flag.
See Also: XYPlot
Returns: The flag.
See Also: XYPlot isDomainCrosshairVisible
true
if the range axis grid is visible, and
false otherwise.
Returns: A boolean.
See Also: XYPlot
Returns: A boolean.
See Also: XYPlot
true
, indicating that the range axis/axes for this
plot are zoomable.
Returns: A boolean.
See Also: isDomainZoomable
Parameters: index the dataset index (zero-based). axisIndex the axis index.
See Also: XYPlot
Parameters: index the dataset index (zero-based). axisIndex the axis index.
See Also: XYPlot
Parameters: annotation the annotation (null
not permitted).
Returns: A boolean (indicates whether or not the annotation was removed).
See Also: addAnnotation getAnnotations
The info
and crosshairState
arguments may be
null
.
Parameters: 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).
Returns: A flag that indicates whether any data was actually rendered.
Parameters: event the event.
Parameters: offset the offset (null
not permitted).
See Also: getAxisOffset
Parameters: dataset the dataset (null
permitted).
See Also: getDataset XYPlot
Parameters: index the dataset index. dataset the dataset (null
permitted).
See Also: XYPlot
Parameters: order the rendering order (null
not permitted).
See Also: getDatasetRenderingOrder
Parameters: axes the axes (null
not permitted).
See Also: (ValueAxis[])
Parameters: axis the new axis (null
permitted).
See Also: getDomainAxis XYPlot
Parameters: index the axis index. axis the axis (null
permitted).
Parameters: index the axis index. axis the axis. notify notify listeners?
See Also: XYPlot
Parameters: location the location (null
not permitted).
See Also: getDomainAxisLocation
Parameters: location the location (null
not permitted). notify notify listeners?
See Also: getDomainAxisLocation
Parameters: index the axis index. location the location (null
not permitted for index
0).
See Also: XYPlot
Parameters: index the axis index. location the location (null
not permitted for
index 0). notify notify listeners?
Since: 1.0.5
Parameters: flag the flag.
See Also: isDomainCrosshairLockedOnData
Parameters: paint the new crosshair paint (null
not permitted).
See Also: getDomainCrosshairPaint
Parameters: stroke the new crosshair stroke (null
not
permitted).
See Also: getDomainCrosshairStroke
Parameters: value the value.
See Also: getDomainCrosshairValue
Parameters: value the new value. notify notify listeners?
See Also: getDomainCrosshairValue
Parameters: flag the new value of the flag.
See Also: isDomainCrosshairVisible
Parameters: paint the paint (null
not permitted).
Throws: IllegalArgumentException if paint
is
null
.
See Also: getDomainGridlinePaint
If the flag value is changed, a PlotChangeEvent is sent to all registered listeners.
Parameters: visible the new value of the flag.
See Also: isDomainGridlinesVisible
If you set this to null
, no grid lines will be drawn.
Parameters: stroke the stroke (null
not permitted).
Throws: IllegalArgumentException if stroke
is
null
.
See Also: getDomainGridlineStroke
Parameters: paint the paint (null
permitted).
See Also: getDomainTickBandPaint
Parameters: paint the paint (null
not permitted).
Since: 1.0.5
See Also: getDomainZeroBaselinePaint
Parameters: stroke the stroke (null
not permitted).
Since: 1.0.5
See Also: getRangeZeroBaselineStroke
Parameters: visible the flag.
Since: 1.0.5
See Also: isDomainZeroBaselineVisible
Parameters: space the space (null
permitted).
See Also: getFixedDomainAxisSpace
null
if you prefer the legend items to be created
automatically.
Parameters: items the legend items (null
permitted).
See Also: getFixedLegendItems
Parameters: space the space (null
permitted).
See Also: getFixedRangeAxisSpace
Parameters: orientation the orientation (null
not allowed).
See Also: getOrientation
Parameters: origin the origin (null
not permitted).
See Also: getQuadrantOrigin
Parameters: index the quadrant index (0-3). paint the paint (null
permitted).
See Also: XYPlot
Parameters: axes the axes (null
not permitted).
See Also: (ValueAxis[])
Parameters: axis the axis (null
permitted).
See Also: getRangeAxis XYPlot
Parameters: index the axis index. axis the axis (null
permitted).
See Also: XYPlot
Parameters: index the axis index. axis the axis (null
permitted). notify notify listeners?
See Also: XYPlot
Parameters: location the location (null
not permitted).
See Also: getRangeAxisLocation
Parameters: location the location (null
not permitted). notify notify listeners?
See Also: getRangeAxisLocation
Parameters: index the axis index. location the location (null
permitted).
See Also: XYPlot
Parameters: index the axis index. location the location (null
not permitted for
index 0). notify notify listeners?
Since: 1.0.5
Parameters: flag the flag.
See Also: isRangeCrosshairLockedOnData
Parameters: paint the new crosshair paint (null
not permitted).
See Also: getRangeCrosshairPaint
Parameters: stroke the new crosshair stroke (null
not
permitted).
See Also: getRangeCrosshairStroke
Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.
Parameters: value the new value.
See Also: getRangeCrosshairValue
Parameters: value the new value. notify a flag that controls whether or not listeners are notified.
See Also: getRangeCrosshairValue
Parameters: flag the new value of the flag.
See Also: isRangeCrosshairVisible
Parameters: paint the paint (null
not permitted).
See Also: getRangeGridlinePaint
If the flag value is changed, a PlotChangeEvent is sent to all registered listeners.
Parameters: visible the new value of the flag.
See Also: isRangeGridlinesVisible
Parameters: stroke the stroke (null
not permitted).
See Also: getRangeGridlineStroke
Parameters: paint the paint (null
permitted).
See Also: getRangeTickBandPaint
Parameters: paint the paint (null
not permitted).
See Also: getRangeZeroBaselinePaint
Parameters: stroke the stroke (null
not permitted).
See Also: getRangeZeroBaselineStroke
Parameters: visible the flag.
See Also: isRangeZeroBaselineVisible
null
, no data will be displayed.
Parameters: renderer the renderer (null
permitted).
See Also: getRenderer
Parameters: index the index. renderer the renderer.
See Also: XYPlot
Parameters: index the index. renderer the renderer. notify notify listeners?
See Also: XYPlot
Parameters: renderers the renderers (null
not permitted).
Parameters: order the rendering order (null
not permitted).
See Also: getSeriesRenderingOrder
Parameters: weight the weight.
See Also: getWeight
Parameters: factor the zoom factor. info the plot rendering info. source the source point.
Parameters: 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.
Parameters: factor the zoom factor. info the plot rendering info. source the source point.
Parameters: lowerPercent the lower bound. upperPercent the upper bound. info the plot rendering info. source the source point.