public class SolidBrush extends Brush
| Constructor and Description |
|---|
SolidBrush()
Initializes a new instance of the
SolidBrush class. |
SolidBrush(java.awt.Color color)
Initializes a new instance of the
SolidBrush class. |
SolidBrush(java.lang.String color)
Initializes a new instance of the
SolidBrush class. |
| Modifier and Type | Method and Description |
|---|---|
void |
applyTo(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D bounds)
Applies the brush to the specified graphics.
|
SolidBrush |
clone()
Create a copy of this brush.
|
boolean |
equals(java.lang.Object obj) |
java.awt.Color |
getColor()
Gets the color that fills the interior of objects painted with this brush.
|
int |
hashCode() |
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable.
|
void |
setColor(java.awt.Color value)
Sets the color that fills the interior of objects painted with this brush.
|
java.awt.Color |
toColor()
Returns a single color approximation of the brush.
|
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable.
|
public SolidBrush(java.awt.Color color)
SolidBrush class.color - A Color object representing the brush color.public SolidBrush(java.lang.String color)
SolidBrush class.color - A string specifying color hex code.public SolidBrush()
SolidBrush class.public SolidBrush clone()
clone in class BrushSolidBrush object.public void applyTo(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D bounds)
Brushpublic java.awt.Color toColor()
Brushpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
java.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic java.awt.Color getColor()
public void setColor(java.awt.Color value)
value - The new brush color.