|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.chart.renderer.AbstractRenderer
org.jfree.chart.renderer.AbstractXYItemRenderer
A base class that can be used to create new XYItemRenderer
implementations.
Field Summary |
Fields inherited from class org.jfree.chart.renderer.AbstractRenderer |
DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO |
Constructor Summary | |
protected |
AbstractXYItemRenderer()
Default constructor. |
protected |
AbstractXYItemRenderer(XYToolTipGenerator toolTipGenerator)
Deprecated. Use default constructor then set tooltip generator. |
protected |
AbstractXYItemRenderer(XYToolTipGenerator toolTipGenerator,
XYURLGenerator urlGenerator)
Deprecated. Use default constructor then set URL generator. |
protected |
AbstractXYItemRenderer(XYURLGenerator urlGenerator)
Deprecated. Use default constructor then set URL generator. |
Method Summary | |
protected java.lang.Object |
clone()
Returns a clone of the renderer. |
void |
drawDomainGridLine(java.awt.Graphics2D g2,
XYPlot plot,
ValueAxis axis,
java.awt.geom.Rectangle2D dataArea,
double value)
Draws a grid line against the range axis. |
void |
drawDomainMarker(java.awt.Graphics2D g2,
XYPlot plot,
ValueAxis domainAxis,
Marker marker,
java.awt.geom.Rectangle2D dataArea)
Draws a vertical line on the chart to represent a 'range marker'. |
void |
drawRangeGridLine(java.awt.Graphics2D g2,
XYPlot plot,
ValueAxis axis,
java.awt.geom.Rectangle2D dataArea,
double value)
Draws a grid line against the range axis. |
void |
drawRangeMarker(java.awt.Graphics2D g2,
XYPlot plot,
ValueAxis rangeAxis,
Marker marker,
java.awt.geom.Rectangle2D dataArea)
Draws a horizontal line across the chart to represent a 'range marker'. |
boolean |
equals(java.lang.Object obj)
Tests this renderer for equality with another object. |
void |
fillDomainGridBand(java.awt.Graphics2D g2,
XYPlot plot,
ValueAxis axis,
java.awt.geom.Rectangle2D dataArea,
double start,
double end)
Fills a band between two values on the axis. |
void |
fillRangeGridBand(java.awt.Graphics2D g2,
XYPlot plot,
ValueAxis axis,
java.awt.geom.Rectangle2D dataArea,
double start,
double end)
Fills a band between two values on the range axis. |
DrawingSupplier |
getDrawingSupplier()
Returns the drawing supplier from the plot. |
LegendItem |
getLegendItem(int datasetIndex,
int series)
Returns a legend item for a series. |
int |
getPassCount()
Returns the number of passes through the data that the renderer requires in order to draw the chart. |
XYPlot |
getPlot()
Returns the plot that the renderer is assigned to. |
RangeType |
getRangeType()
Returns the range type for the renderer. |
XYToolTipGenerator |
getToolTipGenerator()
Returns the tool tip generator. |
XYURLGenerator |
getURLGenerator()
Returns the URL generator for HTML image maps. |
XYItemRendererState |
initialise(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
XYPlot plot,
XYDataset data,
PlotRenderingInfo info)
Initialises the renderer. |
void |
setPlot(XYPlot plot)
Sets the plot that the renderer is assigned to. |
void |
setToolTipGenerator(XYToolTipGenerator generator)
Sets the tool tip generator. |
void |
setURLGenerator(XYURLGenerator urlGenerator)
Sets the URL generator for HTML image maps. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.chart.renderer.XYItemRenderer |
addPropertyChangeListener, drawItem, getBaseStroke, getItemOutlinePaint, getItemPaint, getItemShape, getItemStroke, getSeriesOutlinePaint, getSeriesPaint, getSeriesShape, getSeriesStroke, removePropertyChangeListener, setBaseStroke, setSeriesPaint, setSeriesStroke, setStroke |
Constructor Detail |
protected AbstractXYItemRenderer()
protected AbstractXYItemRenderer(XYToolTipGenerator toolTipGenerator)
Storage is allocated for property change listeners.
toolTipGenerator
- the tooltip generator (null
permitted).protected AbstractXYItemRenderer(XYURLGenerator urlGenerator)
Storage is allocated for property change listeners.
urlGenerator
- the URL generator (null
permitted).protected AbstractXYItemRenderer(XYToolTipGenerator toolTipGenerator, XYURLGenerator urlGenerator)
Storage is allocated for property change listeners.
toolTipGenerator
- the tooltip generator (null
permitted).urlGenerator
- the URL generator (null
permitted).Method Detail |
public int getPassCount()
getPassCount
in interface XYItemRenderer
public XYPlot getPlot()
getPlot
in interface XYItemRenderer
public void setPlot(XYPlot plot)
setPlot
in interface XYItemRenderer
plot
- the plot.public XYItemRendererState initialise(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info)
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.
initialise
in interface XYItemRenderer
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.
public XYToolTipGenerator getToolTipGenerator()
getToolTipGenerator
in interface XYItemRenderer
null
).public void setToolTipGenerator(XYToolTipGenerator generator)
setToolTipGenerator
in interface XYItemRenderer
generator
- the tool tip generator (null
permitted).public XYURLGenerator getURLGenerator()
getURLGenerator
in interface XYItemRenderer
null
).public void setURLGenerator(XYURLGenerator urlGenerator)
setURLGenerator
in interface XYItemRenderer
urlGenerator
- the URL generator (null
permitted).public RangeType getRangeType()
The default implementation returns STANDARD
, subclasses may override this
behaviour.
The XYPlot
uses this information when auto-calculating
the range for the axis.
getRangeType
in interface XYItemRenderer
public LegendItem getLegendItem(int datasetIndex, int series)
getLegendItem
in interface XYItemRenderer
datasetIndex
- the dataset index (zero-based).series
- the series index (zero-based).
public void fillDomainGridBand(java.awt.Graphics2D g2, XYPlot plot, ValueAxis axis, java.awt.geom.Rectangle2D dataArea, double start, double end)
fillDomainGridBand
in interface XYItemRenderer
g2
- the graphics device.plot
- the plot.axis
- the domain axis.dataArea
- the data area.start
- the start value.end
- the end value.public void fillRangeGridBand(java.awt.Graphics2D g2, XYPlot plot, ValueAxis axis, java.awt.geom.Rectangle2D dataArea, double start, double end)
fillRangeGridBand
in interface XYItemRenderer
g2
- the graphics device.plot
- the plot.axis
- the range axis.dataArea
- the data area.start
- the start value.end
- the end value.public void drawDomainGridLine(java.awt.Graphics2D g2, XYPlot plot, ValueAxis axis, java.awt.geom.Rectangle2D dataArea, double value)
drawDomainGridLine
in interface XYItemRenderer
g2
- the graphics device.plot
- the plot.axis
- the value axis.dataArea
- the area for plotting data (not yet adjusted for any 3D effect).value
- the value at which the grid line should be drawn.public void drawRangeGridLine(java.awt.Graphics2D g2, XYPlot plot, ValueAxis axis, java.awt.geom.Rectangle2D dataArea, double value)
drawRangeGridLine
in interface XYItemRenderer
g2
- the graphics device.plot
- the plot.axis
- the value axis.dataArea
- the area for plotting data (not yet adjusted for any 3D effect).value
- the value at which the grid line should be drawn.public void drawDomainMarker(java.awt.Graphics2D g2, XYPlot plot, ValueAxis domainAxis, Marker marker, java.awt.geom.Rectangle2D dataArea)
drawDomainMarker
in interface XYItemRenderer
g2
- the graphics device.plot
- the plot.domainAxis
- the domain axis.marker
- the marker line.dataArea
- the axis data area.public void drawRangeMarker(java.awt.Graphics2D g2, XYPlot plot, ValueAxis rangeAxis, Marker marker, java.awt.geom.Rectangle2D dataArea)
drawRangeMarker
in interface XYItemRenderer
g2
- the graphics device.plot
- the plot.rangeAxis
- the range axis.marker
- the marker line.dataArea
- the axis data area.protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractRenderer
java.lang.CloneNotSupportedException
- if the renderer does not support cloning.public boolean equals(java.lang.Object obj)
equals
in class AbstractRenderer
obj
- the object.
true
or false
.public DrawingSupplier getDrawingSupplier()
getDrawingSupplier
in class AbstractRenderer
null
).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |