|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.chart.AbstractRenderer | +--com.jrefinery.chart.AbstractCategoryItemRenderer | +--com.jrefinery.chart.LineAndShapeRenderer
A renderer for a CategoryPlot that draws shapes for each data item, and lines between data items.
The renderer is immutable so that the only way to change the renderer for a plot is to call the setRenderer() method.
Field Summary | |
static int |
BOTTOM
Constant indicating that labels are to be shown below data points |
static int |
LEFT
Constant indicating that labels are to be shown left of data points |
static int |
LINES
Useful constant for specifying the type of rendering (lines only). |
static int |
RIGHT
Constant indicating that labels are to be shown right of data points |
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). |
static int |
TOP
Constant indicating that labels are to be shown above data points |
Constructor Summary | |
LineAndShapeRenderer()
Constructs a default renderer (draws shapes and lines). |
|
LineAndShapeRenderer(int type)
Constructs a renderer of the specified type. |
|
LineAndShapeRenderer(int type,
int labelPosition)
Constructs a renderer of the specified type. |
|
LineAndShapeRenderer(int type,
int labelPosition,
CategoryToolTipGenerator toolTipGenerator,
CategoryURLGenerator urlGenerator)
Constructs a renderer of the specified type. |
Method Summary | |
void |
drawCategoryItem(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
ValueAxis axis,
CategoryDataset data,
int series,
java.lang.Object category,
int categoryIndex,
java.lang.Object previousCategory)
Draw a single data item. |
void |
drawRangeMarker(java.awt.Graphics2D g2,
CategoryPlot plot,
ValueAxis axis,
Marker marker,
java.awt.geom.Rectangle2D axisDataArea,
java.awt.Shape dataClipRegion)
Draws a horizontal line across the chart to represent the marker. |
java.awt.geom.Rectangle2D |
getAxisArea(java.awt.geom.Rectangle2D plotArea)
Returns the area that the axes must fit into. |
Methods inherited from class com.jrefinery.chart.AbstractCategoryItemRenderer |
drawPlotBackground, getCategoriesPaint, getCategoryPaint, getDataClipRegion, getLegendItem, getPlot, getToolTipGenerator, getURLGenerator, getUseCategoriesPaint, initialise, isStacked, setCategoriesPaint, setPlot, setToolTipGenerator, setURLGenerator |
Methods inherited from class com.jrefinery.chart.AbstractRenderer |
addPropertyChangeListener, firePropertyChanged, getInfo, removePropertyChangeListener, setInfo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SHAPES
public static final int LINES
public static final int SHAPES_AND_LINES
public static final int TOP
public static final int BOTTOM
public static final int LEFT
public static final int RIGHT
Constructor Detail |
public LineAndShapeRenderer()
public LineAndShapeRenderer(int type)
Use one of the constants SHAPES, LINES or SHAPES_AND_LINES.
type
- the type of renderer.public LineAndShapeRenderer(int type, int labelPosition)
Use one of the constants SHAPES, LINES or SHAPES_AND_LINES.
type
- the type of renderer.labelPosition
- location of labels (if shown) relative to the data points
(TOP, BOTTOM, LEFT, or RIGHT).public LineAndShapeRenderer(int type, int labelPosition, CategoryToolTipGenerator toolTipGenerator, CategoryURLGenerator urlGenerator)
Use one of the constants SHAPES, LINES or SHAPES_AND_LINES.
type
- the type of renderer.labelPosition
- location of labels (if shown) relative to the data points
(TOP, BOTTOM, LEFT, or RIGHT).toolTipGenerator
- the tool tip generator (null permitted).urlGenerator
- the URL generator (null permitted).Method Detail |
public java.awt.geom.Rectangle2D getAxisArea(java.awt.geom.Rectangle2D plotArea)
getAxisArea
in class AbstractCategoryItemRenderer
plotArea
- the plotArea.public void drawRangeMarker(java.awt.Graphics2D g2, CategoryPlot plot, ValueAxis axis, Marker marker, java.awt.geom.Rectangle2D axisDataArea, java.awt.Shape dataClipRegion)
g2
- the graphics device.plot
- the plot.axis
- the value axis.marker
- the marker line.axisDataArea
- the axis data area.dataClipRegion
- the data clip region.public void drawCategoryItem(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, ValueAxis axis, CategoryDataset data, int series, java.lang.Object category, int categoryIndex, java.lang.Object previousCategory)
g2
- the graphics device.dataArea
- the area in which the data is drawn.plot
- the plot.axis
- the range axis.data
- the data.series
- the series number (zero-based index).category
- the category.categoryIndex
- the category number (zero-based index).previousCategory
- the previous category (null when the first category is drawn).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |