|
Header
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
public class XYErrorRenderer
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:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jfree.chart.renderer.xy.XYLineAndShapeRenderer |
---|
XYLineAndShapeRenderer.State |
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 | |
---|---|
XYErrorRenderer()
Creates a new XYErrorRenderer instance. |
Method Summary | |
---|---|
void |
drawItem(java.awt.Graphics2D g2,
XYItemRendererState state,
java.awt.geom.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(java.lang.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. |
java.awt.Paint |
getErrorPaint()
Returns the paint used to draw the error bars. |
java.awt.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(java.awt.Paint paint)
Sets the paint used to draw the error bars and sends a RendererChangeEvent to all registered listeners. |
void |
setErrorStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the error bars and sends a RendererChangeEvent to all registered listeners. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.chart.LegendItemSource |
---|
getLegendItems |
Constructor Detail |
---|
public XYErrorRenderer()
XYErrorRenderer
instance.
Method Detail |
---|
public boolean getDrawXError()
setDrawXError(boolean)
public void setDrawXError(boolean draw)
RendererChangeEvent
to all registered listeners.
draw
- the flag value.getDrawXError()
public boolean getDrawYError()
setDrawYError(boolean)
public void setDrawYError(boolean draw)
RendererChangeEvent
to all registered listeners.
draw
- the flag value.getDrawYError()
public double getCapLength()
setCapLength(double)
public void setCapLength(double length)
RendererChangeEvent
to all registered listeners.
length
- the length (in Java2D units).getCapLength()
public java.awt.Paint getErrorPaint()
null
(the default), the item paint is used instead.
null
).setErrorPaint(Paint)
public void setErrorPaint(java.awt.Paint paint)
RendererChangeEvent
to all registered listeners.
paint
- the paint (null
permitted).getErrorPaint()
public java.awt.Stroke getErrorStroke()
null
(the default), the item outline stroke is used
instead.
null
).setErrorStroke(Stroke)
public void setErrorStroke(java.awt.Stroke stroke)
RendererChangeEvent
to all registered listeners.
stroke
- the stroke (null
permitted).getErrorStroke()
public Range findDomainBounds(XYDataset dataset)
findDomainBounds
in interface XYItemRenderer
findDomainBounds
in class AbstractXYItemRenderer
dataset
- the dataset (null
permitted).
null
if the dataset is
null
.AbstractXYItemRenderer.findRangeBounds(XYDataset)
public Range findRangeBounds(XYDataset dataset)
findRangeBounds
in interface XYItemRenderer
findRangeBounds
in class AbstractXYItemRenderer
dataset
- the dataset (null
permitted).
null
if the dataset is
null
.AbstractXYItemRenderer.findDomainBounds(XYDataset)
public void drawItem(java.awt.Graphics2D g2, XYItemRendererState state, java.awt.geom.Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass)
drawItem
in interface XYItemRenderer
drawItem
in class XYLineAndShapeRenderer
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(java.lang.Object obj)
equals
in class XYLineAndShapeRenderer
obj
- the object (null
permitted).
|
Footer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |