Package org.fife.ui.rtextarea
Class ColorBackgroundPainterStrategy
java.lang.Object
org.fife.ui.rtextarea.ColorBackgroundPainterStrategy
- All Implemented Interfaces:
BackgroundPainterStrategy
A strategy for painting the background of an
RTextAreaBase
as a solid color. The default background for RTextAreaBase
s
is this strategy using the color white.- Version:
- 0.1
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the specified object is equivalent to this one.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
Paints the background.void
Sets the color used to paint the background.
-
Field Details
-
color
-
-
Constructor Details
-
ColorBackgroundPainterStrategy
Constructor.- Parameters:
color
- The color to use when painting the background.
-
-
Method Details
-
equals
Returns whether the specified object is equivalent to this one. -
getColor
Returns the color used to paint the background.- Returns:
- The color.
- See Also:
-
hashCode
public int hashCode()Returns the hash code to use when placing an object of this type into hash maps. This method is implemented since we overrodeequals(Object)
, to keep FindBugs happy. -
paint
Paints the background.- Specified by:
paint
in interfaceBackgroundPainterStrategy
- Parameters:
g
- The graphics context.bounds
- The bounds of the object whose background we're painting.
-
setColor
Sets the color used to paint the background.- Parameters:
color
- The color to use.- See Also:
-