Class TLspParameterizedFillStyle

java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.style.TLspParameterizedFillStyle
All Implemented Interfaces:
ILspWorldElevationStyle, ILspStyler

public final class TLspParameterizedFillStyle extends ALspStyle implements ILspWorldElevationStyle
Style used to style ILcdPolygon. Most properties of this style can be controlled through expressions.

Construction of this style is done through its TLspParameterizedFillStyle.Builder.

The following properties of this style are calculated by an expression:

  • Color: the color of the fill of the polygon

For defaults, see TLspParameterizedFillStyle.Builder.

Example:
   TLcdColorMap colorMap = ...;
   TLcdDataProperty populationProperty = ...;
   ILcdExpression color = mixmap(toFloat(attribute(Integer.class,populationProperty)), colorMap);
   TLspParameterizedFillStyle style = TLspParameterizedFillStyle.newBuilder()
                                                                .color(color)
                                                                .build();
 
In this example, the fill color is based on the value of the populationProperty. The mapping between the population and the actual fill color is based on a TLcdColorMap.

Submitting a TLspParameterizedFillStyle and TLspFillStyle for the same domain object is not supported. Only one of them will be used to visualize the domain object.

Note: TLcdExpressionFactory.viewPositionAttribute() must not be used when the elevation mode is set to ILspWorldElevationStyle.ElevationMode.ON_TERRAIN or when the elevation mode is ILspWorldElevationStyle.ElevationMode.OBJECT_DEPENDENT and all z-values of the geometry are 0.
Since:
2018.0
  • Method Details

    • newBuilder

      public static TLspParameterizedFillStyle.Builder<?> newBuilder()
      Creates a new builder with the default values.
      Returns:
      the new builder.
    • asBuilder

      public TLspParameterizedFillStyle.Builder<?> asBuilder()
      Creates a new builder initialized with all the properties of this style.
      Specified by:
      asBuilder in class ALspStyle
      Returns:
      the new builder.
    • getColor

      public ILcdExpression<Color> getColor()
      Gets the color expression.
      Returns:
      the color
    • getOpacity

      public ILcdExpression<Float> getOpacity()
      Returns the expression that determines transparency of the fill.
      Returns:
      The expression
    • getVisibility

      public ILcdExpression<Boolean> getVisibility()
      Returns the expression that determines whether the object should be displayed or not.
      Returns:
      The expression
    • isTransparent

      public boolean isTransparent()
      Description copied from class: ALspStyle
      Determines whether this style is transparent.

      Shapes that are transparent can be painted in a different paint phase than shapes that are not transparent.

      Specified by:
      isTransparent in class ALspStyle
      Returns:
      whether or not this style is transparent
    • getElevationMode

      public ILspWorldElevationStyle.ElevationMode getElevationMode()
      Description copied from interface: ILspWorldElevationStyle
      Returns the elevation mode of this style.
      Specified by:
      getElevationMode in interface ILspWorldElevationStyle
      Returns:
      The elevation mode.
    • isCompatible

      public boolean isCompatible(TLspPaintPass aPaintPass)
      Description copied from class: ALspStyle
      Utility method to determine whether the style is compatible with the given paint pass.

      A style and paint pass are compatible if they use or request the same terrain and transparency properties.

      Overrides:
      isCompatible in class ALspStyle
      Parameters:
      aPaintPass - the paint pass
      Returns:
      true if the style can be used in the given paint pass, false otherwise.
    • equals

      public boolean equals(Object aO)
      Overrides:
      equals in class ALspStyle
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ALspStyle