org.jfree.chart.renderer.category

Class LineRenderer3D

Implemented Interfaces:
Cloneable, CategoryItemRenderer, Effect3D, PublicCloneable, Serializable, LegendItemSource

public class LineRenderer3D
extends LineAndShapeRenderer
implements Effect3D, Serializable

A line renderer with a 3D effect.

Field Summary

static Paint
DEFAULT_WALL_PAINT
The default wall paint.
static double
DEFAULT_X_OFFSET
The default x-offset for the 3D effect.
static double
DEFAULT_Y_OFFSET
The default y-offset for the 3D effect.

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

LineRenderer3D()
Creates a new renderer.

Method Summary

void
drawBackground(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea)
Draws the background for the plot.
void
drawDomainGridline(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea, double value)
Draws a grid line against the domain axis.
void
drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass)
Draw a single data item.
void
drawOutline(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea)
Draws the outline for the plot.
void
drawRangeGridline(Graphics2D g2, CategoryPlot plot, ValueAxis axis, Rectangle2D dataArea, double value)
Draws a grid line against the range axis.
void
drawRangeMarker(Graphics2D g2, CategoryPlot plot, ValueAxis axis, Marker marker, Rectangle2D dataArea)
Draws a range marker.
boolean
equals(Object obj)
Checks this renderer for equality with an arbitrary object.
Paint
getWallPaint()
Returns the paint used to highlight the left and bottom wall in the plot background.
double
getXOffset()
Returns the x-offset for the 3D effect.
double
getYOffset()
Returns the y-offset for the 3D effect.
void
setWallPaint(Paint paint)
Sets the paint used to hightlight the left and bottom walls in the plot background, and sends a RendererChangeEvent to all registered listeners.
void
setXOffset(double xOffset)
Sets the x-offset and sends a RendererChangeEvent to all registered listeners.
void
setYOffset(double yOffset)
Sets the y-offset and sends a RendererChangeEvent to all registered listeners.

Methods inherited from class org.jfree.chart.renderer.category.LineAndShapeRenderer

clone, drawItem, equals, getBaseLinesVisible, getBaseShapesFilled, getBaseShapesVisible, getDrawOutlines, getItemLineVisible, getItemShapeFilled, getItemShapeVisible, getLegendItem, getLinesVisible, getPassCount, getSeriesLinesVisible, getSeriesShapesFilled, getSeriesShapesVisible, getShapesFilled, getShapesVisible, getUseFillPaint, getUseOutlinePaint, setBaseLinesVisible, setBaseShapesFilled, setBaseShapesVisible, setDrawOutlines, setLinesVisible, setLinesVisible, setSeriesLinesVisible, setSeriesLinesVisible, setSeriesShapesFilled, setSeriesShapesFilled, setSeriesShapesVisible, setSeriesShapesVisible, setShapesFilled, setShapesFilled, setShapesVisible, setShapesVisible, setUseFillPaint, setUseOutlinePaint

Methods inherited from class org.jfree.chart.renderer.category.AbstractCategoryItemRenderer

addItemEntity, calculateDomainMarkerTextAnchorPoint, calculateRangeMarkerTextAnchorPoint, clone, createState, drawBackground, drawDomainGridline, drawDomainMarker, drawItemLabel, drawOutline, drawRangeGridline, drawRangeMarker, equals, findRangeBounds, getBaseItemLabelGenerator, getBaseItemURLGenerator, getBaseToolTipGenerator, getColumnCount, getDomainAxis, getDrawingSupplier, getItemLabelGenerator, getItemURLGenerator, getLegendItem, getLegendItemLabelGenerator, getLegendItemToolTipGenerator, getLegendItemURLGenerator, getLegendItems, getPassCount, getPlot, getRangeAxis, getRowCount, getSeriesItemLabelGenerator, getSeriesItemURLGenerator, getSeriesToolTipGenerator, getToolTipGenerator, getToolTipGenerator, hashCode, initialise, setBaseItemLabelGenerator, setBaseItemURLGenerator, setBaseToolTipGenerator, setItemLabelGenerator, setItemURLGenerator, setLegendItemLabelGenerator, setLegendItemToolTipGenerator, setLegendItemURLGenerator, setPlot, setSeriesItemLabelGenerator, setSeriesItemURLGenerator, setSeriesToolTipGenerator, setToolTipGenerator

Methods inherited from class org.jfree.chart.renderer.AbstractRenderer

addChangeListener, calculateLabelAnchorPoint, clone, equals, fireChangeEvent, getBaseCreateEntities, getBaseFillPaint, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getCreateEntities, getDrawingSupplier, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, hasListener, hashCode, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, notifyListeners, removeChangeListener, setBaseCreateEntities, setBaseCreateEntities, setBaseFillPaint, setBaseFillPaint, setBaseItemLabelFont, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlinePaint, setBaseOutlineStroke, setBaseOutlineStroke, setBasePaint, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseShape, setBaseStroke, setBaseStroke, setCreateEntities, setCreateEntities, setFillPaint, setFillPaint, setItemLabelAnchorOffset, setItemLabelFont, setItemLabelFont, setItemLabelPaint, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlinePaint, setOutlineStroke, setOutlineStroke, setPaint, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesCreateEntities, setSeriesCreateEntities, setSeriesFillPaint, setSeriesFillPaint, setSeriesItemLabelFont, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesShape, setSeriesStroke, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setShape, setStroke, setStroke

