public class ColorBackgroundPainterStrategy extends java.lang.Object implements BackgroundPainterStrategy
RTextAreaBase
as a solid color. The default background for RTextAreaBase
s
is this strategy using the color white.ImageBackgroundPainterStrategy
构造器和说明 |
---|
ColorBackgroundPainterStrategy(java.awt.Color color)
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
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
在类中 java.lang.Object
o2
- 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
在类中 java.lang.Object
public void paint(java.awt.Graphics g, java.awt.Rectangle bounds)
paint
在接口中 BackgroundPainterStrategy
g
- 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()