org.jfree.chart.renderer.category

Class StatisticalLineAndShapeRenderer

public class StatisticalLineAndShapeRenderer extends LineAndShapeRenderer implements Cloneable, PublicCloneable, Serializable

A renderer that draws shapes for each data item, and lines between data items. Each point has a mean value and a standard deviation line. For use with the CategoryPlot class. The example shown here is generated by the StatisticalLineChartDemo1.java program included in the JFreeChart Demo Collection:

StatisticalLineRendererSample.png
Constructor Summary
StatisticalLineAndShapeRenderer()
Constructs a default renderer (draws shapes and lines).
StatisticalLineAndShapeRenderer(boolean linesVisible, boolean shapesVisible)
Constructs a new renderer.
Method Summary
voiddrawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass)
Draw a single data item.
booleanequals(Object obj)
Tests this renderer for equality with an arbitrary object.
RangefindRangeBounds(CategoryDataset dataset)
Returns the range of values the renderer requires to display all the items from the specified dataset.
PaintgetErrorIndicatorPaint()
Returns the paint used for the error indicators.
StrokegetErrorIndicatorStroke()
Returns the stroke used for the error indicators.
inthashCode()
Returns a hash code for this instance.
voidsetErrorIndicatorPaint(Paint paint)
Sets the paint used for the error indicators (if null, the item paint is used instead) and sends a RendererChangeEvent to all registered listeners.
voidsetErrorIndicatorStroke(Stroke stroke)
Sets the stroke used for the error indicators (if null, the item outline stroke is used instead) and sends a RendererChangeEvent to all registered listeners.

Constructor Detail

StatisticalLineAndShapeRenderer

public StatisticalLineAndShapeRenderer()
Constructs a default renderer (draws shapes and lines).

StatisticalLineAndShapeRenderer

public StatisticalLineAndShapeRenderer(boolean linesVisible, boolean shapesVisible)
Constructs a new renderer.

Parameters: linesVisible draw lines? shapesVisible draw shapes?

Method Detail

drawItem

public void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass)
Draw a single data item.

Parameters: g2 the graphics device. state the renderer state. dataArea the area in which the data is drawn. plot the plot. domainAxis the domain axis. rangeAxis the range axis. dataset the dataset (a StatisticalCategoryDataset is required). row the row index (zero-based). column the column index (zero-based). pass the pass.

equals

public boolean equals(Object obj)
Tests this renderer for equality with an arbitrary object.

Parameters: obj the object (null permitted).

Returns: A boolean.

findRangeBounds

public Range findRangeBounds(CategoryDataset dataset)
Returns the range of values the renderer requires to display all the items from the specified dataset.

Parameters: dataset the dataset (null permitted).

Returns: The range (or null if the dataset is null or empty).

getErrorIndicatorPaint

public Paint getErrorIndicatorPaint()
Returns the paint used for the error indicators.

Returns: The paint used for the error indicators (possibly null).

See Also: setErrorIndicatorPaint

getErrorIndicatorStroke

public Stroke getErrorIndicatorStroke()
Returns the stroke used for the error indicators.

Returns: The stroke used for the error indicators (possibly null).

Since: 1.0.13

See Also:

hashCode

public int hashCode()
Returns a hash code for this instance.

Returns: A hash code.

setErrorIndicatorPaint

public void setErrorIndicatorPaint(Paint paint)
Sets the paint used for the error indicators (if null, the item paint is used instead) and sends a RendererChangeEvent to all registered listeners.

Parameters: paint the paint (null permitted).

See Also: getErrorIndicatorPaint

setErrorIndicatorStroke

public void setErrorIndicatorStroke(Stroke stroke)
Sets the stroke used for the error indicators (if null, the item outline stroke is used instead) and sends a RendererChangeEvent to all registered listeners.

Parameters: stroke the stroke (null permitted).

Since: 1.0.13

See Also:

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.