Package org.jfree.chart.renderer.xy
Class StandardXYBarPainter
- java.lang.Object
-
- org.jfree.chart.renderer.xy.StandardXYBarPainter
-
- All Implemented Interfaces:
java.io.Serializable,XYBarPainter
public class StandardXYBarPainter extends java.lang.Object implements XYBarPainter, java.io.Serializable
An implementation of theXYBarPainterinterface that preserves the behaviour of bar painting that existed prior to the introduction of theXYBarPainterinterface.- See Also:
GradientXYBarPainter, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StandardXYBarPainter()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.awt.geom.Rectangle2DcreateShadow(java.awt.geom.RectangularShape bar, double xOffset, double yOffset, RectangleEdge base, boolean pegShadow)Creates a shadow for the bar.booleanequals(java.lang.Object obj)Tests this instance for equality with an arbitrary object.inthashCode()Returns a hash code for this instance.voidpaintBar(java.awt.Graphics2D g2, XYBarRenderer renderer, int row, int column, java.awt.geom.RectangularShape bar, RectangleEdge base)Paints a single bar instance.voidpaintBarShadow(java.awt.Graphics2D g2, XYBarRenderer renderer, int row, int column, java.awt.geom.RectangularShape bar, RectangleEdge base, boolean pegShadow)Paints a single bar instance.
-
-
-
Method Detail
-
paintBar
public void paintBar(java.awt.Graphics2D g2, XYBarRenderer renderer, int row, int column, java.awt.geom.RectangularShape bar, RectangleEdge base)Paints a single bar instance.- Specified by:
paintBarin interfaceXYBarPainter- Parameters:
g2- the graphics target.renderer- the renderer.row- the row index.column- the column index.bar- the barbase- indicates which side of the rectangle is the base of the bar.
-
paintBarShadow
public void paintBarShadow(java.awt.Graphics2D g2, XYBarRenderer renderer, int row, int column, java.awt.geom.RectangularShape bar, RectangleEdge base, boolean pegShadow)Paints a single bar instance.- Specified by:
paintBarShadowin interfaceXYBarPainter- Parameters:
g2- the graphics target.renderer- the renderer.row- the row index.column- the column index.bar- the barbase- indicates which side of the rectangle is the base of the bar.pegShadow- peg the shadow to the base of the bar?
-
createShadow
private java.awt.geom.Rectangle2D createShadow(java.awt.geom.RectangularShape bar, double xOffset, double yOffset, RectangleEdge base, boolean pegShadow)Creates a shadow for the bar.- Parameters:
bar- the bar shape.xOffset- the x-offset for the shadow.yOffset- the y-offset for the shadow.base- the edge that is the base of the bar.pegShadow- peg the shadow to the base?- Returns:
- A rectangle for the shadow.
-
equals
public boolean equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the obj (nullpermitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCodein classjava.lang.Object- Returns:
- A hash code.
-
-