Class TLspParameterizedFillStyle.Builder<B extends TLspParameterizedFillStyle.Builder<B>>

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

public static class TLspParameterizedFillStyle.Builder<B extends TLspParameterizedFillStyle.Builder<B>> extends ALspStyle.Builder<B> implements ILspWorldElevationStyle.Builder
Builder for parameterized fill styles. The default fill style is a slightly transparent green that uses ILspWorldElevationStyle.ElevationMode.OBJECT_DEPENDENT.

Example usages:

To create the default fill style:
TLspParameterizedFillStyle green = TLspParameterizedFillStyle.newBuilder().build();

To create a red draped fill style:
TLspParameterizedLineStyle redDraped = TLspParameterizedFillStyle.newBuilder().color(constant(Color.red)).elevationMode(ON_TERRAIN).build();

Since:
2018.0
  • Method Details

    • color

      public B color(ILcdExpression<Color> aColorExpression)
      Sets the expression that determines the fill color to apply.
      Parameters:
      aColorExpression - An expression of type Color
      Returns:
      this
    • opacity

      public B opacity(ILcdExpression<Float> aOpacity)
      Sets the expression that determines the transparency of the fill. This value is multiplied with the alpha value of the fill color to determine the transparency of the fill.

      • Opacity 1 corresponds to an fully opaque fill.
      • Opacity <1 will make the fill transparent.
      • Opacity 0 or <0 will make the fill completely transparent.
      • Opacity >1 has no effect.

      If not set, fills keep their original opacity determined by the alpha value of its color.

      Parameters:
      aOpacity - An expression of type Float
      Returns:
      this
    • visibility

      public B visibility(ILcdExpression<Boolean> aVisibilityExpression)
      Sets the expression that determines whether objects should be displayed or not.

      If not set, all objects in view are always displayed.

      Parameters:
      aVisibilityExpression - An expression of type Boolean
      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
    • 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
    • all

      public B all(ALspStyle aStyle)
      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 TLspParameterizedFillStyle.Builder<B>>
      Parameters:
      aStyle - the style to copy
      Returns:
      this
    • build

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