Package org.fife.ui.rtextarea
Class ColorBackgroundPainterStrategy
- java.lang.Object
-
- org.fife.ui.rtextarea.ColorBackgroundPainterStrategy
-
- All Implemented Interfaces:
BackgroundPainterStrategy
public class ColorBackgroundPainterStrategy extends Object implements BackgroundPainterStrategy
A strategy for painting the background of anRTextAreaBaseas a solid color. The default background forRTextAreaBases is this strategy using the color white.- See Also:
ImageBackgroundPainterStrategy
-
-
Constructor Summary
Constructors Constructor Description ColorBackgroundPainterStrategy(Color color)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o2)Returns whether or not the specified object is equivalent to this one.ColorgetColor()Returns the color used to paint the background.inthashCode()Returns the hash code to use when placing an object of this type into hash maps.voidpaint(Graphics g, Rectangle bounds)Paints the background.voidsetColor(Color color)Sets the color used to paint the background.
-
-
-
Constructor Detail
-
ColorBackgroundPainterStrategy
public ColorBackgroundPainterStrategy(Color color)
Constructor.- Parameters:
color- The color to use when painting the background.
-
-
Method Detail
-
equals
public boolean equals(Object o2)
Returns whether or not the specified object is equivalent to this one.
-
getColor
public Color getColor()
Returns the color used to paint the background.- Returns:
- The color.
- See Also:
setColor(java.awt.Color)
-
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
public void paint(Graphics g, Rectangle bounds)
Paints the background.- Specified by:
paintin interfaceBackgroundPainterStrategy- Parameters:
g- The graphics context.bounds- The bounds of the object whose backgrouns we're painting.
-
setColor
public void setColor(Color color)
Sets the color used to paint the background.- Parameters:
color- The color to use.- See Also:
getColor()
-
-