org.jfree.chart.renderer.xy

Class XYLine3DRenderer

public class XYLine3DRenderer extends XYLineAndShapeRenderer implements Effect3D, Serializable

A XYLineAndShapeRenderer that adds a shadow line to the graph to emulate a 3D-effect.
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
XYLine3DRenderer()
Creates a new renderer.
Method Summary
protected voiddrawFirstPassShape(Graphics2D g2, int pass, int series, int item, Shape shape)
Overrides the method in the subclass to draw a shadow in the first pass.
booleanequals(Object obj)
Tests this renderer for equality with an arbitrary object.
intgetPassCount()
Returns the number of passes through the data that the renderer requires in order to draw the chart.
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.
protected booleanisItemPass(int pass)
Returns true if the specified pass involves drawing items.
protected booleanisLinePass(int pass)
Returns true if the specified pass involves drawing lines.
protected booleanisShadowPass(int pass)
Returns true if the specified pass involves drawing shadows.
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

XYLine3DRenderer

public XYLine3DRenderer()
Creates a new renderer.

Method Detail

drawFirstPassShape

protected void drawFirstPassShape(Graphics2D g2, int pass, int series, int item, Shape shape)
Overrides the method in the subclass to draw a shadow in the first pass.

Parameters: g2 the graphics device. pass the pass. series the series index (zero-based). item the item index (zero-based). shape the shape.

equals

public boolean equals(Object obj)
Tests this renderer for equality with an arbitrary object.

Parameters: obj the object (null permitted).

Returns: A boolean.

getPassCount

public int getPassCount()
Returns the number of passes through the data that the renderer requires in order to draw the chart. Most charts will require a single pass, but some require two passes.

Returns: The pass count.

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.

Returns: The 3D effect.

getYOffset

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

Returns: The 3D effect.

isItemPass

protected boolean isItemPass(int pass)
Returns true if the specified pass involves drawing items.

Parameters: pass the pass.

Returns: A boolean.

isLinePass

protected boolean isLinePass(int pass)
Returns true if the specified pass involves drawing lines.

Parameters: pass the pass.

Returns: A boolean.

isShadowPass

protected boolean isShadowPass(int pass)
Returns true if the specified pass involves drawing shadows.

Parameters: pass the pass.

Returns: A boolean.

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.

setXOffset

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

Parameters: xOffset the x-offset.

setYOffset

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

Parameters: yOffset the y-offset.

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