Class TLcdFillStyle

java.lang.Object
com.luciad.view.TLcdFillStyle
All Implemented Interfaces:
Serializable, Cloneable

public class TLcdFillStyle extends Object implements 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

    Fields
    Modifier and Type
    Field
    Description
    static 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

    Constructors
    Constructor
    Description
    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.
    Copy constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    equals(Object aObject)
     
    Gets the background color of this fill style or null 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
    Returns true if a background has been specified.
    int
     
    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.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NO_FILL

      public static final int NO_FILL
      Constant indicating that the area should not be filled.
      See Also:
    • SOLID_FILL

      public static final int SOLID_FILL
      Constant 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

      public TLcdFillStyle(int aPattern, Color aForeground)
      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

      public TLcdFillStyle(int aPattern, Color aForeground, Color aBackground)
      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

      public TLcdFillStyle(TLcdFillStyle aFillStyle)
      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

      public Color getForeground()
      Gets the foreground color of this fill style.
      Returns:
      the foreground color of this fill style.
      See Also:
    • setForeground

      public void setForeground(Color aForeground)
      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()
      Returns true if a background has been specified. False if none has been specified.
      Returns:
      true if a background has been specified, false otherwise.
    • getBackground

      public Color getBackground()
      Gets the background color of this fill style or null 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

      public boolean equals(Object aObject)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Object clone()
      Overrides:
      clone in class Object