public class ColorBackgroundPainterStrategy extends java.lang.Object implements BackgroundPainterStrategy
RTextAreaBase
as a solid color. The default background for RTextAreaBases
is this strategy using the color white.ImageBackgroundPainterStrategy| Constructor and Description |
|---|
ColorBackgroundPainterStrategy(java.awt.Color color)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o2)
Returns whether or not the specified object is equivalent to
this one.
|
java.awt.Color |
getColor()
Returns the color used to paint the background.
|
int |
hashCode()
Returns the hash code to use when placing an object of this type into
hash maps.
|
void |
paint(java.awt.Graphics g,
java.awt.Rectangle bounds)
Paints the background.
|
void |
setColor(java.awt.Color color)
Sets the color used to paint the background.
|
public ColorBackgroundPainterStrategy(java.awt.Color color)
color - The color to use when painting the background.public boolean equals(java.lang.Object o2)
equals in class java.lang.Objecto2 - The object to which to compare.o2 is another
ColorBackgroundPainterStrategy representing
the same color as this one.public java.awt.Color getColor()
setColor(java.awt.Color)public int hashCode()
equals(Object), to keep FindBugs happy.hashCode in class java.lang.Objectpublic void paint(java.awt.Graphics g,
java.awt.Rectangle bounds)
paint in interface BackgroundPainterStrategyg - The graphics context.bounds - The bounds of the object whose backgrouns we're
painting.public void setColor(java.awt.Color color)
color - The color to use.getColor()