Package com.luciad.view.lightspeed.style
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 Summary
Modifier and TypeMethodDescriptionSets all parameters on the builder based on the given style.build()Builds the style with the set parameters.color(ILcdExpression<Color> aColorExpression) Sets the expression that determines the fill color to apply.Specifies the elevation mode.opacity(ILcdExpression<Float> aOpacity) Sets the expression that determines the transparency of the fill.visibility(ILcdExpression<Boolean> aVisibilityExpression) Sets the expression that determines whether objects should be displayed or not.zOrder(int aZOrder) Sets the Z-order of this style.Methods inherited from class com.luciad.view.lightspeed.style.ALspStyle.Builder
equals, hashCode
-
Method Details
-
color
Sets the expression that determines the fill color to apply.- Parameters:
aColorExpression- An expression of typeColor- Returns:
- this
-
opacity
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
1corresponds to an fully opaque fill. - Opacity
<1will make the fill transparent. - Opacity
0or<0will make the fill completely transparent. - Opacity
>1has 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
- Opacity
-
visibility
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
Description copied from interface:ILspWorldElevationStyle.BuilderSpecifies the elevation mode. The default mode depends on the specific implementation.- Specified by:
elevationModein interfaceILspWorldElevationStyle.Builder- Parameters:
aMode-- Returns:
this
-
zOrder
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
Description copied from class:ALspStyle.BuilderSets 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:
allin classALspStyle.Builder<B extends TLspParameterizedFillStyle.Builder<B>>- Parameters:
aStyle- the style to copy- Returns:
this
-
build
Description copied from class:ALspStyle.BuilderBuilds the style with the set parameters.- Specified by:
buildin classALspStyle.Builder<B extends TLspParameterizedFillStyle.Builder<B>>- Returns:
- the resulting style
-