Documentation of 'org.jfree.chart.renderer.xy.XYErrorRenderer' Java class
XYErrorRenderer
org.jfree.chart.renderer.xy

Class XYErrorRenderer

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.EventListener, AnnotationChangeListener, LegendItemSource, XYItemRenderer, org.jfree.util.PublicCloneable


    public class XYErrorRenderer
    extends XYLineAndShapeRenderer
    A line and shape renderer that can also display x and/or y-error values. This renderer expects an IntervalXYDataset, otherwise it reverts to the behaviour of the super class. The example shown here is generated by the XYErrorRendererDemo1.java program included in the JFreeChart demo collection:

    XYErrorRendererSample.png
    Since:
    1.0.3
    See Also:
    Serialized Form
    • 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).
        Since:
        1.0.13
        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).
        Since:
        1.0.13
        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.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.