Class MyXYPlot

java.lang.Object
org.jfree.chart.plot.Plot
org.jfree.chart.plot.XYPlot
ucar.unidata.idv.control.chart.MyXYPlot
All Implemented Interfaces:
Serializable, Cloneable, EventListener, org.jfree.chart.event.AnnotationChangeListener, org.jfree.chart.event.AxisChangeListener, org.jfree.chart.event.MarkerChangeListener, org.jfree.chart.event.RendererChangeListener, org.jfree.chart.LegendItemSource, org.jfree.chart.plot.Pannable, org.jfree.chart.plot.ValueAxisPlot, org.jfree.chart.plot.Zoomable, org.jfree.data.general.DatasetChangeListener, org.jfree.util.PublicCloneable

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, Cloneable, org.jfree.util.PublicCloneable, Serializable
A general class for plotting data in the form of (x, y) pairs. This plot can use data from any class that implements the 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.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Paint
    The default crosshair paint.
    static final Stroke
    The default crosshair stroke.
    static final boolean
    The default crosshair visibility.
    static final Paint
    The default grid line paint.
    static final Stroke
    The default grid line stroke.
    protected static ResourceBundle
    The resourceBundle for the localization.

    Fields inherited from class org.jfree.chart.plot.Plot

    DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_LEGEND_ITEM_BOX, DEFAULT_LEGEND_ITEM_CIRCLE, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    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
    Calculates the space required for all the axes in the plot.
    protected org.jfree.chart.axis.AxisSpace
    calculateDomainAxisSpace(Graphics2D g2, Rectangle2D plotArea, org.jfree.chart.axis.AxisSpace space)
    Calculates the space required for the domain axis/axes.
    protected org.jfree.chart.axis.AxisSpace
    calculateRangeAxisSpace(Graphics2D g2, Rectangle2D plotArea, org.jfree.chart.axis.AxisSpace space)
    Calculates the space required for the range axis/axes.
    void
    Clears all the annotations and sends a PlotChangeEvent to all registered listeners.
    void
    Clear the data sets
    void
    Clears the domain axes from the plot and sends a PlotChangeEvent to all registered listeners.
    void
    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
    Clears the range axes from the plot and sends a PlotChangeEvent to all registered listeners.
    void
    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.
    Returns a clone of the plot.
    void
    Configures the domain axes.
    void
    Configures the range axes.
    void
    datasetChanged(org.jfree.data.general.DatasetChangeEvent event)
    Receives notification of a change to the plot's dataset.
    void
    draw(Graphics2D g2, Rectangle2D area, 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(Graphics2D g2, Rectangle2D dataArea, org.jfree.chart.plot.PlotRenderingInfo info)
    Draws the annotations for the plot.
    protected Map
    drawAxes(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, org.jfree.chart.plot.PlotRenderingInfo plotState)
    A utility method for drawing the axes.
    void
    Draws the background for the plot.
    protected void
    Draws the gridlines for the plot, if they are visible.
    protected void
    drawDomainMarkers(Graphics2D g2, Rectangle2D dataArea, int index, org.jfree.ui.Layer layer)
    Draws the domain markers (if any) for an axis and layer.
    void
    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
    Draws the quadrants.
    protected void
    Draws the gridlines for the plot's primary range axis, if they are visible.
    protected void
    drawRangeMarkers(Graphics2D g2, Rectangle2D dataArea, int index, org.jfree.ui.Layer layer)
    Draws the range markers (if any) for a renderer and layer.
    void
    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
    Draws a base line across the chart at value zero on the range axis.
    boolean
    Tests this plot for equality with another object.
    org.jfree.ui.RectangleInsets
    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
    Returns the primary dataset for the plot.
    org.jfree.data.xy.XYDataset
    getDataset(int index)
    Returns a dataset.
    int
    Returns the number of datasets.
    org.jfree.chart.plot.DatasetRenderingOrder
    Returns the dataset rendering order.
    org.jfree.chart.axis.ValueAxis
    Returns the domain axis for the plot.
    org.jfree.chart.axis.ValueAxis
    getDomainAxis(int index)
    Returns a domain axis.
    int
    Returns the number of domain axes.
    org.jfree.ui.RectangleEdge
    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
    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
    Returns the location of the primary domain axis.
    org.jfree.chart.axis.AxisLocation
    Returns the location for a domain axis.
    Returns the domain crosshair color.
    Returns the Stroke used to draw the crosshair (if visible).
    double
    Returns the domain crosshair value.
    Returns the paint for the grid lines (if any) plotted against the domain axis.
    Returns the stroke for the grid-lines (if any) plotted against the domain axis.
    getDomainMarkers(int index, org.jfree.ui.Layer layer)
    Returns a collection of domain markers for a particular renderer and layer.
    getDomainMarkers(org.jfree.ui.Layer layer)
    Returns the list of domain markers (read only) for the specified layer.
    Returns the paint used for the domain tick bands.
    org.jfree.chart.axis.AxisSpace
    Returns the fixed domain axis space.
    org.jfree.chart.LegendItemCollection
    Returns the fixed legend items, if any.
    org.jfree.chart.axis.AxisSpace
    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
    Returns the legend items for the plot.
    org.jfree.chart.plot.PlotOrientation
    Returns the orientation of the plot.
    Returns the plot type as a string.
    Returns the origin for the quadrants that can be displayed on the plot.
    getQuadrantPaint(int index)
    Returns the paint used for the specified quadrant.
    org.jfree.chart.axis.ValueAxis
    Returns the range axis for the plot.
    org.jfree.chart.axis.ValueAxis
    getRangeAxis(int index)
    Returns a range axis.
    int
    Returns the number of range axes.
    org.jfree.ui.RectangleEdge
    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
    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
    Returns the location of the primary range axis.
    org.jfree.chart.axis.AxisLocation
    Returns the location for a range axis.
    Returns the range crosshair color.
    Returns the Stroke used to draw the crosshair (if visible).
    double
    Returns the range crosshair value.
    Returns the paint for the grid lines (if any) plotted against the range axis.
    Returns the stroke for the grid lines (if any) plotted against the range axis.
    getRangeMarkers(int index, org.jfree.ui.Layer layer)
    Returns a collection of range markers for a particular renderer and layer.
    getRangeMarkers(org.jfree.ui.Layer layer)
    Returns the list of range markers (read only) for the specified layer.
    Returns the paint used for the range tick bands.
    Returns the paint for the zero baseline (if any) plotted against the range axis.
    Returns the stroke used for the zero baseline against the range axis.
    org.jfree.chart.renderer.xy.XYItemRenderer
    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
    Returns the number of series in the primary dataset for this plot.
    org.jfree.chart.plot.SeriesRenderingOrder
    Returns the series rendering order.
    int
    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
    Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
    boolean
    Returns a flag indicating whether or not the domain crosshair is visible.
    boolean
    Returns true if the domain gridlines are visible, and false otherwise.
    boolean
    Returns true
    boolean
    Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
    boolean
    Returns a flag indicating whether or not the range crosshair is visible.
    boolean
    Returns true if the range axis grid is visible, and false otherwise.
    boolean
    Returns a flag that controls whether or not a zero baseline is displayed for the range axis.
    boolean
    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(Graphics2D g2, 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(int index, org.jfree.chart.axis.AxisLocation location)
    Sets the location for a domain axis 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
    Sets the flag indicating whether or not the domain crosshair should "lock-on" to actual data values.
    void
    Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
    void
    Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
    void
    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
    Sets the flag indicating whether or not the domain crosshair is visible.
    void
    Sets the paint for the grid lines plotted against the domain axis.
    void
    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
    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
    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(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(int index, org.jfree.chart.axis.AxisLocation location)
    Sets the location for a range axis 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
    Sets the flag indicating whether or not the range crosshair should "lock-on" to actual data values.
    void
    Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
    void
    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
    Sets the flag indicating whether or not the range crosshair is visible.
    void
    Sets the paint for the grid lines plotted against the range axis and sends a PlotChangeEvent to all registered listeners.
    void
    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
    Sets the paint for the range tick bands.
    void
    Sets the paint for the zero baseline plotted against the range axis and sends a PlotChangeEvent to all registered listeners.
    void
    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, Point2D source)
    Zooms in on the domain axis/axes.
    void
    zoomDomainAxes(double factor, org.jfree.chart.plot.PlotRenderingInfo info, 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, Point2D source)
    Zooms in on the range axes.
    void
    zoomRangeAxes(double factor, org.jfree.chart.plot.PlotRenderingInfo info, Point2D source)
    Multiplies the range on the range axis/axes by the specified factor.

    Methods inherited from class org.jfree.chart.plot.XYPlot

    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

    Methods inherited from class org.jfree.chart.plot.Plot

    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

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.jfree.chart.plot.Zoomable

    zoomDomainAxes, zoomRangeAxes
  • Field Details

    • DEFAULT_GRIDLINE_STROKE

      public static final Stroke DEFAULT_GRIDLINE_STROKE
      The default grid line stroke.
    • DEFAULT_GRIDLINE_PAINT

      public static final Paint DEFAULT_GRIDLINE_PAINT
      The default grid line paint.
    • DEFAULT_CROSSHAIR_VISIBLE

      public static final boolean DEFAULT_CROSSHAIR_VISIBLE
      The default crosshair visibility.
      See Also:
    • DEFAULT_CROSSHAIR_STROKE

      public static final Stroke DEFAULT_CROSSHAIR_STROKE
      The default crosshair stroke.
    • DEFAULT_CROSSHAIR_PAINT

      public static final Paint DEFAULT_CROSSHAIR_PAINT
      The default crosshair paint.
    • localizationResources

      protected static ResourceBundle localizationResources
      The resourceBundle for the localization.
  • Constructor Details

    • MyXYPlot

      public MyXYPlot()
      Default constructor.
    • 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)
      Creates a new plot.
      Parameters:
      dataset - the dataset (null permitted).
      domainAxis - the domain axis (null permitted).
      rangeAxis - the range axis (null permitted).
      renderer - the renderer (null permitted).
  • Method Details

    • getPlotType

      public String getPlotType()
      Returns the plot type as a string.
      Overrides:
      getPlotType in class org.jfree.chart.plot.XYPlot
      Returns:
      A short string describing the type of plot.
    • getOrientation

      public org.jfree.chart.plot.PlotOrientation getOrientation()
      Returns the orientation of the plot.
      Specified by:
      getOrientation in interface org.jfree.chart.plot.Pannable
      Specified by:
      getOrientation in interface org.jfree.chart.plot.Zoomable
      Overrides:
      getOrientation in class org.jfree.chart.plot.XYPlot
      Returns:
      The orientation of the plot.
    • setOrientation

      public void setOrientation(org.jfree.chart.plot.PlotOrientation orientation)
      Sets the orientation for the plot.
      Overrides:
      setOrientation in class org.jfree.chart.plot.XYPlot
      Parameters:
      orientation - the orientation (null not allowed).
    • getAxisOffset

      public org.jfree.ui.RectangleInsets getAxisOffset()
      Returns the axis offset.
      Overrides:
      getAxisOffset in class org.jfree.chart.plot.XYPlot
      Returns:
      The axis offset (never null).
    • setAxisOffset

      public void setAxisOffset(org.jfree.ui.RectangleInsets offset)
      Sets the axis offsets (gap between the data area and the axes).
      Overrides:
      setAxisOffset in class org.jfree.chart.plot.XYPlot
      Parameters:
      offset - the offset (null not permitted).
    • getDomainAxis

      public org.jfree.chart.axis.ValueAxis getDomainAxis()
      Returns the domain axis for the plot. If the domain axis for this plot is null, then the method will return the parent plot's domain axis (if there is a parent plot).
      Overrides:
      getDomainAxis in class org.jfree.chart.plot.XYPlot
      Returns:
      The domain axis.
    • getDomainAxis

      public org.jfree.chart.axis.ValueAxis getDomainAxis(int index)
      Returns a domain axis.
      Overrides:
      getDomainAxis in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      Returns:
      The axis (null possible).
    • setDomainAxis

      public void setDomainAxis(org.jfree.chart.axis.ValueAxis axis)
      Sets the domain axis for the plot and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setDomainAxis in class org.jfree.chart.plot.XYPlot
      Parameters:
      axis - the new axis (null permitted).
    • setDomainAxis

      public void setDomainAxis(int index, org.jfree.chart.axis.ValueAxis axis)
      Sets a domain axis and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setDomainAxis in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      axis - the axis.
    • setDomainAxis

      public 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.
      Overrides:
      setDomainAxis in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      axis - the axis.
      notify - notify listeners?
    • setDomainAxes

      public void setDomainAxes(org.jfree.chart.axis.ValueAxis[] axes)
      Sets the domain axes for this plot and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setDomainAxes in class org.jfree.chart.plot.XYPlot
      Parameters:
      axes - the axes.
    • getDomainAxisLocation

      public org.jfree.chart.axis.AxisLocation getDomainAxisLocation()
      Returns the location of the primary domain axis.
      Overrides:
      getDomainAxisLocation in class org.jfree.chart.plot.XYPlot
      Returns:
      The location (never null).
    • setDomainAxisLocation

      public void setDomainAxisLocation(org.jfree.chart.axis.AxisLocation location)
      Sets the location of the domain axis and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setDomainAxisLocation in class org.jfree.chart.plot.XYPlot
      Parameters:
      location - the location (null not permitted).
    • setDomainAxisLocation

      public 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.
      Overrides:
      setDomainAxisLocation in class org.jfree.chart.plot.XYPlot
      Parameters:
      location - the location (null not permitted).
      notify - notify listeners?
    • getDomainAxisEdge

      public org.jfree.ui.RectangleEdge getDomainAxisEdge()
      Returns the edge for the primary domain axis (taking into account the plot's orientation.
      Overrides:
      getDomainAxisEdge in class org.jfree.chart.plot.XYPlot
      Returns:
      The edge.
    • getDomainAxisCount

      public int getDomainAxisCount()
      Returns the number of domain axes.
      Overrides:
      getDomainAxisCount in class org.jfree.chart.plot.XYPlot
      Returns:
      The axis count.
    • clearDomainAxes

      public void clearDomainAxes()
      Clears the domain axes from the plot and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      clearDomainAxes in class org.jfree.chart.plot.XYPlot
    • configureDomainAxes

      public void configureDomainAxes()
      Configures the domain axes.
      Overrides:
      configureDomainAxes in class org.jfree.chart.plot.XYPlot
    • getDomainAxisLocation

      public org.jfree.chart.axis.AxisLocation getDomainAxisLocation(int index)
      Returns the location for a domain axis. If this hasn't been set explicitly, the method returns the location that is opposite to the primary domain axis location.
      Overrides:
      getDomainAxisLocation in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      Returns:
      The location (never null).
    • setDomainAxisLocation

      public 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.
      Overrides:
      setDomainAxisLocation in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      location - the location (null permitted).
    • getDomainAxisEdge

      public org.jfree.ui.RectangleEdge getDomainAxisEdge(int index)
      Returns the edge for a domain axis.
      Overrides:
      getDomainAxisEdge in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      Returns:
      The edge.
    • getRangeAxis

      public org.jfree.chart.axis.ValueAxis getRangeAxis()
      Returns the range axis for the plot. If the range axis for this plot is null, then the method will return the parent plot's range axis (if there is a parent plot).
      Overrides:
      getRangeAxis in class org.jfree.chart.plot.XYPlot
      Returns:
      The range axis.
    • setRangeAxis

      public void setRangeAxis(org.jfree.chart.axis.ValueAxis axis)
      Sets the range axis for the plot and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setRangeAxis in class org.jfree.chart.plot.XYPlot
      Parameters:
      axis - the axis (null permitted).
    • getRangeAxisLocation

      public org.jfree.chart.axis.AxisLocation getRangeAxisLocation()
      Returns the location of the primary range axis.
      Overrides:
      getRangeAxisLocation in class org.jfree.chart.plot.XYPlot
      Returns:
      The location (never null).
    • setRangeAxisLocation

      public void setRangeAxisLocation(org.jfree.chart.axis.AxisLocation location)
      Sets the location of the primary range axis and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setRangeAxisLocation in class org.jfree.chart.plot.XYPlot
      Parameters:
      location - the location (null not permitted).
    • setRangeAxisLocation

      public 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.
      Overrides:
      setRangeAxisLocation in class org.jfree.chart.plot.XYPlot
      Parameters:
      location - the location (null not permitted).
      notify - notify listeners?
    • getRangeAxisEdge

      public org.jfree.ui.RectangleEdge getRangeAxisEdge()
      Returns the edge for the primary range axis.
      Overrides:
      getRangeAxisEdge in class org.jfree.chart.plot.XYPlot
      Returns:
      The range axis edge.
    • getRangeAxis

      public org.jfree.chart.axis.ValueAxis getRangeAxis(int index)
      Returns a range axis.
      Overrides:
      getRangeAxis in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      Returns:
      The axis (null possible).
    • setRangeAxis

      public void setRangeAxis(int index, org.jfree.chart.axis.ValueAxis axis)
      Sets a range axis and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setRangeAxis in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      axis - the axis (null permitted).
    • setRangeAxis

      public 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.
      Overrides:
      setRangeAxis in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      axis - the axis (null permitted).
      notify - and notify the listeners
    • setRangeAxes

      public void setRangeAxes(org.jfree.chart.axis.ValueAxis[] axes)
      Sets the range axes for this plot and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setRangeAxes in class org.jfree.chart.plot.XYPlot
      Parameters:
      axes - the axes.
    • getRangeAxisCount

      public int getRangeAxisCount()
      Returns the number of range axes.
      Overrides:
      getRangeAxisCount in class org.jfree.chart.plot.XYPlot
      Returns:
      The axis count.
    • clearRangeAxes

      public void clearRangeAxes()
      Clears the range axes from the plot and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      clearRangeAxes in class org.jfree.chart.plot.XYPlot
    • configureRangeAxes

      public void configureRangeAxes()
      Configures the range axes.
      Overrides:
      configureRangeAxes in class org.jfree.chart.plot.XYPlot
    • getRangeAxisLocation

      public org.jfree.chart.axis.AxisLocation getRangeAxisLocation(int index)
      Returns the location for a range axis. If this hasn't been set explicitly, the method returns the location that is opposite to the primary range axis location.
      Overrides:
      getRangeAxisLocation in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      Returns:
      The location (never null).
    • setRangeAxisLocation

      public 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.
      Overrides:
      setRangeAxisLocation in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      location - the location (null permitted).
    • getRangeAxisEdge

      public org.jfree.ui.RectangleEdge getRangeAxisEdge(int index)
      Returns the edge for a range axis.
      Overrides:
      getRangeAxisEdge in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the axis index.
      Returns:
      The edge.
    • getDataset

      public org.jfree.data.xy.XYDataset getDataset()
      Returns the primary dataset for the plot.
      Overrides:
      getDataset in class org.jfree.chart.plot.XYPlot
      Returns:
      The primary dataset (possibly null).
    • getDataset

      public org.jfree.data.xy.XYDataset getDataset(int index)
      Returns a dataset.
      Overrides:
      getDataset in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the dataset index.
      Returns:
      The dataset (possibly null).
    • setDataset

      public void setDataset(org.jfree.data.xy.XYDataset dataset)
      Sets the primary dataset for the plot, replacing the existing dataset if there is one.
      Overrides:
      setDataset in class org.jfree.chart.plot.XYPlot
      Parameters:
      dataset - the dataset (null permitted).
    • clearDatasets

      public void clearDatasets()
      Clear the data sets
    • setDataset

      public void setDataset(int index, org.jfree.data.xy.XYDataset dataset)
      Sets a dataset for the plot.
      Overrides:
      setDataset in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the dataset index.
      dataset - the dataset (null permitted).
    • getDatasetCount

      public int getDatasetCount()
      Returns the number of datasets.
      Overrides:
      getDatasetCount in class org.jfree.chart.plot.XYPlot
      Returns:
      The number of datasets.
    • indexOf

      public 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.
      Overrides:
      indexOf in class org.jfree.chart.plot.XYPlot
      Parameters:
      dataset - the dataset (null not permitted).
      Returns:
      The index.
    • mapDatasetToDomainAxis

      public void mapDatasetToDomainAxis(int index, int axisIndex)
      Maps a dataset to a particular domain axis. All data will be plotted against axis zero by default, no mapping is required for this case.
      Overrides:
      mapDatasetToDomainAxis in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the dataset index (zero-based).
      axisIndex - the axis index.
    • mapDatasetToRangeAxis

      public void mapDatasetToRangeAxis(int index, int axisIndex)
      Maps a dataset to a particular range axis. All data will be plotted against axis zero by default, no mapping is required for this case.
      Overrides:
      mapDatasetToRangeAxis in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the dataset index (zero-based).
      axisIndex - the axis index.
    • getRenderer

      public org.jfree.chart.renderer.xy.XYItemRenderer getRenderer()
      Returns the renderer for the primary dataset.
      Overrides:
      getRenderer in class org.jfree.chart.plot.XYPlot
      Returns:
      The item renderer (possibly null).
    • getRenderer

      public org.jfree.chart.renderer.xy.XYItemRenderer getRenderer(int index)
      Returns the renderer for a dataset, or null.
      Overrides:
      getRenderer in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the renderer index.
      Returns:
      The renderer (possibly null).
    • setRenderer

      public void setRenderer(org.jfree.chart.renderer.xy.XYItemRenderer renderer)
      Sets the renderer for the primary dataset and sends a PlotChangeEvent to all registered listeners. If the renderer is set to null, no data will be displayed.
      Overrides:
      setRenderer in class org.jfree.chart.plot.XYPlot
      Parameters:
      renderer - the renderer (null permitted).
    • setRenderer

      public void setRenderer(int index, org.jfree.chart.renderer.xy.XYItemRenderer renderer)
      Sets a renderer and sends a PlotChangeEvent is sent to all registered listeners.
      Overrides:
      setRenderer in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the index.
      renderer - the renderer.
    • getDatasetRenderingOrder

      public org.jfree.chart.plot.DatasetRenderingOrder getDatasetRenderingOrder()
      Returns the dataset rendering order.
      Overrides:
      getDatasetRenderingOrder in class org.jfree.chart.plot.XYPlot
      Returns:
      The order (never null).
    • setDatasetRenderingOrder

      public void setDatasetRenderingOrder(org.jfree.chart.plot.DatasetRenderingOrder order)
      Sets the rendering order and sends a 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.
      Overrides:
      setDatasetRenderingOrder in class org.jfree.chart.plot.XYPlot
      Parameters:
      order - the rendering order (null not permitted).
    • getSeriesRenderingOrder

      public org.jfree.chart.plot.SeriesRenderingOrder getSeriesRenderingOrder()
      Returns the series rendering order.
      Overrides:
      getSeriesRenderingOrder in class org.jfree.chart.plot.XYPlot
      Returns:
      the order (never null).
    • setSeriesRenderingOrder

      public void setSeriesRenderingOrder(org.jfree.chart.plot.SeriesRenderingOrder order)
      Sets the series order and sends a 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.
      Overrides:
      setSeriesRenderingOrder in class org.jfree.chart.plot.XYPlot
      Parameters:
      order - the rendering order (null not permitted).
    • getIndexOf

      public 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.
      Overrides:
      getIndexOf in class org.jfree.chart.plot.XYPlot
      Parameters:
      renderer - the renderer (null permitted).
      Returns:
      The renderer index.
    • getRendererForDataset

      public org.jfree.chart.renderer.xy.XYItemRenderer getRendererForDataset(org.jfree.data.xy.XYDataset dataset)
      Returns the renderer for the specified dataset. The code first determines the index of the dataset, then checks if there is a renderer with the same index (if not, the method returns renderer(0).
      Overrides:
      getRendererForDataset in class org.jfree.chart.plot.XYPlot
      Parameters:
      dataset - the dataset (null permitted).
      Returns:
      The renderer (possibly null).
    • getWeight

      public int getWeight()
      Returns the weight for this plot when it is used as a subplot within a combined plot.
      Overrides:
      getWeight in class org.jfree.chart.plot.XYPlot
      Returns:
      The weight.
    • setWeight

      public void setWeight(int weight)
      Sets the weight for the plot.
      Overrides:
      setWeight in class org.jfree.chart.plot.XYPlot
      Parameters:
      weight - the weight.
    • isDomainGridlinesVisible

      public boolean isDomainGridlinesVisible()
      Returns true if the domain gridlines are visible, and false otherwise.
      Overrides:
      isDomainGridlinesVisible in class org.jfree.chart.plot.XYPlot
      Returns:
      true or false.
    • setDomainGridlinesVisible

      public void setDomainGridlinesVisible(boolean visible)
      Sets the flag that controls whether or not the domain grid-lines are visible.

      If the flag value is changed, a PlotChangeEvent is sent to all registered listeners.

      Overrides:
      setDomainGridlinesVisible in class org.jfree.chart.plot.XYPlot
      Parameters:
      visible - the new value of the flag.
    • getDomainGridlineStroke

      public Stroke getDomainGridlineStroke()
      Returns the stroke for the grid-lines (if any) plotted against the domain axis.
      Overrides:
      getDomainGridlineStroke in class org.jfree.chart.plot.XYPlot
      Returns:
      The stroke.
    • setDomainGridlineStroke

      public void setDomainGridlineStroke(Stroke stroke)
      Sets the stroke for the grid lines plotted against the domain axis.

      If you set this to null, no grid lines will be drawn.

      Overrides:
      setDomainGridlineStroke in class org.jfree.chart.plot.XYPlot
      Parameters:
      stroke - the stroke (null permitted).
    • getDomainGridlinePaint

      public Paint getDomainGridlinePaint()
      Returns the paint for the grid lines (if any) plotted against the domain axis.
      Overrides:
      getDomainGridlinePaint in class org.jfree.chart.plot.XYPlot
      Returns:
      The paint.
    • setDomainGridlinePaint

      public void setDomainGridlinePaint(Paint paint)
      Sets the paint for the grid lines plotted against the domain axis.

      If you set this to null, no grid lines will be drawn.

      Overrides:
      setDomainGridlinePaint in class org.jfree.chart.plot.XYPlot
      Parameters:
      paint - the paint (null permitted).
    • isRangeGridlinesVisible

      public boolean isRangeGridlinesVisible()
      Returns true if the range axis grid is visible, and false otherwise.
      Overrides:
      isRangeGridlinesVisible in class org.jfree.chart.plot.XYPlot
      Returns:
      A boolean.
    • setRangeGridlinesVisible

      public void setRangeGridlinesVisible(boolean visible)
      Sets the flag that controls whether or not the range axis grid lines are visible.

      If the flag value is changed, a PlotChangeEvent is sent to all registered listeners.

      Overrides:
      setRangeGridlinesVisible in class org.jfree.chart.plot.XYPlot
      Parameters:
      visible - the new value of the flag.
    • getRangeGridlineStroke

      public Stroke getRangeGridlineStroke()
      Returns the stroke for the grid lines (if any) plotted against the range axis.
      Overrides:
      getRangeGridlineStroke in class org.jfree.chart.plot.XYPlot
      Returns:
      The stroke (never null).
    • setRangeGridlineStroke

      public void setRangeGridlineStroke(Stroke stroke)
      Sets the stroke for the grid lines plotted against the range axis, and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setRangeGridlineStroke in class org.jfree.chart.plot.XYPlot
      Parameters:
      stroke - the stroke (null not permitted).
    • getRangeGridlinePaint

      public Paint getRangeGridlinePaint()
      Returns the paint for the grid lines (if any) plotted against the range axis.
      Overrides:
      getRangeGridlinePaint in class org.jfree.chart.plot.XYPlot
      Returns:
      The paint (never null).
    • setRangeGridlinePaint

      public void setRangeGridlinePaint(Paint paint)
      Sets the paint for the grid lines plotted against the range axis and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setRangeGridlinePaint in class org.jfree.chart.plot.XYPlot
      Parameters:
      paint - the paint (null permitted).
    • isRangeZeroBaselineVisible

      public boolean isRangeZeroBaselineVisible()
      Returns a flag that controls whether or not a zero baseline is displayed for the range axis.
      Overrides:
      isRangeZeroBaselineVisible in class org.jfree.chart.plot.XYPlot
      Returns:
      A boolean.
    • setRangeZeroBaselineVisible

      public 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.
      Overrides:
      setRangeZeroBaselineVisible in class org.jfree.chart.plot.XYPlot
      Parameters:
      visible - the flag.
    • getRangeZeroBaselineStroke

      public Stroke getRangeZeroBaselineStroke()
      Returns the stroke used for the zero baseline against the range axis.
      Overrides:
      getRangeZeroBaselineStroke in class org.jfree.chart.plot.XYPlot
      Returns:
      The stroke (never null).
    • setRangeZeroBaselineStroke

      public void setRangeZeroBaselineStroke(Stroke stroke)
      Sets the stroke for the zero baseline for the range axis, and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setRangeZeroBaselineStroke in class org.jfree.chart.plot.XYPlot
      Parameters:
      stroke - the stroke (null not permitted).
    • getRangeZeroBaselinePaint

      public Paint getRangeZeroBaselinePaint()
      Returns the paint for the zero baseline (if any) plotted against the range axis.
      Overrides:
      getRangeZeroBaselinePaint in class org.jfree.chart.plot.XYPlot
      Returns:
      The paint (never null).
    • setRangeZeroBaselinePaint

      public void setRangeZeroBaselinePaint(Paint paint)
      Sets the paint for the zero baseline plotted against the range axis and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setRangeZeroBaselinePaint in class org.jfree.chart.plot.XYPlot
      Parameters:
      paint - the paint (null permitted).
    • getDomainTickBandPaint

      public Paint getDomainTickBandPaint()
      Returns the paint used for the domain tick bands. If this is null, no tick bands will be drawn.
      Overrides:
      getDomainTickBandPaint in class org.jfree.chart.plot.XYPlot
      Returns:
      The paint (possibly null).
    • setDomainTickBandPaint

      public void setDomainTickBandPaint(Paint paint)
      Sets the paint for the domain tick bands.
      Overrides:
      setDomainTickBandPaint in class org.jfree.chart.plot.XYPlot
      Parameters:
      paint - the paint (null permitted).
    • getRangeTickBandPaint

      public Paint getRangeTickBandPaint()
      Returns the paint used for the range tick bands. If this is null, no tick bands will be drawn.
      Overrides:
      getRangeTickBandPaint in class org.jfree.chart.plot.XYPlot
      Returns:
      The paint (possibly null).
    • setRangeTickBandPaint

      public void setRangeTickBandPaint(Paint paint)
      Sets the paint for the range tick bands.
      Overrides:
      setRangeTickBandPaint in class org.jfree.chart.plot.XYPlot
      Parameters:
      paint - the paint (null permitted).
    • getQuadrantOrigin

      public Point2D getQuadrantOrigin()
      Returns the origin for the quadrants that can be displayed on the plot. This defaults to (0, 0).
      Overrides:
      getQuadrantOrigin in class org.jfree.chart.plot.XYPlot
      Returns:
      The origin point (never null).
    • setQuadrantOrigin

      public void setQuadrantOrigin(Point2D origin)
      Sets the quadrant origin and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setQuadrantOrigin in class org.jfree.chart.plot.XYPlot
      Parameters:
      origin - the origin (null not permitted).
    • getQuadrantPaint

      public Paint getQuadrantPaint(int index)
      Returns the paint used for the specified quadrant.
      Overrides:
      getQuadrantPaint in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the quadrant index (0-3).
      Returns:
      The paint (possibly null).
    • setQuadrantPaint

      public void setQuadrantPaint(int index, Paint paint)
      Sets the paint used for the specified quadrant and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      setQuadrantPaint in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the quadrant index (0-3).
      paint - the paint (null permitted).
    • addDomainMarker

      public void addDomainMarker(org.jfree.chart.plot.Marker marker)
      Adds a marker for the domain axis and sends a 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.

      Overrides:
      addDomainMarker in class org.jfree.chart.plot.XYPlot
      Parameters:
      marker - the marker (null not permitted).
    • addDomainMarker

      public 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.

      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.

      Overrides:
      addDomainMarker in class org.jfree.chart.plot.XYPlot
      Parameters:
      marker - the marker (null not permitted).
      layer - the layer (foreground or background).
    • clearDomainMarkers

      public void clearDomainMarkers()
      Clears all the (foreground and background) domain markers and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      clearDomainMarkers in class org.jfree.chart.plot.XYPlot
    • clearDomainMarkers

      public void clearDomainMarkers(int index)
      Clears the (foreground and background) domain markers for a particular renderer.
      Overrides:
      clearDomainMarkers in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the renderer index.
    • addDomainMarker

      public 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.

      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.

      Overrides:
      addDomainMarker in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the renderer index.
      marker - the marker.
      layer - the layer (foreground or background).
    • addRangeMarker

      public void addRangeMarker(org.jfree.chart.plot.Marker marker)
      Adds a marker for the range axis and sends a 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.

      Overrides:
      addRangeMarker in class org.jfree.chart.plot.XYPlot
      Parameters:
      marker - the marker (null not permitted).
    • addRangeMarker

      public 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.

      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.

      Overrides:
      addRangeMarker in class org.jfree.chart.plot.XYPlot
      Parameters:
      marker - the marker (null not permitted).
      layer - the layer (foreground or background).
    • clearRangeMarkers

      public void clearRangeMarkers()
      Clears all the range markers and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      clearRangeMarkers in class org.jfree.chart.plot.XYPlot
    • addRangeMarker

      public 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.

      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.

      Overrides:
      addRangeMarker in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the renderer index.
      marker - the marker.
      layer - the layer (foreground or background).
    • clearRangeMarkers

      public void clearRangeMarkers(int index)
      Clears the (foreground and background) range markers for a particular renderer.
      Overrides:
      clearRangeMarkers in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the renderer index.
    • addAnnotation

      public void addAnnotation(org.jfree.chart.annotations.XYAnnotation annotation)
      Adds an annotation to the plot and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      addAnnotation in class org.jfree.chart.plot.XYPlot
      Parameters:
      annotation - the annotation (null not permitted).
    • removeAnnotation

      public boolean removeAnnotation(org.jfree.chart.annotations.XYAnnotation annotation)
      Removes an annotation from the plot and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      removeAnnotation in class org.jfree.chart.plot.XYPlot
      Parameters:
      annotation - the annotation (null not permitted).
      Returns:
      A boolean (indicates whether or not the annotation was removed).
    • clearAnnotations

      public void clearAnnotations()
      Clears all the annotations and sends a PlotChangeEvent to all registered listeners.
      Overrides:
      clearAnnotations in class org.jfree.chart.plot.XYPlot
    • calculateAxisSpace

      protected org.jfree.chart.axis.AxisSpace calculateAxisSpace(Graphics2D g2, Rectangle2D plotArea)
      Calculates the space required for all the axes in the plot.
      Overrides:
      calculateAxisSpace in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      plotArea - the plot area.
      Returns:
      The required space.
    • calculateDomainAxisSpace

      protected org.jfree.chart.axis.AxisSpace calculateDomainAxisSpace(Graphics2D g2, Rectangle2D plotArea, org.jfree.chart.axis.AxisSpace space)
      Calculates the space required for the domain axis/axes.
      Overrides:
      calculateDomainAxisSpace in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      plotArea - the plot area.
      space - a carrier for the result (null permitted).
      Returns:
      The required space.
    • calculateRangeAxisSpace

      protected org.jfree.chart.axis.AxisSpace calculateRangeAxisSpace(Graphics2D g2, Rectangle2D plotArea, org.jfree.chart.axis.AxisSpace space)
      Calculates the space required for the range axis/axes.
      Overrides:
      calculateRangeAxisSpace in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      plotArea - the plot area.
      space - a carrier for the result (null permitted).
      Returns:
      The required space.
    • draw

      public void draw(Graphics2D g2, Rectangle2D area, 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.
      Overrides:
      draw in class org.jfree.chart.plot.XYPlot
      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).
    • drawBackground

      public void drawBackground(Graphics2D g2, Rectangle2D area)
      Draws the background for the plot.
      Overrides:
      drawBackground in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      area - the area.
    • drawQuadrants

      protected void drawQuadrants(Graphics2D g2, Rectangle2D area)
      Draws the quadrants.
      Overrides:
      drawQuadrants in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      area - the area.
    • drawDomainTickBands

      public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks)
      Draws the domain tick bands, if any.
      Overrides:
      drawDomainTickBands in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      dataArea - the data area.
      ticks - the ticks.
    • drawRangeTickBands

      public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks)
      Draws the range tick bands, if any.
      Overrides:
      drawRangeTickBands in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      dataArea - the data area.
      ticks - the ticks.
    • drawAxes

      protected Map drawAxes(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, org.jfree.chart.plot.PlotRenderingInfo plotState)
      A utility method for drawing the axes.
      Overrides:
      drawAxes in class org.jfree.chart.plot.XYPlot
      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.
    • render

      public boolean render(Graphics2D g2, 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.

      The info and crosshairState arguments may be null.

      Overrides:
      render in class org.jfree.chart.plot.XYPlot
      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.
    • getDomainAxisForDataset

      public org.jfree.chart.axis.ValueAxis getDomainAxisForDataset(int index)
      Returns the domain axis for a dataset.
      Overrides:
      getDomainAxisForDataset in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the dataset index.
      Returns:
      The axis.
    • getRangeAxisForDataset

      public org.jfree.chart.axis.ValueAxis getRangeAxisForDataset(int index)
      Returns the range axis for a dataset.
      Overrides:
      getRangeAxisForDataset in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the dataset index.
      Returns:
      The axis.
    • drawDomainGridlines

      protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks)
      Draws the gridlines for the plot, if they are visible.
      Overrides:
      drawDomainGridlines in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      dataArea - the data area.
      ticks - the ticks.
    • drawRangeGridlines

      protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area, List ticks)
      Draws the gridlines for the plot's primary range axis, if they are visible.
      Overrides:
      drawRangeGridlines in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      area - the data area.
      ticks - the ticks.
    • drawZeroRangeBaseline

      protected void drawZeroRangeBaseline(Graphics2D g2, Rectangle2D area)
      Draws a base line across the chart at value zero on the range axis.
      Overrides:
      drawZeroRangeBaseline in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      area - the data area.
    • drawAnnotations

      public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea, org.jfree.chart.plot.PlotRenderingInfo info)
      Draws the annotations for the plot.
      Overrides:
      drawAnnotations in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      dataArea - the data area.
      info - the chart rendering info.
    • drawDomainMarkers

      protected void drawDomainMarkers(Graphics2D g2, Rectangle2D dataArea, int index, org.jfree.ui.Layer layer)
      Draws the domain markers (if any) for an axis and layer. This method is typically called from within the draw() method.
      Overrides:
      drawDomainMarkers in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      dataArea - the data area.
      index - the renderer index.
      layer - the layer (foreground or background).
    • drawRangeMarkers

      protected void drawRangeMarkers(Graphics2D g2, Rectangle2D dataArea, int index, org.jfree.ui.Layer layer)
      Draws the range markers (if any) for a renderer and layer. This method is typically called from within the draw() method.
      Overrides:
      drawRangeMarkers in class org.jfree.chart.plot.XYPlot
      Parameters:
      g2 - the graphics device.
      dataArea - the data area.
      index - the renderer index.
      layer - the layer (foreground or background).
    • getDomainMarkers

      public Collection getDomainMarkers(org.jfree.ui.Layer layer)
      Returns the list of domain markers (read only) for the specified layer.
      Overrides:
      getDomainMarkers in class org.jfree.chart.plot.XYPlot
      Parameters:
      layer - the layer (foreground or background).
      Returns:
      The list of domain markers.
    • getRangeMarkers

      public Collection getRangeMarkers(org.jfree.ui.Layer layer)
      Returns the list of range markers (read only) for the specified layer.
      Overrides:
      getRangeMarkers in class org.jfree.chart.plot.XYPlot
      Parameters:
      layer - the layer (foreground or background).
      Returns:
      The list of range markers.
    • getDomainMarkers

      public Collection getDomainMarkers(int index, org.jfree.ui.Layer layer)
      Returns a collection of domain markers for a particular renderer and layer.
      Overrides:
      getDomainMarkers in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the renderer index.
      layer - the layer.
      Returns:
      A collection of markers (possibly null).
    • getRangeMarkers

      public Collection getRangeMarkers(int index, org.jfree.ui.Layer layer)
      Returns a collection of range markers for a particular renderer and layer.
      Overrides:
      getRangeMarkers in class org.jfree.chart.plot.XYPlot
      Parameters:
      index - the renderer index.
      layer - the layer.
      Returns:
      A collection of markers (possibly null).
    • drawHorizontalLine

      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.
      Overrides:
      drawHorizontalLine in class org.jfree.chart.plot.XYPlot
      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.
    • drawVerticalLine

      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.
      Overrides:
      drawVerticalLine in class org.jfree.chart.plot.XYPlot
      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.
    • handleClick

      public void handleClick(int x, int y, org.jfree.chart.plot.PlotRenderingInfo info)
      Handles a 'click' on the plot by updating the anchor values...
      Overrides:
      handleClick in class org.jfree.chart.plot.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.
    • getDomainAxisIndex

      public int getDomainAxisIndex(org.jfree.chart.axis.ValueAxis axis)
      Returns the index of the given domain axis.
      Overrides:
      getDomainAxisIndex in class org.jfree.chart.plot.XYPlot
      Parameters:
      axis - the axis.
      Returns:
      The axis index.
    • getRangeAxisIndex

      public int getRangeAxisIndex(org.jfree.chart.axis.ValueAxis axis)
      Returns the index of the given range axis.
      Overrides:
      getRangeAxisIndex in class org.jfree.chart.plot.XYPlot
      Parameters:
      axis - the axis.
      Returns:
      The axis index.
    • getDataRange

      public org.jfree.data.Range getDataRange(org.jfree.chart.axis.ValueAxis axis)
      Returns the range for the specified axis.
      Specified by:
      getDataRange in interface org.jfree.chart.plot.ValueAxisPlot
      Overrides:
      getDataRange in class org.jfree.chart.plot.XYPlot
      Parameters:
      axis - the axis.
      Returns:
      The range.
    • datasetChanged

      public void datasetChanged(org.jfree.data.general.DatasetChangeEvent event)
      Receives notification of a change to the plot's dataset.

      The axis ranges are updated if necessary.

      Specified by:
      datasetChanged in interface org.jfree.data.general.DatasetChangeListener
      Overrides:
      datasetChanged in class org.jfree.chart.plot.XYPlot
      Parameters:
      event - information about the event (not used here).
    • rendererChanged

      public void rendererChanged(org.jfree.chart.event.RendererChangeEvent event)
      Receives notification of a renderer change event.
      Specified by:
      rendererChanged in interface org.jfree.chart.event.RendererChangeListener
      Overrides:
      rendererChanged in class org.jfree.chart.plot.XYPlot
      Parameters:
      event - the event.
    • isDomainCrosshairVisible

      public boolean isDomainCrosshairVisible()
      Returns a flag indicating whether or not the domain crosshair is visible.
      Overrides:
      isDomainCrosshairVisible in class org.jfree.chart.plot.XYPlot
      Returns:
      The flag.
    • setDomainCrosshairVisible

      public void setDomainCrosshairVisible(boolean flag)
      Sets the flag indicating whether or not the domain crosshair is visible.
      Overrides:
      setDomainCrosshairVisible in class org.jfree.chart.plot.XYPlot
      Parameters:
      flag - the new value of the flag.
    • isDomainCrosshairLockedOnData

      public boolean isDomainCrosshairLockedOnData()
      Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
      Overrides:
      isDomainCrosshairLockedOnData in class org.jfree.chart.plot.XYPlot
      Returns:
      The flag.
    • setDomainCrosshairLockedOnData

      public void setDomainCrosshairLockedOnData(boolean flag)
      Sets the flag indicating whether or not the domain crosshair should "lock-on" to actual data values.
      Overrides:
      setDomainCrosshairLockedOnData in class org.jfree.chart.plot.XYPlot
      Parameters:
      flag - the flag.
    • getDomainCrosshairValue

      public double getDomainCrosshairValue()
      Returns the domain crosshair value.
      Overrides:
      getDomainCrosshairValue in class org.jfree.chart.plot.XYPlot
      Returns:
      The value.
    • setDomainCrosshairValue

      public void setDomainCrosshairValue(double value)
      Sets the domain crosshair value and sends a PlotChangeEvent to all registered listeners (provided that the domain crosshair is visible).
      Overrides:
      setDomainCrosshairValue in class org.jfree.chart.plot.XYPlot
      Parameters:
      value - the value.
    • setDomainCrosshairValue

      public 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).
      Overrides:
      setDomainCrosshairValue in class org.jfree.chart.plot.XYPlot
      Parameters:
      value - the new value.
      notify - notify listeners?
    • getDomainCrosshairStroke

      public Stroke getDomainCrosshairStroke()
      Returns the Stroke used to draw the crosshair (if visible).
      Overrides:
      getDomainCrosshairStroke in class org.jfree.chart.plot.XYPlot
      Returns:
      The crosshair stroke.
    • setDomainCrosshairStroke

      public void setDomainCrosshairStroke(Stroke stroke)
      Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
      Overrides:
      setDomainCrosshairStroke in class org.jfree.chart.plot.XYPlot
      Parameters:
      stroke - the new crosshair stroke.
    • getDomainCrosshairPaint

      public Paint getDomainCrosshairPaint()
      Returns the domain crosshair color.
      Overrides:
      getDomainCrosshairPaint in class org.jfree.chart.plot.XYPlot
      Returns:
      The crosshair color.
    • setDomainCrosshairPaint

      public void setDomainCrosshairPaint(Paint paint)
      Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
      Overrides:
      setDomainCrosshairPaint in class org.jfree.chart.plot.XYPlot
      Parameters:
      paint - the new crosshair paint.
    • isRangeCrosshairVisible

      public boolean isRangeCrosshairVisible()
      Returns a flag indicating whether or not the range crosshair is visible.
      Overrides:
      isRangeCrosshairVisible in class org.jfree.chart.plot.XYPlot
      Returns:
      The flag.
    • setRangeCrosshairVisible

      public void setRangeCrosshairVisible(boolean flag)
      Sets the flag indicating whether or not the range crosshair is visible.
      Overrides:
      setRangeCrosshairVisible in class org.jfree.chart.plot.XYPlot
      Parameters:
      flag - the new value of the flag.
    • isRangeCrosshairLockedOnData

      public boolean isRangeCrosshairLockedOnData()
      Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
      Overrides:
      isRangeCrosshairLockedOnData in class org.jfree.chart.plot.XYPlot
      Returns:
      The flag.
    • setRangeCrosshairLockedOnData

      public void setRangeCrosshairLockedOnData(boolean flag)
      Sets the flag indicating whether or not the range crosshair should "lock-on" to actual data values.
      Overrides:
      setRangeCrosshairLockedOnData in class org.jfree.chart.plot.XYPlot
      Parameters:
      flag - the flag.
    • getRangeCrosshairValue

      public double getRangeCrosshairValue()
      Returns the range crosshair value.
      Overrides:
      getRangeCrosshairValue in class org.jfree.chart.plot.XYPlot
      Returns:
      The value.
    • setRangeCrosshairValue

      public void setRangeCrosshairValue(double value)
      Sets the domain crosshair value.

      Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.

      Overrides:
      setRangeCrosshairValue in class org.jfree.chart.plot.XYPlot
      Parameters:
      value - the new value.
    • setRangeCrosshairValue

      public void setRangeCrosshairValue(double value, boolean notify)
      Sets the range crosshair value.

      Registered listeners are notified that the axis has been modified, but only if the crosshair is visible.

      Overrides:
      setRangeCrosshairValue in class org.jfree.chart.plot.XYPlot
      Parameters:
      value - the new value.
      notify - a flag that controls whether or not listeners are notified.
    • getRangeCrosshairStroke

      public Stroke getRangeCrosshairStroke()
      Returns the Stroke used to draw the crosshair (if visible).
      Overrides:
      getRangeCrosshairStroke in class org.jfree.chart.plot.XYPlot
      Returns:
      The crosshair stroke.
    • setRangeCrosshairStroke

      public void setRangeCrosshairStroke(Stroke stroke)
      Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
      Overrides:
      setRangeCrosshairStroke in class org.jfree.chart.plot.XYPlot
      Parameters:
      stroke - the new crosshair stroke.
    • getRangeCrosshairPaint

      public Paint getRangeCrosshairPaint()
      Returns the range crosshair color.
      Overrides:
      getRangeCrosshairPaint in class org.jfree.chart.plot.XYPlot
      Returns:
      The crosshair color.
    • setRangeCrosshairPaint

      public void setRangeCrosshairPaint(Paint paint)
      Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
      Overrides:
      setRangeCrosshairPaint in class org.jfree.chart.plot.XYPlot
      Parameters:
      paint - the new crosshair paint.
    • getFixedDomainAxisSpace

      public org.jfree.chart.axis.AxisSpace getFixedDomainAxisSpace()
      Returns the fixed domain axis space.
      Overrides:
      getFixedDomainAxisSpace in class org.jfree.chart.plot.XYPlot
      Returns:
      The fixed domain axis space (possibly null).
    • setFixedDomainAxisSpace

      public void setFixedDomainAxisSpace(org.jfree.chart.axis.AxisSpace space)
      Sets the fixed domain axis space.
      Overrides:
      setFixedDomainAxisSpace in class org.jfree.chart.plot.XYPlot
      Parameters:
      space - the space.
    • getFixedRangeAxisSpace

      public org.jfree.chart.axis.AxisSpace getFixedRangeAxisSpace()
      Returns the fixed range axis space.
      Overrides:
      getFixedRangeAxisSpace in class org.jfree.chart.plot.XYPlot
      Returns:
      The fixed range axis space.
    • setFixedRangeAxisSpace

      public void setFixedRangeAxisSpace(org.jfree.chart.axis.AxisSpace space)
      Sets the fixed range axis space.
      Overrides:
      setFixedRangeAxisSpace in class org.jfree.chart.plot.XYPlot
      Parameters:
      space - the space.
    • zoomDomainAxes

      public void zoomDomainAxes(double factor, org.jfree.chart.plot.PlotRenderingInfo info, Point2D source)
      Multiplies the range on the domain axis/axes by the specified factor.
      Specified by:
      zoomDomainAxes in interface org.jfree.chart.plot.Zoomable
      Overrides:
      zoomDomainAxes in class org.jfree.chart.plot.XYPlot
      Parameters:
      factor - the zoom factor.
      info - the plot rendering info.
      source - the source point.
    • zoomDomainAxes

      public void zoomDomainAxes(double lowerPercent, double upperPercent, org.jfree.chart.plot.PlotRenderingInfo info, Point2D source)
      Zooms in on the domain axis/axes. The new lower and upper bounds are specified as percentages of the current axis range, where 0 percent is the current lower bound and 100 percent is the current upper bound.
      Specified by:
      zoomDomainAxes in interface org.jfree.chart.plot.Zoomable
      Overrides:
      zoomDomainAxes in class org.jfree.chart.plot.XYPlot
      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.
    • zoomRangeAxes

      public void zoomRangeAxes(double factor, org.jfree.chart.plot.PlotRenderingInfo info, Point2D source)
      Multiplies the range on the range axis/axes by the specified factor.
      Specified by:
      zoomRangeAxes in interface org.jfree.chart.plot.Zoomable
      Overrides:
      zoomRangeAxes in class org.jfree.chart.plot.XYPlot
      Parameters:
      factor - the zoom factor.
      info - the plot rendering info.
      source - the source point.
    • zoomRangeAxes

      public void zoomRangeAxes(double lowerPercent, double upperPercent, org.jfree.chart.plot.PlotRenderingInfo info, Point2D source)
      Zooms in on the range axes.
      Specified by:
      zoomRangeAxes in interface org.jfree.chart.plot.Zoomable
      Overrides:
      zoomRangeAxes in class org.jfree.chart.plot.XYPlot
      Parameters:
      lowerPercent - the lower bound.
      upperPercent - the upper bound.
      info - the plot rendering info.
      source - the source point.
    • isDomainZoomable

      public boolean isDomainZoomable()
      Returns true
      Specified by:
      isDomainZoomable in interface org.jfree.chart.plot.Zoomable
      Overrides:
      isDomainZoomable in class org.jfree.chart.plot.XYPlot
      Returns:
      A boolean.
    • isRangeZoomable

      public boolean isRangeZoomable()
      Returns true
      Specified by:
      isRangeZoomable in interface org.jfree.chart.plot.Zoomable
      Overrides:
      isRangeZoomable in class org.jfree.chart.plot.XYPlot
      Returns:
      A boolean.
    • getSeriesCount

      public int getSeriesCount()
      Returns the number of series in the primary dataset for this plot. If the dataset is null, the method returns 0.
      Overrides:
      getSeriesCount in class org.jfree.chart.plot.XYPlot
      Returns:
      The series count.
    • getFixedLegendItems

      public org.jfree.chart.LegendItemCollection getFixedLegendItems()
      Returns the fixed legend items, if any.
      Overrides:
      getFixedLegendItems in class org.jfree.chart.plot.XYPlot
      Returns:
      The legend items (possibly null).
    • setFixedLegendItems

      public void setFixedLegendItems(org.jfree.chart.LegendItemCollection items)
      Sets the fixed legend items for the plot. Leave this set to null if you prefer the legend items to be created automatically.
      Overrides:
      setFixedLegendItems in class org.jfree.chart.plot.XYPlot
      Parameters:
      items - the legend items (null permitted).
    • getLegendItems

      public org.jfree.chart.LegendItemCollection getLegendItems()
      Returns the legend items for the plot. Each legend item is generated by the plot's renderer, since the renderer is responsible for the visual representation of the data.
      Specified by:
      getLegendItems in interface org.jfree.chart.LegendItemSource
      Overrides:
      getLegendItems in class org.jfree.chart.plot.XYPlot
      Returns:
      The legend items.
    • equals

      public boolean equals(Object obj)
      Tests this plot for equality with another object.
      Overrides:
      equals in class org.jfree.chart.plot.XYPlot
      Parameters:
      obj - the object (null permitted).
      Returns:
      true or false.
    • clone

      public Object clone() throws CloneNotSupportedException
      Returns a clone of the plot.
      Specified by:
      clone in interface org.jfree.util.PublicCloneable
      Overrides:
      clone in class org.jfree.chart.plot.XYPlot
      Returns:
      A clone.
      Throws:
      CloneNotSupportedException - this can occur if some component of the plot cannot be cloned.