Class TLspLabelOpacityStyle.Builder<B extends TLspLabelOpacityStyle.Builder<B>>

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

public static class TLspLabelOpacityStyle.Builder<B extends TLspLabelOpacityStyle.Builder<B>> extends ALspStyle.Builder<B>
Builder for label opacity styles. The default style has a white color and is fully opaque.

Example usages:

To create the default opacity style:
TLspLabelOpacityStyle whiteNotDraped = TLspLabelOpacityStyle.newBuilder().build();

To create a half transparent, red style:
TLspLabelOpacityStyle redDraped = TLspLabelOpacityStyle.newBuilder().color( Color.red ).opacity( 0.5f ).build();

Since:
2012.0
  • Constructor Details

    • Builder

      protected Builder()
  • Method Details

    • color

      public B color(Color aColor)
      Sets the color. Should not be null.
      Parameters:
      aColor - the color
      Returns:
      this
      Throws:
      IllegalArgumentException - if aColor==null
    • opacity

      public B opacity(float aOpacity)
      Sets the opacity (alpha) value for the color.

      This is a convenience method: One could equally well use the color(...) method. However, this method leaves the RGB values intact and only modifies the alpha value. Note that, the other way around, the color(...) method does override the set alpha value.

      Parameters:
      aOpacity - the alpha value. Must be contained in the [0,1] interval (0 is fully transparent, 1 is fully opaque).
      Returns:
      this
    • all

      public B all(ALspStyle aColorStyle)
      Description copied from class: ALspStyle.Builder
      Sets all parameters on the builder based on the given style.

      This is useful for example to create a new style that has almost all properties equal to another style.

      Specified by:
      all in class ALspStyle.Builder<B extends TLspLabelOpacityStyle.Builder<B>>
      Parameters:
      aColorStyle - the style to copy
      Returns:
      this
    • build

      public TLspLabelOpacityStyle build()
      Description copied from class: ALspStyle.Builder
      Builds the style with the set parameters.
      Specified by:
      build in class ALspStyle.Builder<B extends TLspLabelOpacityStyle.Builder<B>>
      Returns:
      the resulting style