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.
|
java.awt.Color |
getColor()
Gets the color that fills the interior of objects painted with this brush.
|
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 Brush
SolidBrush
object.public void applyTo(java.awt.Graphics2D g, java.awt.geom.Rectangle2D bounds)
Brush
public java.awt.Color toColor()
Brush
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public java.awt.Color getColor()
public void setColor(java.awt.Color value)
value
- The new brush color.