org.fife.ui.rtextarea
public class ColorBackgroundPainterStrategy extends Object implements BackgroundPainterStrategy
RTextAreaBase
as a solid color. The default background for RTextAreaBase
s
is this strategy using the color white.ImageBackgroundPainterStrategy
Constructor and Description |
---|
ColorBackgroundPainterStrategy(Color color)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o2)
Returns whether or not the specified object is equivalent to
this one.
|
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(Graphics g,
Rectangle bounds)
Paints the background.
|
void |
setColor(Color color)
Sets the color used to paint the background.
|
public ColorBackgroundPainterStrategy(Color color)
color
- The color to use when painting the background.public boolean equals(Object o2)
public Color getColor()
setColor(java.awt.Color)
public int hashCode()
equals(Object)
, to keep FindBugs happy.public void paint(Graphics g, Rectangle bounds)
paint
in interface BackgroundPainterStrategy
g
- The graphics context.bounds
- The bounds of the object whose backgrouns we're
painting.public void setColor(Color color)
color
- The color to use.getColor()