public static class TLspParameterizedIconStyle.Builder<B extends TLspParameterizedIconStyle.Builder<B>> extends ALspStyle.Builder<B> implements ILspWorldElevationStyle.Builder, ILspEffectsHintStyle.Builder
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 using ILcdOriented
)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
for examples
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
B |
all(ALspStyle aStyle)
Sets all builder parameters to the properties of the
provided style.
|
TLspParameterizedIconStyle |
build()
Builds the style with the set parameters.
|
B |
effectsHints(ILspEffectsHintStyle.EffectsHint... aEffectsHints)
Specifies the effects hints to be added to the style.
|
B |
elevationMode(ILspWorldElevationStyle.ElevationMode aMode)
Specifies the elevation mode.
|
B |
icon(ILcdExpression<? extends ILcdIcon> aIcon)
Sets the expression that determines the icon to use.
|
B |
minimumPixelSize(ILcdExpression<Integer> aMinimumPixelSize)
Sets the expression that determines the minimum icon pixel size.
|
B |
modulationColor(ILcdExpression<Color> aColorExpression)
Sets the expression that determines the modulation color to apply to the icons.
|
B |
offset(ILcdExpression<Float> aOffsetX,
ILcdExpression<Float> aOffsetY)
Sets expressions that determine the icon offsets in 2D view coordinates.
|
B |
opacity(ILcdExpression<Float> aOpacity)
Sets the expression that determines the transparency to apply to the icons.
|
B |
scale(ILcdExpression<Float> aScaleFactorExpression)
Sets the expression that determines the scale factor to apply to the icons.
|
B |
scalingMode(TLspIconStyle.ScalingMode aScalingMode)
Sets the scaling mode of the icons.
|
B |
useOrientation(boolean aOrientationEnabled)
Sets whether the icon should respect its orientation.
|
B |
visibility(ILcdExpression<Boolean> aVisibilityExpression)
Sets the expression that determines whether objects should be displayed or not.
|
B |
worldSize(ILcdExpression<Float> aWorldSize)
Sets the expression that determines the icon size in meters.
|
B |
zOrder(int aZOrder)
Sets the Z-order of this style.
|
equals, hashCode
public B icon(ILcdExpression<? extends ILcdIcon> aIcon)
aIcon
- An expression of type ILcdIcon
public B useOrientation(boolean aOrientationEnabled)
ILcdOriented
interface. Either the geometry returned by the
ALspStyleTargetProvider
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.aOrientationEnabled
- a flag indicating whether or not the icon should respect its
orientationthis
public B scale(ILcdExpression<Float> aScaleFactorExpression)
1
corresponds to the original size of the icon.<1
will shrink the icon.>1
will enlarge the icon.If not set, icons are never re-scaled.
aScaleFactorExpression
- An expression of type Floatpublic B scalingMode(TLspIconStyle.ScalingMode aScalingMode)
ScalingMode.VIEW_SCALING
.aScalingMode
- a scaling modethis
public B visibility(ILcdExpression<Boolean> aVisibilityExpression)
If not set, all objects in view are always displayed.
aVisibilityExpression
- An expression of type Booleanpublic B offset(ILcdExpression<Float> aOffsetX, ILcdExpression<Float> aOffsetY)
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 provides ILcdAnchoredIcon
.
aOffsetX
- the offset in X directionaOffsetY
- the offset in Y directionthis
;icon(ILcdExpression)
public B zOrder(int aZOrder)
aZOrder
- the z orderthis
public B minimumPixelSize(ILcdExpression<Integer> aMinimumPixelSize)
ScalingMode.WORLD_SCALING_CLAMPED
or ScalingMode.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.aMinimumPixelSize
- An expression of type Floatthis
public B worldSize(ILcdExpression<Float> aWorldSize)
ScalingMode.WORLD_SCALING
or
ScalingMode.WORLD_SCALING_CLAMPED
.
By default this is set to 50000m.aWorldSize
- An expression of type Float.this
public B modulationColor(ILcdExpression<Color> aColorExpression)
Color Color.white
corresponds to the original icon.
If not set, icons keep their original color.
aColorExpression
- An expression of type Color
public B opacity(ILcdExpression<Float> aOpacity)
1
corresponds to the original transparency icon.<1
will make the icons more transparent.0
or <0
will make the icons completely transparent.>1
has no effect.If not set, icons keep their original opacity determined by the alpha value of the modulation color.
aOpacity
- An expression of type Floatpublic TLspParameterizedIconStyle build()
ALspStyle.Builder
build
in class ALspStyle.Builder<B extends TLspParameterizedIconStyle.Builder<B>>
public B effectsHints(ILspEffectsHintStyle.EffectsHint... aEffectsHints)
ILspEffectsHintStyle.Builder
effectsHints
in interface ILspEffectsHintStyle.Builder
aEffectsHints
- the effects hints to be added to the stylethis
public B elevationMode(ILspWorldElevationStyle.ElevationMode aMode)
ILspWorldElevationStyle.Builder
elevationMode
in interface ILspWorldElevationStyle.Builder
this
public B all(ALspStyle aStyle)
all
in class ALspStyle.Builder<B extends TLspParameterizedIconStyle.Builder<B>>
aStyle
- the style to copythis