java.lang.Object
org.jfree.chart3d.table.StandardRectanglePainter
- All Implemented Interfaces:
Serializable
,RectanglePainter
A
Note that it is possible to use gradient paint with this painter, but it is usually better to use
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
RectanglePainter
that fills the rectangle with a
color or image. Instances of this class are immutable.
Note that it is possible to use gradient paint with this painter, but it is usually better to use
GradientRectanglePainter
since it provides
options to transform the gradient to fit the chart background size.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStandardRectanglePainter
(Paint paint) Creates a new painter that will fill a rectangle with the specified paint.StandardRectanglePainter
(Paint paint, Image image, Fit2D imageFit) Creates a new painter that will draw an image within the specified rectangle. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests this painter for equality with an arbitrary object.void
fill
(Graphics2D g2, Rectangle2D bounds) Fills the rectangle with the paint specified in the constructor.getImage()
Returns the image.Returns the image fit specification.getPaint()
Returns the paint that will be used to fill rectangles.
-
Constructor Details
-
StandardRectanglePainter
Creates a new painter that will fill a rectangle with the specified paint.- Parameters:
paint
- the fill paint (null
not permitted).
-
StandardRectanglePainter
Creates a new painter that will draw an image within the specified rectangle.- Parameters:
paint
- the background paint (null
not permitted).image
- the image (null
permitted).imageFit
- the fit (null
permitted).
-
-
Method Details
-
getPaint
Returns the paint that will be used to fill rectangles.- Returns:
- The paint (never
null
).
-
getImage
Returns the image.- Returns:
- The image (possibly
null
).
-
getImageFit
Returns the image fit specification.- Returns:
- The image fit specification.
-
fill
Fills the rectangle with the paint specified in the constructor.- Specified by:
fill
in interfaceRectanglePainter
- Parameters:
g2
- the graphics target (null
not permitted).bounds
- the rectangle (null
not permitted).
-
equals
Tests this painter for equality with an arbitrary object.
-