public class

XYLine3DRenderer

extends XYLineAndShapeRenderer
implements Serializable Effect3D
java.lang.Object
   ↳ org.jfree.chart.renderer.AbstractRenderer
     ↳ org.jfree.chart.renderer.xy.AbstractXYItemRenderer
       ↳ org.jfree.chart.renderer.xy.XYLineAndShapeRenderer
         ↳ org.jfree.chart.renderer.xy.XYLine3DRenderer

Class Overview

A XYLineAndShapeRenderer that adds a shadow line to the graph to emulate a 3D-effect.

Summary

Constants
double DEFAULT_X_OFFSET The default x-offset for the 3D effect.
double DEFAULT_Y_OFFSET The default y-offset for the 3D effect.
Fields
public static final Paint DEFAULT_WALL_PAINT The default wall paint.
[Expand]
Inherited Fields
From class org.jfree.chart.renderer.AbstractRenderer
Public Constructors
XYLine3DRenderer()
Creates a new renderer.
Public Methods
boolean equals(Object obj)
Tests this renderer for equality with an arbitrary object.
int getPassCount()
Returns the number of passes through the data that the renderer requires in order to draw the chart.
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.
Protected Methods
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.
boolean isItemPass(int pass)
Returns true if the specified pass involves drawing items.
boolean isLinePass(int pass)
Returns true if the specified pass involves drawing lines.
boolean isShadowPass(int pass)
Returns true if the specified pass involves drawing shadows.
[Expand]
Inherited Methods
From class org.jfree.chart.renderer.xy.XYLineAndShapeRenderer
From class org.jfree.chart.renderer.xy.AbstractXYItemRenderer
From class org.jfree.chart.renderer.AbstractRenderer
From class java.lang.Object
From interface org.jfree.chart.Effect3D
From interface org.jfree.chart.LegendItemSource
From interface org.jfree.chart.renderer.xy.XYItemRenderer

Constants

public static final double DEFAULT_X_OFFSET

The default x-offset for the 3D effect.

Constant Value: 12.0

public static final double DEFAULT_Y_OFFSET

The default y-offset for the 3D effect.

Constant Value: 8.0

Fields

public static final Paint DEFAULT_WALL_PAINT

The default wall paint.

Public Constructors

public XYLine3DRenderer ()

Creates a new renderer.

Public Methods

public boolean equals (Object obj)

Tests this renderer for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

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.

public Paint getWallPaint ()

Returns the paint used to highlight the left and bottom wall in the plot background.

Returns
  • The paint.

public double getXOffset ()

Returns the x-offset for the 3D effect.

Returns
  • The 3D effect.

public double getYOffset ()

Returns the y-offset for the 3D effect.

Returns
  • The 3D effect.

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.

public void setXOffset (double xOffset)

Sets the x-offset and sends a RendererChangeEvent to all registered listeners.

Parameters
xOffset the x-offset.

public void setYOffset (double yOffset)

Sets the y-offset and sends a RendererChangeEvent to all registered listeners.

Parameters
yOffset the y-offset.

Protected Methods

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.

protected boolean isItemPass (int pass)

Returns true if the specified pass involves drawing items.

Parameters
pass the pass.
Returns
  • A boolean.

protected boolean isLinePass (int pass)

Returns true if the specified pass involves drawing lines.

Parameters
pass the pass.
Returns
  • A boolean.

protected boolean isShadowPass (int pass)

Returns true if the specified pass involves drawing shadows.

Parameters
pass the pass.
Returns
  • A boolean.