Class TLspTextStyle.Builder<B extends TLspTextStyle.Builder<B>>

java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle.Builder<B>
com.luciad.view.lightspeed.style.TLspTextStyle.Builder<B>
All Implemented Interfaces:
ILspWorldElevationStyle.Builder
Enclosing class:
TLspTextStyle

public static class TLspTextStyle.Builder<B extends TLspTextStyle.Builder<B>> extends ALspStyle.Builder<B> implements ILspWorldElevationStyle.Builder
Builder for text styles.

The default text style has a plain black sans-serif font of size 14 (SansSerif-BOLD-14) with a 1-pixel white halo.

Since:
2012.0
  • Constructor Details

    • Builder

      protected Builder()
      Creates a new builder.
  • Method Details

    • zOrder

      public B zOrder(int aZOrder)

      Sets the Z-order of this style. Styles should be painted from lowest to highest Z-order.

      Increasing the number of different Z-orders can negatively impact painting performance. By default, it is set to 0.

      Parameters:
      aZOrder - the z order
      Returns:
      this
    • transparent

      public B transparent(boolean aTransparent)
      Sets whether or not the text should be painted in the transparent paint phase.
      Parameters:
      aTransparent - whether or not the text should be painted in the transparent paint phase
      Returns:
      this
    • font

      public B font(Font aFont)
      Sets the text font.
      Parameters:
      aFont - the text font
      Returns:
      this
      Throws:
      IllegalArgumentException - if aFont==null
    • font

      public B font(String aFont)
      Sets the text font based on its textual description. Identical to calling font(Font.decode(aFont)).
      Parameters:
      aFont - the text font
      Returns:
      this
      Throws:
      IllegalArgumentException - if aFont == null
    • textColor

      public B textColor(Color aColor)
      Sets the text color.
      Parameters:
      aColor - the text color
      Returns:
      this
      Throws:
      IllegalArgumentException - if aColor==null
    • 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 no halo should be visible.
      Parameters:
      aThickness - the thickness in pixels
      Returns:
      this
      See Also:
    • alignment

      public B alignment(TLspTextStyle.Alignment aAlignment)
      Specifies how text over multiple lines should be aligned.
      Parameters:
      aAlignment - the alignment
      Returns:
      this
    • verticalSpacing

      public B verticalSpacing(int aVerticalSpacing)
      Specifies the spacing in between multiple lines of text
      Parameters:
      aVerticalSpacing - the vertical spacing
      Returns:
      this
    • elevationMode

      public B elevationMode(ILspWorldElevationStyle.ElevationMode aMode)
      Description copied from interface: ILspWorldElevationStyle.Builder
      Specifies the elevation mode. The default mode depends on the specific implementation.
      Specified by:
      elevationMode in interface ILspWorldElevationStyle.Builder
      Parameters:
      aMode -
      Returns:
      this
    • all

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

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