| Method from org.jfree.chart.renderer.xy.XYLine3DRenderer Detail: |
protected void drawFirstPassShape(Graphics2D g2,
int pass,
int series,
int item,
Shape shape) {
if (isShadowPass(pass)) {
if (getWallPaint() != null) {
g2.setStroke(getItemStroke(series, item));
g2.setPaint(getWallPaint());
g2.translate(getXOffset(), getYOffset());
g2.draw(shape);
g2.translate(-getXOffset(), -getYOffset());
}
}
else {
// now draw the real shape
super.drawFirstPassShape(g2, pass, series, item, shape);
}
}
Overrides the method in the subclass to draw a shadow in the first pass. |
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof XYLine3DRenderer)) {
return false;
}
XYLine3DRenderer that = (XYLine3DRenderer) obj;
if (this.xOffset != that.xOffset) {
return false;
}
if (this.yOffset != that.yOffset) {
return false;
}
if (!PaintUtilities.equal(this.wallPaint, that.wallPaint)) {
return false;
}
return super.equals(obj);
}
Tests this renderer for equality with an arbitrary object. |
public int getPassCount() {
return 3;
}
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. |
public Paint getWallPaint() {
return this.wallPaint;
}
Returns the paint used to highlight the left and bottom wall in the plot
background. |
public double getXOffset() {
return this.xOffset;
}
Returns the x-offset for the 3D effect. |
public double getYOffset() {
return this.yOffset;
}
Returns the y-offset for the 3D effect. |
protected boolean isItemPass(int pass) {
return pass == 2;
}
Returns true if the specified pass involves drawing items. |
protected boolean isLinePass(int pass) {
return pass == 0 || pass == 1;
}
Returns true if the specified pass involves drawing lines. |
protected boolean isShadowPass(int pass) {
return pass == 0;
}
Returns true if the specified pass involves drawing shadows. |
public void setWallPaint(Paint paint) {
this.wallPaint = paint;
fireChangeEvent();
}
Sets the paint used to hightlight the left and bottom walls in the plot
background and sends a RendererChangeEvent to all registered
listeners. |
public void setXOffset(double xOffset) {
this.xOffset = xOffset;
fireChangeEvent();
}
|
public void setYOffset(double yOffset) {
this.yOffset = yOffset;
fireChangeEvent();
}
|