|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.jrefinery.chart.AbstractXYItemRenderer
com.jrefinery.chart.StandardXYItemRenderer
public class 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 |
IMAGES
Useful constant for specifying the type of rendering (images only). |
protected java.awt.geom.Line2D |
line
A working line (to save creating thousands of instances). |
static int |
LINES
Useful constant for specifying the type of rendering (lines only). |
protected boolean |
plotImages
A flag indicating whether or not images are drawn between XY points. |
protected boolean |
plotLines
A flag indicating whether or not lines are drawn between XY points. |
protected boolean |
plotShapes
A flag indicating whether or not shapes are drawn at each XY point. |
static int |
SHAPES
Useful constant for specifying the type of rendering (shapes only). |
static int |
SHAPES_AND_LINES
Useful constant for specifying the type of rendering (shapes and lines). |
protected double |
shapeScale
Deprecated. Use getShapeScale() instead |
| Fields inherited from class com.jrefinery.chart.AbstractXYItemRenderer |
|---|
info, listeners, toolTipGenerator |
| Constructor Summary | |
|---|---|
StandardXYItemRenderer()
Constructs a new renderer. |
|
StandardXYItemRenderer(int type,
com.jrefinery.chart.tooltips.XYToolTipGenerator toolTipGenerator)
Constructs a new renderer. |
|
| Method Summary | |
|---|---|
void |
drawItem(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
ChartRenderingInfo info,
XYPlot plot,
ValueAxis horizontalAxis,
ValueAxis verticalAxis,
XYDataset data,
int series,
int item,
CrosshairInfo crosshairInfo)
Draws the visual representation of a single data item. |
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 |
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 java.awt.Shape |
getShape(Plot plot,
int series,
int item,
double x,
double y,
double scale)
Returns the shape used to draw a single data item. |
protected double |
getShapeScale(Plot plot,
int series,
int item,
double x,
double y)
Returns the shape scale of a single data item. |
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 |
| Methods inherited from class com.jrefinery.chart.AbstractXYItemRenderer |
|---|
addPropertyChangeListener, firePropertyChanged, getToolTipGenerator, initialise, removePropertyChangeListener, setToolTipGenerator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.jrefinery.chart.XYItemRenderer |
|---|
addPropertyChangeListener, getToolTipGenerator, initialise, removePropertyChangeListener, setToolTipGenerator |
| Field Detail |
|---|
public static final int SHAPES
public static final int LINES
public static final int SHAPES_AND_LINES
public static final int IMAGES
protected boolean plotShapes
protected boolean plotLines
protected boolean plotImages
protected double shapeScale
protected java.awt.geom.Line2D line
| Constructor Detail |
|---|
public StandardXYItemRenderer()
public StandardXYItemRenderer(int type,
com.jrefinery.chart.tooltips.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.| Method Detail |
|---|
public boolean getPlotShapes()
public boolean getPlotLines()
public boolean getPlotImages()
protected double getShapeScale(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 indexitem - The item indexx - The x value of the itemy - The y value of the item
protected java.awt.Shape getShape(Plot plot,
int series,
int item,
double x,
double y,
double scale)
plot - The plot (can be used to obtain standard color information etc).series - The series indexitem - The item indexx - The x value of the itemy - The y value of the itemscale - The scale used to draw the shape
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 indexitem - The item indexx - The x value of the itemy - 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
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 indexitem - The item indexx - The x value of the itemy - The y value of the item
protected java.awt.Paint getPaint(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 indexitem - The item indexx - The x value of the itemy - The y value of the item
public void drawItem(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
ChartRenderingInfo info,
XYPlot plot,
ValueAxis horizontalAxis,
ValueAxis verticalAxis,
XYDataset data,
int series,
int item,
CrosshairInfo crosshairInfo)
drawItem in interface XYItemRendererg2 - 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).horizontalAxis - The horizontal axis.verticalAxis - The vertical axis.data - The dataset.series - The series index.item - The item index.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||