Class TLspParameterizedIconStyle.Builder<B extends TLspParameterizedIconStyle.Builder<B>>
- All Implemented Interfaces:
ILspEffectsHintStyle.Builder
,ILspWorldElevationStyle.Builder
- Enclosing class:
TLspParameterizedIconStyle
Default values:
visibility(com.luciad.util.expression.ILcdExpression<java.lang.Boolean>)
: true (all objects visible)scale(com.luciad.util.expression.ILcdExpression<java.lang.Float>)
: 1 (original icon size)modulationColor(com.luciad.util.expression.ILcdExpression<java.awt.Color>)
: white (original icon is not modified)opacity(com.luciad.util.expression.ILcdExpression<java.lang.Float>)
: 1 (original icon is not modified)icon(com.luciad.util.expression.ILcdExpression<? extends com.luciad.gui.ILcdIcon>)
: A filled rect with an outlineuseOrientation(boolean)
: false (icons are aligned to the screen, not using usingILcdOriented
)offset(com.luciad.util.expression.ILcdExpression<java.lang.Float>, com.luciad.util.expression.ILcdExpression<java.lang.Float>)
: 0worldSize(com.luciad.util.expression.ILcdExpression<java.lang.Float>)
: 50000scalingMode(com.luciad.view.lightspeed.style.TLspIconStyle.ScalingMode)
:ScalingMode.VIEW_SCALING
elevationMode(com.luciad.view.lightspeed.style.ILspWorldElevationStyle.ElevationMode)
:ElevationMode.OBJECT_DEPENDENT
- Since:
- 2018.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets all builder parameters to the properties of the provided style.build()
Builds the style with the set parameters.effectsHints
(ILspEffectsHintStyle.EffectsHint... aEffectsHints) Specifies the effects hints to be added to the style.Specifies the elevation mode.icon
(ILcdExpression<? extends ILcdIcon> aIcon) Sets the expression that determines the icon to use.minimumPixelSize
(ILcdExpression<Integer> aMinimumPixelSize) Sets the expression that determines the minimum icon pixel size.modulationColor
(ILcdExpression<Color> aColorExpression) Sets the expression that determines the modulation color to apply to the icons.offset
(ILcdExpression<Float> aOffsetX, ILcdExpression<Float> aOffsetY) Sets expressions that determine the icon offsets in 2D view coordinates.opacity
(ILcdExpression<Float> aOpacity) Sets the expression that determines the transparency to apply to the icons.scale
(ILcdExpression<Float> aScaleFactorExpression) Sets the expression that determines the scale factor to apply to the icons.scalingMode
(TLspIconStyle.ScalingMode aScalingMode) Sets the scaling mode of the icons.useOrientation
(boolean aOrientationEnabled) Sets whether the icon should respect its orientation.visibility
(ILcdExpression<Boolean> aVisibilityExpression) Sets the expression that determines whether objects should be displayed or not.worldSize
(ILcdExpression<Float> aWorldSize) Sets the expression that determines the icon size in meters.zOrder
(int aZOrder) Sets the Z-order of this style.Methods inherited from class com.luciad.view.lightspeed.style.ALspStyle.Builder
equals, hashCode
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
icon
Sets the expression that determines the icon to use. If an icon provided by the expression is an ILcdAnchoredIcon, the anchor point will automatically become the point of rotation, as well as the anchor point of the icon in the view.- Parameters:
aIcon
- An expression of typeILcdIcon
- Returns:
- this
-
useOrientation
Sets whether the icon should respect its orientation. By default, this is set to false. The actual orientation that is applied to the icon will be retrieved from theILcdOriented
interface. Either the geometry returned by theALspStyleTargetProvider
or the model object should implement this interface. The geometry takes precedence if both objects implement this interface. The orientation is interpreted as an azimuth.- Parameters:
aOrientationEnabled
- a flag indicating whether or not the icon should respect its orientation- Returns:
this
-
scale
Sets the expression that determines the scale factor to apply to the icons.- Scale
1
corresponds to the original size of the icon. - Scale
<1
will shrink the icon. - Scale
>1
will enlarge the icon.
If not set, icons are never re-scaled.
- Parameters:
aScaleFactorExpression
- An expression of type Float- Returns:
- this
- Scale
-
scalingMode
Sets the scaling mode of the icons. By default this is set toScalingMode.VIEW_SCALING
.- Parameters:
aScalingMode
- a scaling mode- Returns:
this
-
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
-
offset
Sets expressions that determine the icon offsets in 2D view coordinates. This offset is applied after all other transformations have been applied. In other words: Scaling and rotation are applied first. Then this offset is done as a post-effect.
To support anchored icons, and rotations of icons around a specific point in the icon, please supply the
icon(ILcdExpression)
method with an expression that providesILcdAnchoredIcon
.- Parameters:
aOffsetX
- the offset in X directionaOffsetY
- the offset in Y direction- Returns:
this
;- See Also:
-
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
-
minimumPixelSize
Sets the expression that determines the minimum icon pixel size. This size only affects the style if the scaling mode is set toScalingMode.WORLD_SCALING_CLAMPED
orScalingMode.WORLD_SCALING
. As soon as the largest dimension (i.e. width or height) of the icon is smaller than this minimum pixel size, the icon will be scaled to satisfy this minimum size. By default this value is set to 0, which indicates that no minimum size will be enforced.- Parameters:
aMinimumPixelSize
- An expression of type Float- Returns:
this
-
worldSize
Sets the expression that determines the icon size in meters. This size only affects the style if the scaling mode is set toScalingMode.WORLD_SCALING
orScalingMode.WORLD_SCALING_CLAMPED
. By default this is set to 50000m.- Parameters:
aWorldSize
- An expression of type Float.- Returns:
this
-
modulationColor
Sets the expression that determines the modulation color to apply to the icons.Color
Color.white
corresponds to the original icon.If not set, icons keep their original color.
- Parameters:
aColorExpression
- An expression of typeColor
- Returns:
- this
-
opacity
Sets the expression that determines the transparency to apply to the icons. This value is multiplied with the alpha value of the modulation color to determine the transparency of the icon.- Opacity
1
corresponds to the original transparency icon. - Opacity
<1
will make the icons more transparent. - Opacity
0
or<0
will make the icons completely transparent. - Opacity
>1
has no effect.
If not set, icons keep their original opacity determined by the alpha value of the modulation color.
- Parameters:
aOpacity
- An expression of type Float- Returns:
- this
- Opacity
-
build
Description copied from class:ALspStyle.Builder
Builds the style with the set parameters.- Specified by:
build
in classALspStyle.Builder<B extends TLspParameterizedIconStyle.Builder<B>>
- Returns:
- the resulting style
-
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
-
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
-
all
Sets all builder parameters to the properties of the provided style.- Specified by:
all
in classALspStyle.Builder<B extends TLspParameterizedIconStyle.Builder<B>>
- Parameters:
aStyle
- the style to copy- Returns:
this
-