Class TLspLabelBoxStyle

java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.style.TLspLabelBoxStyle
All Implemented Interfaces:
ILspStyler

public class TLspLabelBoxStyle extends ALspStyle
Style used to draw a box around labels: frame and background color.

It defines the following properties:

Construction of a label box style object is performed through the Builder design pattern mechanism.

Note that it is possible to use multiple TLspLabelBoxStyles in a label styler. In that case, the padding property is always defined relative to the content (text or icon) of the label. Also, the painting order is defined by the order in which the styles are passed to the styler.

Since:
2012.0
  • Method Details

    • newBuilder

      public static TLspLabelBoxStyle.Builder<?> newBuilder()
      Creates a new builder with the default values.
      Returns:
      the new builder.
    • asBuilder

      public TLspLabelBoxStyle.Builder<?> asBuilder()
      Creates a new builder initialized with all the properties of this style.
      Specified by:
      asBuilder in class ALspStyle
      Returns:
      the new builder.
    • getPadding

      public int getPadding()
      Returns the padding (in pixels) between the label content (text or icon) and its frame.
      Returns:
      the padding between the label and its frame
    • getFrameThickness

      public float getFrameThickness()
      Returns the line width (in pixels) of the frame.

      Returns 0 if no frame should be drawn.

      Returns:
      the frame thickness, in pixels
    • getFrameColor

      public Color getFrameColor()
      Returns the color the frame should be drawn in. This property only has effect if getFrameThickness() is not 0.
      Returns:
      the color of the frame
    • isFilled

      public boolean isFilled()
      Indicates whether the label should have a non-transparent background.
      Returns:
      true if the label should have a non-transparent background, false otherwise.
    • getFillColor

      public Color getFillColor()
      Returns the background color of the label. This property only has effect if isFilled() is true.
      Returns:
      the background color of the label.
    • getHaloColor

      public Color getHaloColor()
      Gets the halo color. This property should only be used if the halo is enabled.
      Returns:
      the halo color
      See Also:
    • getHaloThickness

      public float getHaloThickness()
      Gets the halo thickness. If zero, there should be no halo.
      Returns:
      the halo thickness in pixels
      See Also:
    • isTransparent

      public boolean isTransparent()
      Description copied from class: ALspStyle
      Determines whether this style is transparent.

      Shapes that are transparent can be painted in a different paint phase than shapes that are not transparent.

      Specified by:
      isTransparent in class ALspStyle
      Returns:
      whether or not this style is transparent
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class ALspStyle