Class TLspParameterizedLineStyle.Builder<B extends TLspParameterizedLineStyle.Builder<B>>

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

public static final class TLspParameterizedLineStyle.Builder<B extends TLspParameterizedLineStyle.Builder<B>> extends ALspStyle.Builder<B> implements ILspEffectsHintStyle.Builder, ILspWorldElevationStyle.Builder
Builder for parametrized line styles. The default line style is a slightly transparent white 1-pixel wide line that uses ILspWorldElevationStyle.ElevationMode.OBJECT_DEPENDENT.

Example usages:

To create the default line style:
TLspParameterizedLineStyle whiteOnePixelNotDraped = TLspParameterizedLineStyle.newBuilder().build();

To create a 4-pixel wide red line style for shapes that are draped:
TLspParameterizedLineStyle redFourPixelsDraped = TLspParameterizedLineStyle.newBuilder().color(constant(Color.red)).lineWidth(4f).elevationMode(ON_TERRAIN).build();

Since:
2018.0
  • Method Details

    • color

      public B color(ILcdExpression<Color> aColorExpression)
      Sets the expression that determines the line color to apply.

      Color Color.white corresponds to the default color.

      To apply a different color to vertices on the line use TLcdExpressionFactory.AttributeValueProvider.getValue(java.lang.Object, java.lang.Object, int)

      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 line. This value is multiplied with the alpha value of the line color to determine the transparency of the line.

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

      If not set, lines keep their original opacity determined by the alpha value of it's 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
    • width

      public B width(double aLineWidth)
      Sets the line width (pixels). Should be greater than 0.
      Parameters:
      aLineWidth - the line width
      Returns:
      this
    • dashPattern

      public B dashPattern(TLspLineStyle.DashPattern aDashPattern)
      Sets the dash pattern.
      Parameters:
      aDashPattern - a dash pattern. Must not be null
      Returns:
      this
      Since:
      2018.1
    • 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
    • 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
    • effectsHints

      public B effectsHints(ILspEffectsHintStyle.EffectsHint... aEffectsHints)
      Description copied from interface: ILspEffectsHintStyle.Builder
      Specifies the effects hints to be added to the style.
      Specified by:
      effectsHints in interface ILspEffectsHintStyle.Builder
      Parameters:
      aEffectsHints - the effects hints to be added to the style
      Returns:
      this
    • all

      public B all(ALspStyle aLineStyle)
      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 TLspParameterizedLineStyle.Builder<B>>
      Parameters:
      aLineStyle - 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 TLspParameterizedLineStyle.Builder<B>>
      Returns:
      the resulting style
    • toString

      public String toString()
      Overrides:
      toString in class Object