|
||||||||||
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.AbstractXYItemRenderer | +--org.jfree.chart.renderer.StandardXYItemRenderer
Standard item renderer for an XYPlot
. This class can draw (a) shapes at
each point, or (b) lines between points, or (c) both shapes and lines.
Field Summary | |
static int |
DISCONTINUOUS
Constant for the type of rendering (discontinuous lines). |
static int |
DISCONTINUOUS_LINES
Constant for the type of rendering (discontinuous lines). |
static int |
IMAGES
Constant for the type of rendering (images only). |
static int |
LINES
Constant for the type of rendering (lines only). |
static int |
SHAPES
Constant for the type of rendering (shapes only). |
static int |
SHAPES_AND_LINES
Constant for the type of rendering (shapes and lines). |
Fields inherited from class org.jfree.chart.renderer.AbstractRenderer |
DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE |
Constructor Summary | |
StandardXYItemRenderer()
Constructs a new renderer. |
|
StandardXYItemRenderer(int type)
Constructs a new renderer. |
|
StandardXYItemRenderer(int type,
XYToolTipGenerator toolTipGenerator)
Constructs a new renderer. |
|
StandardXYItemRenderer(int type,
XYToolTipGenerator toolTipGenerator,
XYURLGenerator urlGenerator)
Constructs a new renderer. |
Method Summary | |
void |
drawItem(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
ChartRenderingInfo info,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset dataset,
int datasetIndex,
int series,
int item,
CrosshairInfo crosshairInfo)
Draws the visual representation of a single data item. |
boolean |
equals(java.lang.Object obj)
Tests this renderer for equality with another object. |
boolean |
getDefaultShapeFilled()
Returns the default value returned by the isShapeFilled(...) method. |
double |
getGapThreshold()
Returns the gap threshold for discontinuous lines. |
protected java.awt.Image |
getImage(Plot plot,
int series,
int item,
double x,
double y)
Returns the image used to draw a single data item. |
protected java.awt.Point |
getImageHotspot(Plot plot,
int series,
int item,
double x,
double y,
java.awt.Image image)
Returns the hotspot of the image used to draw a single data item. |
protected java.awt.Paint |
getPaint(Plot plot,
int series,
int item,
double x,
double y)
Returns the paint used to draw a single data item. |
boolean |
getPlotDiscontinuous()
Returns true if lines should be discontinuous. |
boolean |
getPlotImages()
Returns true if images are being plotted by the renderer. |
boolean |
getPlotLines()
Returns true if lines are being plotted by the renderer. |
boolean |
getPlotShapes()
Returns true if shapes are being plotted by the renderer. |
protected boolean |
isShapeFilled(Plot plot,
int series,
int item,
double x,
double y)
Is used to determine if a shape is filled when drawn or not |
void |
setDefaultShapeFilled(boolean flag)
Sets the default shape filled flag. |
void |
setGapThreshold(double t)
Sets the gap threshold for discontinuous lines. |
void |
setPlotImages(boolean flag)
Sets the flag that controls whether or not an image is drawn at each data point. |
void |
setPlotLines(boolean flag)
Sets the flag that controls whether or not a line is plotted between each data point. |
void |
setPlotShapes(boolean flag)
Sets the flag that controls whether or not a shape is plotted at each data point. |
Methods inherited from class org.jfree.chart.renderer.AbstractXYItemRenderer |
drawDomainGridLine, drawDomainMarker, drawRangeGridLine, drawRangeMarker, getLegendItem, getToolTipGenerator, getURLGenerator, initialise, setToolTipGenerator, setURLGenerator |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.chart.renderer.XYItemRenderer |
addPropertyChangeListener, drawDomainGridLine, drawDomainMarker, drawRangeGridLine, drawRangeMarker, getItemOutlinePaint, getItemPaint, getItemShape, getItemStroke, getLegendItem, getPlot, getSeriesOutlinePaint, getSeriesPaint, getSeriesShape, getSeriesStroke, getToolTipGenerator, getURLGenerator, initialise, removePropertyChangeListener, setDrawingSupplier, setPlot, setSeriesPaint, setSeriesPaint, setToolTipGenerator, setURLGenerator |
Field Detail |
public static final int SHAPES
public static final int LINES
public static final int SHAPES_AND_LINES
public static final int IMAGES
public static final int DISCONTINUOUS
public static final int DISCONTINUOUS_LINES
Constructor Detail |
public StandardXYItemRenderer()
public StandardXYItemRenderer(int type)
To specify the type of renderer, use one of the constants: SHAPES, LINES or SHAPES_AND_LINES.
type
- the type.public StandardXYItemRenderer(int type, XYToolTipGenerator toolTipGenerator)
To specify the type of renderer, use one of the constants: SHAPES, LINES or SHAPES_AND_LINES.
type
- the type of renderer.toolTipGenerator
- the tooltip generator.public StandardXYItemRenderer(int type, XYToolTipGenerator toolTipGenerator, XYURLGenerator urlGenerator)
To specify the type of renderer, use one of the constants: SHAPES, LINES or SHAPES_AND_LINES.
type
- the type of renderer.toolTipGenerator
- the tooltip generator.urlGenerator
- the URL generator.Method Detail |
public boolean getPlotShapes()
true
if shapes are being plotted by the renderer.public void setPlotShapes(boolean flag)
flag
- the flag.public boolean getDefaultShapeFilled()
The renderer will call isShapeFilled(...) to determine whether or not to fill a shape. Unless overridden, the isShapeFilled(...) method just returns the default shape filled flag.
public void setDefaultShapeFilled(boolean flag)
flag
- the flag.public boolean getPlotLines()
true
if lines are being plotted by the renderer.public void setPlotLines(boolean flag)
flag
- the flag.public double getGapThreshold()
public void setGapThreshold(double t)
t
- the threshold.public boolean getPlotImages()
true
if images are being plotted by the renderer.public void setPlotImages(boolean flag)
flag
- the flag.public boolean getPlotDiscontinuous()
true
if images are being plotted by the renderer.public void drawItem(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, ChartRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int datasetIndex, int series, int item, CrosshairInfo crosshairInfo)
drawItem
in interface XYItemRenderer
g2
- the graphics device.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 (horizontal) axis.rangeAxis
- the range (vertical) axis.dataset
- the dataset.datasetIndex
- the dataset index (zero-based).series
- the series index (zero-based).item
- the item index (zero-based).crosshairInfo
- information about crosshairs on a plot.protected boolean isShapeFilled(Plot plot, int series, int item, double x, double y)
plot
- the plot (can be used to obtain standard color information etc).series
- the series index.item
- the item index.x
- the x value of the item.y
- the y value of the item.
true
if the shape used to draw the data item should be filled.protected java.awt.Paint getPaint(Plot plot, int series, int item, double x, double y)
If null is returned, the renderer defaults to the paint for the current series.
plot
- the plot (can be used to obtain standard color information etc).series
- the series index.item
- the item index.x
- the x value of the item.y
- the y value of the item.
protected java.awt.Image getImage(Plot plot, int series, int item, double x, double y)
plot
- the plot (can be used to obtain standard color information etc).series
- the series index.item
- the item index.x
- the x value of the item.y
- the y value of the item.
protected java.awt.Point getImageHotspot(Plot plot, int series, int item, double x, double y, java.awt.Image image)
plot
- the plot (can be used to obtain standard color information etc).image
- the image (can be used to get size information about the image)series
- the series indexitem
- the item indexx
- the x value of the itemy
- the y value of the item
public boolean equals(java.lang.Object obj)
equals
in class AbstractXYItemRenderer
obj
- the object.
true
or false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |