public class

SamplingXYLineRenderer

extends AbstractXYItemRenderer
implements Serializable Cloneable XYItemRenderer
java.lang.Object
   ↳ org.jfree.chart.renderer.AbstractRenderer
     ↳ org.jfree.chart.renderer.xy.AbstractXYItemRenderer
       ↳ org.jfree.chart.renderer.xy.SamplingXYLineRenderer

Class Overview

A renderer that... This renderer is designed for use with the XYPlot class.

Summary

Nested Classes
class SamplingXYLineRenderer.State Records the state for the renderer. 
[Expand]
Inherited Fields
From class org.jfree.chart.renderer.AbstractRenderer
Public Constructors
SamplingXYLineRenderer()
Creates a new renderer.
Public Methods
Object clone()
Returns a clone of the renderer.
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 of a single data item.
boolean equals(Object obj)
Tests this renderer for equality with an arbitrary object.
LegendItem getLegendItem(int datasetIndex, int series)
Returns a legend item for the specified series.
Shape getLegendLine()
Returns the shape used to represent a line in the legend.
int getPassCount()
Returns the number of passes through the data that the renderer requires in order to draw the chart.
XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info)
Initialises the renderer.
void setLegendLine(Shape line)
Sets the shape used as a line in each legend item and sends a RendererChangeEvent to all registered listeners.
[Expand]
Inherited Methods
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 SamplingXYLineRenderer ()

Creates a new renderer.

Public Methods

public Object clone ()

Returns a clone of the renderer.

Returns
  • A clone.
Throws
CloneNotSupportedException if the clone cannot be created.

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 of a single data item.

Parameters
g2 the graphics device.
state the renderer state.
dataArea the area within which the data is being drawn.
info collects information about the drawing.
plot the plot (can be used to obtain standard color information etc).
domainAxis the domain axis.
rangeAxis the range axis.
dataset the dataset.
series the series index (zero-based).
item the item index (zero-based).
crosshairState crosshair information for the plot (null permitted).
pass the pass index.

public boolean equals (Object obj)

Tests this renderer for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • true or false.

public LegendItem getLegendItem (int datasetIndex, int series)

Returns a legend item for the specified series.

Parameters
datasetIndex the dataset index (zero-based).
series the series index (zero-based).
Returns
  • A legend item for the series.

public Shape getLegendLine ()

Returns the shape used to represent a line in the legend.

Returns
  • The legend line (never null).

public int getPassCount ()

Returns the number of passes through the data that the renderer requires in order to draw the chart. Most charts will require a single pass, but some require two passes.

Returns
  • The pass count.

public XYItemRendererState initialise (Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info)

Initialises the renderer.

This method will be called before the first item is rendered, giving the renderer an opportunity to initialise any state information it wants to maintain. The renderer can do nothing if it chooses.

Parameters
g2 the graphics device.
dataArea the area inside the axes.
plot the plot.
data the data.
info an optional info collection object to return data back to the caller.
Returns
  • The renderer state.

public void setLegendLine (Shape line)

Sets the shape used as a line in each legend item and sends a RendererChangeEvent to all registered listeners.

Parameters
line the line (null not permitted).
See Also