org.jfree.chart.renderer.category

Class LineRenderer3D

public class LineRenderer3D extends LineAndShapeRenderer implements Effect3D, Serializable

A line renderer with a 3D effect. The example shown here is generated by the LineChart3DDemo1.java program included in the JFreeChart Demo Collection:

LineRenderer3DSample.png
Field Summary
static PaintDEFAULT_WALL_PAINT
The default wall paint.
static doubleDEFAULT_X_OFFSET
The default x-offset for the 3D effect.
static doubleDEFAULT_Y_OFFSET
The default y-offset for the 3D effect.
Constructor Summary
LineRenderer3D()
Creates a new renderer.
Method Summary
voiddrawBackground(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea)
Draws the background for the plot.
voiddrawDomainGridline(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea, double value)
Draws a grid line against the domain axis.
voiddrawItem(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.
voiddrawOutline(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea)
Draws the outline for the plot.
voiddrawRangeGridline(Graphics2D g2, CategoryPlot plot, ValueAxis axis, Rectangle2D dataArea, double value)
Draws a grid line against the range axis.
voiddrawRangeMarker(Graphics2D g2, CategoryPlot plot, ValueAxis axis, Marker marker, Rectangle2D dataArea)
Draws a range marker.
booleanequals(Object obj)
Checks this renderer for equality with an arbitrary object.
PaintgetWallPaint()
Returns the paint used to highlight the left and bottom wall in the plot background.
doublegetXOffset()
Returns the x-offset for the 3D effect.
doublegetYOffset()
Returns the y-offset for the 3D effect.
voidsetWallPaint(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.
voidsetXOffset(double xOffset)
Sets the x-offset and sends a RendererChangeEvent to all registered listeners.
voidsetYOffset(double yOffset)
Sets the y-offset and sends a RendererChangeEvent to all registered listeners.

Field Detail

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.

DEFAULT_Y_OFFSET

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

Constructor Detail

LineRenderer3D

public LineRenderer3D()
Creates a new renderer.

Method Detail

drawBackground

public void drawBackground(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea)
Draws the background for the plot.

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.

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.

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.

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.

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.

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.

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.

See Also: setWallPaint

getXOffset

public double getXOffset()
Returns the x-offset for the 3D effect.

Returns: The x-offset.

See Also: LineRenderer3D getYOffset

getYOffset

public double getYOffset()
Returns the y-offset for the 3D effect.

Returns: The y-offset.

See Also: LineRenderer3D getXOffset

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).

See Also: getWallPaint

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

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.