Class GradientBarPainter
- java.lang.Object
-
- org.jfree.chart.renderer.category.GradientBarPainter
-
- All Implemented Interfaces:
java.io.Serializable
,BarPainter
public class GradientBarPainter extends java.lang.Object implements BarPainter, java.io.Serializable
An implementation of theBarPainter
interface that uses several gradient fills to enrich the appearance of the bars.- Since:
- 1.0.11
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GradientBarPainter()
Creates a new instance.GradientBarPainter(double g1, double g2, double g3)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.int
hashCode()
Returns a hash code for this instance.void
paintBar(java.awt.Graphics2D g2, BarRenderer renderer, int row, int column, java.awt.geom.RectangularShape bar, org.jfree.ui.RectangleEdge base)
Paints a single bar instance.void
paintBarShadow(java.awt.Graphics2D g2, BarRenderer renderer, int row, int column, java.awt.geom.RectangularShape bar, org.jfree.ui.RectangleEdge base, boolean pegShadow)
Paints a single bar instance.
-
-
-
Constructor Detail
-
GradientBarPainter
public GradientBarPainter()
Creates a new instance.
-
GradientBarPainter
public GradientBarPainter(double g1, double g2, double g3)
Creates a new instance.- Parameters:
g1
- percentage value defining the line between regions 1 and 2.g2
- percentage value defining the line between regions 2 and 3.g3
- percentage value defining the line between regions 3 and 4.
-
-
Method Detail
-
paintBar
public void paintBar(java.awt.Graphics2D g2, BarRenderer renderer, int row, int column, java.awt.geom.RectangularShape bar, org.jfree.ui.RectangleEdge base)
Paints a single bar instance.- Specified by:
paintBar
in interfaceBarPainter
- 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, BarRenderer renderer, int row, int column, java.awt.geom.RectangularShape bar, org.jfree.ui.RectangleEdge base, boolean pegShadow)
Paints a single bar instance.- Specified by:
paintBarShadow
in interfaceBarPainter
- 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?
-
equals
public boolean equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the obj (null
permitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A hash code.
-
-