Class SamplingXYLineRenderer

    • Field Detail

      • legendLine

        private transient java.awt.Shape legendLine
        The shape that is used to represent a line in the legend.
    • Constructor Detail

      • SamplingXYLineRenderer

        public SamplingXYLineRenderer()
        Creates a new renderer.
    • Method Detail

      • getPassCount

        public int getPassCount()
        Returns the number of passes through the data that the renderer requires in order to draw the chart. Most charts will require a single pass, but some require two passes.
        Specified by:
        getPassCount in interface XYItemRenderer
        Overrides:
        getPassCount in class AbstractXYItemRenderer
        Returns:
        The pass count.
      • initialise

        public XYItemRendererState initialise​(java.awt.Graphics2D g2,
                                              java.awt.geom.Rectangle2D dataArea,
                                              XYPlot plot,
                                              XYDataset data,
                                              PlotRenderingInfo info)
        Initialises the renderer.

        This method will be called before the first item is rendered, giving the renderer an opportunity to initialise any state information it wants to maintain. The renderer can do nothing if it chooses.

        Specified by:
        initialise in interface XYItemRenderer
        Overrides:
        initialise in class AbstractXYItemRenderer
        Parameters:
        g2 - the graphics device.
        dataArea - the area inside the axes.
        plot - the plot.
        data - the data.
        info - an optional info collection object to return data back to the caller.
        Returns:
        The renderer state.
      • drawItem

        public void drawItem​(java.awt.Graphics2D g2,
                             XYItemRendererState state,
                             java.awt.geom.Rectangle2D dataArea,
                             PlotRenderingInfo info,
                             XYPlot plot,
                             ValueAxis domainAxis,
                             ValueAxis rangeAxis,
                             XYDataset dataset,
                             int series,
                             int item,
                             CrosshairState crosshairState,
                             int pass)
        Draws the visual representation of a single data item.
        Specified by:
        drawItem in interface XYItemRenderer
        Parameters:
        g2 - the graphics device.
        state - the renderer state.
        dataArea - the area within which the data is being drawn.
        info - collects information about the drawing.
        plot - the plot (can be used to obtain standard color information etc).
        domainAxis - the domain axis.
        rangeAxis - the range axis.
        dataset - the dataset.
        series - the series index (zero-based).
        item - the item index (zero-based).
        crosshairState - crosshair information for the plot (null permitted).
        pass - the pass index.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Returns a clone of the renderer.
        Specified by:
        clone in interface PublicCloneable
        Overrides:
        clone in class AbstractXYItemRenderer
        Returns:
        A clone.
        Throws:
        java.lang.CloneNotSupportedException - if the clone cannot be created.
      • equals

        public boolean equals​(java.lang.Object obj)
        Tests this renderer for equality with an arbitrary object.
        Overrides:
        equals in class AbstractXYItemRenderer
        Parameters:
        obj - the object (null permitted).
        Returns:
        true or false.
      • readObject

        private void readObject​(java.io.ObjectInputStream stream)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Provides serialization support.
        Parameters:
        stream - the input stream.
        Throws:
        java.io.IOException - if there is an I/O error.
        java.lang.ClassNotFoundException - if there is a classpath problem.
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream stream)
                          throws java.io.IOException
        Provides serialization support.
        Parameters:
        stream - the output stream.
        Throws:
        java.io.IOException - if there is an I/O error.