Class TLspLabelBoxStyle.Builder<B extends TLspLabelBoxStyle.Builder<B>>

java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle.Builder<B>
com.luciad.view.lightspeed.style.TLspLabelBoxStyle.Builder<B>
Enclosing class:
TLspLabelBoxStyle

public static class TLspLabelBoxStyle.Builder<B extends TLspLabelBoxStyle.Builder<B>> extends ALspStyle.Builder<B>

Builder for label box styles.

The default label box style has a padding of 2, a 1-pixel border and no fill.

Since:
2012.0
  • Constructor Details

    • Builder

      protected Builder()
  • Method Details

    • padding

      public B padding(int aPadding)
      Sets the padding between the label and its frame. The default padding is 0.
      Parameters:
      aPadding - the padding, in pixels
      Returns:
      this
    • frameThickness

      public B frameThickness(float aFrameThickness)
      Sets the line width of the frame, in pixels. The default is 0, which indicates that no frame should be drawn.
      Parameters:
      aFrameThickness - the frame line width, in pixels
      Returns:
      this
    • frameColor

      public B frameColor(Color aFrameColor)
      Sets the line color of the frame. The default is Color.black. This property only has effect if frameThickness(float) is not set to 0. If frameThickness(float) was not called yet, the frame thickness is set to 1.
      Parameters:
      aFrameColor - the desired frame color
      Returns:
      this
    • filled

      public B filled(boolean aFilled)
      Indicate whether a background color should be drawn. The default is false.
      Parameters:
      aFilled - true if the background color should be drawn, false otherwise.
      Returns:
      this
    • fillColor

      public B fillColor(Color aFillColor)
      Sets the background color. This property only has effect if filled(boolean) is set to true.
      Parameters:
      aFillColor - the desired background color
      Returns:
      this
    • haloColor

      public B haloColor(Color aColor)
      Sets the halo color. This property is only used if the halo is enabled.
      Parameters:
      aColor - the halo color
      Returns:
      this
      Throws:
      IllegalArgumentException - if aColor==null
      See Also:
    • haloThickness

      public B haloThickness(float aThickness)
      Sets the halo thickness in pixels. Set to zero if halo should be disabled.
      Parameters:
      aThickness - the thickness in pixels
      Returns:
      this
      See Also:
    • all

      public B all(ALspStyle aStyle)
      Copies all properties from the given style.
      Specified by:
      all in class ALspStyle.Builder<B extends TLspLabelBoxStyle.Builder<B>>
      Parameters:
      aStyle - the style to copy
      Returns:
      this
    • build

      public TLspLabelBoxStyle build()
      Constructs a label style with the set parameters.
      Specified by:
      build in class ALspStyle.Builder<B extends TLspLabelBoxStyle.Builder<B>>
      Returns:
      the new label style