Field Details

DEFAULT_WALL_PAINT

public static final Paint DEFAULT_WALL_PAINT
The default wall paint.

DEFAULT_X_OFFSET

public static final double DEFAULT_X_OFFSET
The default x-offset for the 3D effect.
Field Value:
12.0

DEFAULT_Y_OFFSET

public static final double DEFAULT_Y_OFFSET
The default y-offset for the 3D effect.
Field Value:
8.0

Constructor Details

LineRenderer3D

public LineRenderer3D()
Creates a new renderer.

Method Details

drawBackground

public void drawBackground(Graphics2D g2,
                           CategoryPlot plot,
                           Rectangle2D dataArea)
Draws the background for the plot.
Specified by:
drawBackground in interface CategoryItemRenderer
Overrides:
drawBackground in interface AbstractCategoryItemRenderer
Parameters:
g2 - the graphics device.
plot - the plot.
dataArea - the area inside the axes.

drawDomainGridline

public void drawDomainGridline(Graphics2D g2,
                               CategoryPlot plot,
                               Rectangle2D dataArea,
                               double value)
Draws a grid line against the domain axis.
Specified by:
drawDomainGridline in interface CategoryItemRenderer
Overrides:
drawDomainGridline in interface AbstractCategoryItemRenderer
Parameters:
g2 - the graphics device.
plot - the plot.
dataArea - the area for plotting data (not yet adjusted for any 3D effect).
value - the Java2D value at which the grid line should be drawn.

drawItem

public void drawItem(Graphics2D g2,
                     CategoryItemRendererState state,
                     Rectangle2D dataArea,
                     CategoryPlot plot,
                     CategoryAxis domainAxis,
                     ValueAxis rangeAxis,
                     CategoryDataset dataset,
                     int row,
                     int column,
                     int pass)
Draw a single data item.
Specified by:
drawItem in interface CategoryItemRenderer
Overrides:
drawItem in interface LineAndShapeRenderer
Parameters:
g2 - the graphics device.
state - the renderer state.
dataArea - the area in which the data is drawn.
plot - the plot.
domainAxis - the domain axis.
rangeAxis - the range axis.
dataset - the dataset.
row - the row index (zero-based).
column - the column index (zero-based).
pass - the pass index.

drawOutline

public void drawOutline(Graphics2D g2,
                        CategoryPlot plot,
                        Rectangle2D dataArea)
Draws the outline for the plot.
Specified by:
drawOutline in interface CategoryItemRenderer
Overrides:
drawOutline in interface AbstractCategoryItemRenderer
Parameters:
g2 - the graphics device.
plot - the plot.
dataArea - the area inside the axes.

drawRangeGridline

public void drawRangeGridline(Graphics2D g2,
                              CategoryPlot plot,
                              ValueAxis axis,
                              Rectangle2D dataArea,
                              double value)
Draws a grid line against the range axis.
Specified by:
drawRangeGridline in interface CategoryItemRenderer
Overrides:
drawRangeGridline in interface AbstractCategoryItemRenderer
Parameters:
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.

drawRangeMarker

public void drawRangeMarker(Graphics2D g2,
                            CategoryPlot plot,
                            ValueAxis axis,
                            Marker marker,
                            Rectangle2D dataArea)
Draws a range marker.
Specified by:
drawRangeMarker in interface CategoryItemRenderer
Overrides:
drawRangeMarker in interface AbstractCategoryItemRenderer
Parameters:
g2 - the graphics device.
plot - the plot.
axis - the value axis.
marker - the marker.
dataArea - the area for plotting data (not including 3D effect).

equals

public boolean equals(Object obj)
Checks this renderer for equality with an arbitrary object.
Overrides:
equals in interface LineAndShapeRenderer
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

getWallPaint

public Paint getWallPaint()
Returns the paint used to highlight the left and bottom wall in the plot background.
Returns:
The paint.

getXOffset

public double getXOffset()
Returns the x-offset for the 3D effect.
Specified by:
getXOffset in interface Effect3D
Returns:
The x-offset.

getYOffset

public double getYOffset()
Returns the y-offset for the 3D effect.
Specified by:
getYOffset in interface Effect3D
Returns:
The y-offset.

setWallPaint

public void setWallPaint(Paint paint)
Sets the paint used to hightlight the left and bottom walls in the plot background, and sends a RendererChangeEvent to all registered listeners.
Parameters:
paint - the paint (null not permitted).

setXOffset

public void setXOffset(double xOffset)
Sets the x-offset and sends a RendererChangeEvent to all registered listeners.
Parameters:
xOffset - the x-offset.
See Also:
getXOffset()

setYOffset

public void setYOffset(double yOffset)
Sets the y-offset and sends a RendererChangeEvent to all registered listeners.
Parameters:
yOffset - the y-offset.
See Also:
getYOffset()