org.jfree.chart.renderer.category

Class AreaRenderer

public class AreaRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable

A category item renderer that draws area charts. You can use this renderer with the CategoryPlot class.
Constructor Summary
AreaRenderer()
Creates a new renderer.
Method Summary
Objectclone()
Returns an independent copy of the renderer.
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 instance for equality with an arbitrary object.
AreaRendererEndTypegetEndType()
Returns a token that controls how the renderer draws the end points.
LegendItemgetLegendItem(int datasetIndex, int series)
Returns a legend item for a series.
voidsetEndType(AreaRendererEndType type)
Sets a token that controls how the renderer draws the end points, and sends a RendererChangeEvent to all registered listeners.

Constructor Detail

AreaRenderer

public AreaRenderer()
Creates a new renderer.

Method Detail

clone

public Object clone()
Returns an independent copy of the renderer.

Returns: A clone.

Throws: CloneNotSupportedException should not happen.

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 data plot area. plot the plot. domainAxis the domain axis. rangeAxis the range axis. dataset the dataset. row the row index (zero-based). column the column index (zero-based). pass the pass index.

equals

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

Parameters: obj the object to test (null permitted).

Returns: A boolean.

getEndType

public AreaRendererEndType getEndType()
Returns a token that controls how the renderer draws the end points. The default value is TAPER.

Returns: The end type (never null).

See Also: AreaRenderer

getLegendItem

public LegendItem getLegendItem(int datasetIndex, int series)
Returns a legend item for a series.

Parameters: datasetIndex the dataset index (zero-based). series the series index (zero-based).

Returns: The legend item.

setEndType

public void setEndType(AreaRendererEndType type)
Sets a token that controls how the renderer draws the end points, and sends a RendererChangeEvent to all registered listeners.

Parameters: type the end type (null not permitted).

See Also: getEndType