Class XYErrorRenderer

    • Field Detail

      • serialVersionUID

        static final long serialVersionUID
        For serialization.
        See Also:
        Constant Field Values
      • drawXError

        private boolean drawXError
        A flag that controls whether or not the x-error bars are drawn.
      • drawYError

        private boolean drawYError
        A flag that controls whether or not the y-error bars are drawn.
      • capLength

        private double capLength
        The length of the cap at the end of the error bars.
      • errorPaint

        private transient java.awt.Paint errorPaint
        The paint used to draw the error bars (if null we use the series paint).
      • errorStroke

        private transient java.awt.Stroke errorStroke
        The stroke used to draw the error bars (if null we use the series outline stroke).
    • Constructor Detail

      • XYErrorRenderer

        public XYErrorRenderer()
        Creates a new XYErrorRenderer instance.
    • Method Detail

      • getDrawXError

        public boolean getDrawXError()
        Returns the flag that controls whether or not the renderer draws error bars for the x-values.
        Returns:
        A boolean.
        See Also:
        setDrawXError(boolean)
      • setDrawXError

        public void setDrawXError​(boolean draw)
        Sets the flag that controls whether or not the renderer draws error bars for the x-values and, if the flag changes, sends a RendererChangeEvent to all registered listeners.
        Parameters:
        draw - the flag value.
        See Also:
        getDrawXError()
      • getDrawYError

        public boolean getDrawYError()
        Returns the flag that controls whether or not the renderer draws error bars for the y-values.
        Returns:
        A boolean.
        See Also:
        setDrawYError(boolean)
      • setDrawYError

        public void setDrawYError​(boolean draw)
        Sets the flag that controls whether or not the renderer draws error bars for the y-values and, if the flag changes, sends a RendererChangeEvent to all registered listeners.
        Parameters:
        draw - the flag value.
        See Also:
        getDrawYError()
      • getCapLength

        public double getCapLength()
        Returns the length (in Java2D units) of the cap at the end of the error bars.
        Returns:
        The cap length.
        See Also:
        setCapLength(double)
      • setCapLength

        public void setCapLength​(double length)
        Sets the length of the cap at the end of the error bars, and sends a RendererChangeEvent to all registered listeners.
        Parameters:
        length - the length (in Java2D units).
        See Also:
        getCapLength()
      • getErrorPaint

        public java.awt.Paint getErrorPaint()
        Returns the paint used to draw the error bars. If this is null (the default), the item paint is used instead.
        Returns:
        The paint (possibly null).
        See Also:
        setErrorPaint(Paint)
      • setErrorPaint

        public void setErrorPaint​(java.awt.Paint paint)
        Sets the paint used to draw the error bars and sends a RendererChangeEvent to all registered listeners.
        Parameters:
        paint - the paint (null permitted).
        See Also:
        getErrorPaint()
      • getErrorStroke

        public java.awt.Stroke getErrorStroke()
        Returns the stroke used to draw the error bars. If this is null (the default), the item outline stroke is used instead.
        Returns:
        The stroke (possibly null).
        See Also:
        setErrorStroke(Stroke)
      • setErrorStroke

        public void setErrorStroke​(java.awt.Stroke stroke)
        Sets the stroke used to draw the error bars and sends a RendererChangeEvent to all registered listeners.
        Parameters:
        stroke - the stroke (null permitted).
        See Also:
        getErrorStroke()
      • 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 for one data item.
        Specified by:
        drawItem in interface XYItemRenderer
        Overrides:
        drawItem in class XYLineAndShapeRenderer
        Parameters:
        g2 - the graphics output target.
        state - the renderer state.
        dataArea - the data area.
        info - the plot rendering info.
        plot - the plot.
        domainAxis - the domain axis.
        rangeAxis - the range axis.
        dataset - the dataset.
        series - the series index.
        item - the item index.
        crosshairState - the crosshair state.
        pass - the pass index.
      • equals

        public boolean equals​(java.lang.Object obj)
        Tests this instance for equality with an arbitrary object.
        Overrides:
        equals in class XYLineAndShapeRenderer
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.
      • 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.