Class TLspWorldSizedLineStyle.Builder<B extends TLspWorldSizedLineStyle.Builder<B>>

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

public static class TLspWorldSizedLineStyle.Builder<B extends TLspWorldSizedLineStyle.Builder<B>> extends ALspStyle.Builder<B> implements ILspWorldElevationStyle.Builder
Builder for world sized line styles. The default line style is a white 20 meter wide line that is painted with ILspWorldElevationStyle.ElevationMode.ON_TERRAIN .

Example usage: To create a 10 meter wide red line style for shapes that are painted on the terrain:
TLspWorldSizedLineStyle redTenMetersOnTerrain = TLspWorldSizedLineStyle.newBuilder().color(Color.red).lineWidth(10f).elevationMode(ElevationMode.ON_TERRAIN).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
    • elevationMode

      public B elevationMode(ILspWorldElevationStyle.ElevationMode aElevationMode)
      Specifies the elevation mode. By default, this is set to ILspWorldElevationStyle.ElevationMode.ON_TERRAIN.

      Currently only 'ON_TERRAIN' and 'ABOVE_ELLIPSOID' are supported for this style.

      Specified by:
      elevationMode in interface ILspWorldElevationStyle.Builder
      Parameters:
      aElevationMode - The elevation mode
      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
    • width

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

      public B texture(BufferedImage aTexture)
      Sets a texture with which the world sized line should be visualized.
      Parameters:
      aTexture - the texture's image
      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 TLspWorldSizedLineStyle.Builder<B>>
      Parameters:
      aColorStyle - the style to copy
      Returns:
      this
    • build

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

      public String toString()
      Overrides:
      toString in class Object