public class StandardRectanglePainter extends java.lang.Object implements RectanglePainter, java.io.Serializable
RectanglePainter that fills the rectangle with a
color or image. Instances of this class are immutable.
GradientRectanglePainter since it provides
options to transform the gradient to fit the chart background size.
| Constructor and Description |
|---|
StandardRectanglePainter(java.awt.Paint paint)
Creates a new painter that will fill a rectangle with the specified
paint.
|
StandardRectanglePainter(java.awt.Paint paint,
java.awt.Image image,
Fit2D imageFit)
Creates a new painter that will draw an image within the specified
rectangle.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests this painter for equality with an arbitrary object.
|
void |
fill(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds)
Fills the rectangle with the paint specified in the constructor.
|
java.awt.Image |
getImage()
Returns the image.
|
Fit2D |
getImageFit()
Returns the image fit specification.
|
java.awt.Paint |
getPaint()
Returns the paint that will be used to fill rectangles.
|
public StandardRectanglePainter(java.awt.Paint paint)
paint - the fill paint (null not permitted).public StandardRectanglePainter(java.awt.Paint paint, java.awt.Image image, Fit2D imageFit)
paint - the background paint (null not permitted).image - the image (null permitted).imageFit - the fit (null permitted).public java.awt.Paint getPaint()
null).public java.awt.Image getImage()
null).public Fit2D getImageFit()
public void fill(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds)
fill in interface RectanglePainterg2 - the graphics target (null not permitted).bounds - the rectangle (null not permitted).public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).