Package com.luciad.view.lightspeed.style
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 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 line color to apply.dashPattern
(TLspLineStyle.DashPattern aDashPattern) Sets the dash pattern.effectsHints
(ILspEffectsHintStyle.EffectsHint... aEffectsHints) Specifies the effects hints to be added to the style.Specifies the elevation mode.opacity
(ILcdExpression<Float> aOpacity) Sets the expression that determines the transparency of the line.toString()
visibility
(ILcdExpression<Boolean> aVisibilityExpression) Sets the expression that determines whether objects should be displayed or not.width
(double aLineWidth) Sets the line width (pixels).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 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 typeColor
- Returns:
- this
-
opacity
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
- 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
-
width
Sets the line width (pixels). Should be greater than 0.- Parameters:
aLineWidth
- the line width- Returns:
this
-
dashPattern
Sets the dash pattern.- Parameters:
aDashPattern
- a dash pattern. Must not benull
- Returns:
this
- Since:
- 2018.1
-
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
-
elevationMode
Description copied from interface:ILspWorldElevationStyle.Builder
Specifies the elevation mode. The default mode depends on the specific implementation.- Specified by:
elevationMode
in interfaceILspWorldElevationStyle.Builder
- Parameters:
aMode
-- Returns:
this
-
effectsHints
Description copied from interface:ILspEffectsHintStyle.Builder
Specifies the effects hints to be added to the style.- Specified by:
effectsHints
in interfaceILspEffectsHintStyle.Builder
- Parameters:
aEffectsHints
- the effects hints to be added to the style- Returns:
this
-
all
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 classALspStyle.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 classALspStyle.Builder<B extends TLspParameterizedLineStyle.Builder<B>>
- Returns:
- the resulting style
-
toString
-