public class TLcdFillStyle extends Object implements Serializable, Cloneable
Modifier and Type | Field and Description |
---|---|
static int |
NO_FILL
Constant indicating that the area should not be filled.
|
static int |
SOLID_FILL
Constant indicating that the area should be filled solid with a color.
|
Constructor and Description |
---|
TLcdFillStyle()
Creates a default fill style: the foreground color is set to white, no background color is set and
the pattern is NO_FILL.
|
TLcdFillStyle(int aPattern)
Creates a fill style with the given pattern.
|
TLcdFillStyle(int aPattern,
Color aForeground)
Creates a fill style with the given pattern and foreground color.
|
TLcdFillStyle(int aPattern,
Color aForeground,
Color aBackground)
Creates a fill style with the given pattern, foreground color and background color.
|
TLcdFillStyle(TLcdFillStyle aFillStyle)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
boolean |
equals(Object aObject) |
Color |
getBackground()
Gets the background color of this fill style or
null if no
background has been specified. |
Color |
getForeground()
Gets the foreground color of this fill style.
|
int |
getPattern()
Gets the pattern of this fill style: it is up to the developer to
assign a pattern to each value different from NO_FILL and SOLID_FILL.
|
boolean |
hasBackground()
Returns
true if a background has been specified. |
int |
hashCode() |
void |
setForeground(Color aForeground)
Sets the foreground of this fill style.
|
void |
setPattern(int aPattern)
Sets the pattern of this fill style: it is up to the developer to
assign a pattern to each value different from NO_FILL and SOLID_FILL.
|
public static final int NO_FILL
public static final int SOLID_FILL
public TLcdFillStyle()
public TLcdFillStyle(int aPattern)
aPattern
- the pattern to use in the fill style. Patterns different from SOLID_FILL or NO_FILL
should be implemented.public TLcdFillStyle(int aPattern, Color aForeground)
aPattern
- the pattern to use in the fill style. Patterns different from SOLID_FILL or NO_FILL
should be implemented.aForeground
- the foreground color to use for the fill style.public TLcdFillStyle(int aPattern, Color aForeground, Color aBackground)
aPattern
- the pattern to use in the fill style. Patterns different from SOLID_FILL or NO_FILL
should be implemented.aForeground
- the foreground color to use for the fill style.aBackground
- the background color to use for the fill style.public TLcdFillStyle(TLcdFillStyle aFillStyle)
aFillStyle
- the fill style to copy.public int getPattern()
setPattern(int)
public void setPattern(int aPattern)
aPattern
- the pattern for this style to use.getPattern()
public Color getForeground()
setForeground(java.awt.Color)
public void setForeground(Color aForeground)
aForeground
- the color to use as foreground when filling an area.getForeground()
public boolean hasBackground()
true
if a background has been specified.
False if none has been specified.public Color getBackground()
null
if no
background has been specified.null
if no
background has been specified.hasBackground()