public class HatchBrush extends Brush
| Constructor and Description |
|---|
HatchBrush()
Initializes a new
HatchBrush instance. |
HatchBrush(HatchStyle hatchStyle,
java.awt.Color color)
Initializes a new
HatchBrush instance. |
HatchBrush(HatchStyle hatchStyle,
java.awt.Color foregroundColor,
java.awt.Color backgroundColor)
Initializes a new
HatchBrush instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
applyTo(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D bounds)
Applies the brush to the specified graphics.
|
HatchBrush |
clone()
Creates a copy of a brush.
|
java.awt.Color |
getBackgroundColor()
Gets the color of spaces between the hatch lines drawn by this brush.
|
java.awt.Color |
getForegroundColor()
Gets the color of hatch lines drawn by this brush.
|
HatchStyle |
getHatchStyle()
Gets the hatch style of this brush.
|
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable.
|
void |
setBackgroundColor(java.awt.Color value)
Sets the color of spaces between the hatch lines drawn by this brush.
|
void |
setForegroundColor(java.awt.Color value)
Sets the color of hatch lines drawn by this brush.
|
void |
setHatchStyle(HatchStyle value)
Sets the hatch style of this brush.
|
java.awt.Color |
toColor()
Returns a single color approximation of the brush.
|
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable.
|
public HatchBrush(HatchStyle hatchStyle, java.awt.Color foregroundColor, java.awt.Color backgroundColor)
HatchBrush instance.public HatchBrush()
HatchBrush instance.public HatchBrush(HatchStyle hatchStyle, java.awt.Color color)
HatchBrush instance.public void applyTo(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D bounds)
public HatchBrush clone()
public 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 toColor()
Brushpublic java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color value)
value - A Color instance specifying the hatch background color.public java.awt.Color getForegroundColor()
public void setForegroundColor(java.awt.Color value)
value - A Color instance specifying the hatch foreground color.public HatchStyle getHatchStyle()
HatchStyle enumeration.public void setHatchStyle(HatchStyle value)
value - A member of the HatchStyle enumeration.