Package com.luciad.view
Class TLcdFillStyle
java.lang.Object
com.luciad.view.TLcdFillStyle
- All Implemented Interfaces:
Serializable
,Cloneable
This is a utility class that can be used to represent a fill style to paint
areas. It includes a foreground color, a pattern and a background color
(when the pattern is different from NO_FILL and SOLID_FILL).
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Constant indicating that the area should not be filled.static final int
Constant indicating that the area should be filled solid with a color. -
Constructor Summary
ConstructorDescriptionCreates 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. -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Gets the background color of this fill style ornull
if no background has been specified.Gets the foreground color of this fill style.int
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
Returnstrue
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.
-
Field Details
-
NO_FILL
public static final int NO_FILLConstant indicating that the area should not be filled.- See Also:
-
SOLID_FILL
public static final int SOLID_FILLConstant indicating that the area should be filled solid with a color.- See Also:
-
-
Constructor Details
-
TLcdFillStyle
public 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
public TLcdFillStyle(int aPattern) Creates a fill style with the given pattern. The foreground color is set to white, no background color is set.- Parameters:
aPattern
- the pattern to use in the fill style. Patterns different from SOLID_FILL or NO_FILL should be implemented.
-
TLcdFillStyle
Creates a fill style with the given pattern and foreground color. No background color is set.- Parameters:
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.
-
TLcdFillStyle
Creates a fill style with the given pattern, foreground color and background color.- Parameters:
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.
-
TLcdFillStyle
Copy constructor. Pattern, foreground, background color are copied.- Parameters:
aFillStyle
- the fill style to copy.
-
-
Method Details
-
getPattern
public 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.- Returns:
- the pattern of this fill style
- See Also:
-
setPattern
public 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.- Parameters:
aPattern
- the pattern for this style to use.- See Also:
-
getForeground
Gets the foreground color of this fill style.- Returns:
- the foreground color of this fill style.
- See Also:
-
setForeground
Sets the foreground of this fill style.- Parameters:
aForeground
- the color to use as foreground when filling an area.- See Also:
-
hasBackground
public boolean hasBackground()Returnstrue
if a background has been specified. False if none has been specified.- Returns:
- true if a background has been specified, false otherwise.
-
getBackground
Gets the background color of this fill style ornull
if no background has been specified.- Returns:
- the background color of this fill style or
null
if no background has been specified. - See Also:
-
equals
-
hashCode
public int hashCode() -
clone
-