public class

XYErrorRenderer

extends XYLineAndShapeRenderer
java.lang.Object
   ↳ org.jfree.chart.renderer.AbstractRenderer
     ↳ org.jfree.chart.renderer.xy.AbstractXYItemRenderer
       ↳ org.jfree.chart.renderer.xy.XYLineAndShapeRenderer
         ↳ org.jfree.chart.renderer.xy.XYErrorRenderer

Class Overview

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

Summary

[Expand]
Inherited Fields
From class org.jfree.chart.renderer.AbstractRenderer
Public Constructors
XYErrorRenderer()
Creates a new XYErrorRenderer instance.
Public Methods
void drawItem(Graphics2D g2, XYItemRendererState state, 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.
boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.
Range findDomainBounds(XYDataset dataset)
Returns the range required by this renderer to display all the domain values in the specified dataset.
Range findRangeBounds(XYDataset dataset)
Returns the range required by this renderer to display all the range values in the specified dataset.
double getCapLength()
Returns the length (in Java2D units) of the cap at the end of the error bars.
boolean getDrawXError()
Returns the flag that controls whether or not the renderer draws error bars for the x-values.
boolean getDrawYError()
Returns the flag that controls whether or not the renderer draws error bars for the y-values.
Paint getErrorPaint()
Returns the paint used to draw the error bars.
Stroke getErrorStroke()
Returns the stroke used to draw the error bars.
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.
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.
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.
void setErrorPaint(Paint paint)
Sets the paint used to draw the error bars and sends a RendererChangeEvent to all registered listeners.
void setErrorStroke(Stroke stroke)
Sets the stroke used to draw the error bars and sends a RendererChangeEvent to all registered listeners.
[Expand]
Inherited Methods
From class org.jfree.chart.renderer.xy.XYLineAndShapeRenderer
From class org.jfree.chart.renderer.xy.AbstractXYItemRenderer
From class org.jfree.chart.renderer.AbstractRenderer
From class java.lang.Object
From interface org.jfree.chart.LegendItemSource
From interface org.jfree.chart.renderer.xy.XYItemRenderer

Public Constructors

public XYErrorRenderer ()

Creates a new XYErrorRenderer instance.

Public Methods

public void drawItem (Graphics2D g2, XYItemRendererState state, 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.

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.

public boolean equals (Object obj)

Tests this instance for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public Range findDomainBounds (XYDataset dataset)

Returns the range required by this renderer to display all the domain values in the specified dataset.

Parameters
dataset the dataset (null permitted).
Returns
  • The range, or null if the dataset is null.

public Range findRangeBounds (XYDataset dataset)

Returns the range required by this renderer to display all the range values in the specified dataset.

Parameters
dataset the dataset (null permitted).
Returns
  • The range, or null if the dataset is null.

public double getCapLength ()

Returns the length (in Java2D units) of the cap at the end of the error bars.

Returns
  • The cap length.

public boolean getDrawXError ()

Returns the flag that controls whether or not the renderer draws error bars for the x-values.

Returns
  • A boolean.

public boolean getDrawYError ()

Returns the flag that controls whether or not the renderer draws error bars for the y-values.

Returns
  • A boolean.

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

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

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

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

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

public void setErrorPaint (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

public void setErrorStroke (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