Package org.jfree.chart.renderer.xy
Class StandardXYBarPainter
java.lang.Object
org.jfree.chart.renderer.xy.StandardXYBarPainter
- All Implemented Interfaces:
Serializable
,XYBarPainter
An implementation of the
XYBarPainter
interface that preserves the
behaviour of bar painting that existed prior to the introduction of the
XYBarPainter
interface.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Rectangle2D
createShadow
(RectangularShape bar, double xOffset, double yOffset, RectangleEdge base, boolean pegShadow) Creates a shadow for the bar.boolean
Tests this instance for equality with an arbitrary object.int
hashCode()
Returns a hash code for this instance.void
paintBar
(Graphics2D g2, XYBarRenderer renderer, int row, int column, RectangularShape bar, RectangleEdge base) Paints a single bar instance.void
paintBarShadow
(Graphics2D g2, XYBarRenderer renderer, int row, int column, RectangularShape bar, RectangleEdge base, boolean pegShadow) Paints a single bar instance.
-
Constructor Details
-
StandardXYBarPainter
public StandardXYBarPainter()Creates a new instance.
-
-
Method Details
-
paintBar
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row, int column, RectangularShape bar, RectangleEdge base) Paints a single bar instance.- Specified by:
paintBar
in 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(Graphics2D g2, XYBarRenderer renderer, int row, int column, RectangularShape bar, RectangleEdge base, boolean pegShadow) Paints a single bar instance.- Specified by:
paintBarShadow
in 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 Rectangle2D createShadow(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
Tests this instance for equality with an arbitrary object. -
hashCode
public int hashCode()Returns a hash code for this instance.
-