public static class TLspPlotStyle.Builder<B extends TLspPlotStyle.Builder<B>> extends ALspStyle.Builder<B> implements ILspWorldElevationStyle.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>)
: null (white dots are displayed)useOrientation(boolean)
: false (icons are aligned to the screen, not using using ILcdOriented
)automaticScaling(double)
: off (icons are not rescaled depending on zoom level)density(boolean)
: off (no density plot is derived from the icons)eyeDomeLighting(com.luciad.view.lightspeed.style.TLspEyeDomeLightingSettings)
: off (eye-dome lighting is disabled)TLspPlotStyle for examples
Modifier | Constructor and Description |
---|---|
protected |
Builder() |
Modifier and Type | Method and Description |
---|---|
B |
all(ALspStyle aStyle)
Sets all parameters on the builder based on the given style.
|
B |
automaticScaling(double aTargetWorldSize)
Enables automatic scaling of icons based on the zoom level / distance to the camera.
|
TLspPlotStyle |
build()
Builds the style with the set parameters.
|
B |
density(boolean aDensity)
Sets whether or not density should be painted.
|
B |
density(IndexColorModel aIndexColorModel,
double aHardness)
Sets the density parameters for the density painting.
|
B |
elevationMode(ILspWorldElevationStyle.ElevationMode aMode)
Specifies the elevation mode.
|
B |
eyeDomeLighting(TLspEyeDomeLightingSettings aEyeDomeLightingSettings)
Sets the eye-dome lighting (EDL) settings.
|
B |
icon(ILcdExpression<? extends ILcdIcon> aIconExpression)
Sets the expression that determines the icon to use.
|
B |
icon(ILcdIcon aIcon)
Sets an icon to use for all objects.
|
B |
modulationColor(Color aFixedColor)
Sets a fixed modulation color to apply to all icons.
|
B |
modulationColor(ILcdExpression<Color> aColorExpression)
Sets the expression that determines the modulation color to apply to the icons.
|
B |
opacity(float aFixedOpacity)
Sets a fixed opacity to apply to all icons.
|
B |
opacity(ILcdExpression<Float> aOpacityExpression)
Sets the expression that determines the transparency to apply to the icons.
|
B |
scale(float aFixedScale)
Sets a fixed scale factor to apply to all icons.
|
B |
scale(ILcdExpression<Float> aScaleExpression)
Sets the expression that determines the scale factor to apply to 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.
|
equals, hashCode
public B all(ALspStyle aStyle)
ALspStyle.Builder
all
in class ALspStyle.Builder<B extends TLspPlotStyle.Builder<B>>
aStyle
- the style to copythis
public TLspPlotStyle build()
ALspStyle.Builder
build
in class ALspStyle.Builder<B extends TLspPlotStyle.Builder<B>>
public B elevationMode(ILspWorldElevationStyle.ElevationMode aMode)
elevationMode
in interface ILspWorldElevationStyle.Builder
this
public B visibility(ILcdExpression<Boolean> aVisibilityExpression)
If not set, all objects in view are always displayed.
aVisibilityExpression
- An expression of type Booleanpublic B scale(ILcdExpression<Float> aScaleExpression)
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.
Note that you can apply automaticScaling(double)
based on zoom level.
aScaleExpression
- An expression of type Floatpublic B scale(float aFixedScale)
scale(ILcdExpression)
for more details.aFixedScale
- The scale factor to applypublic B density(boolean aDensity)
density(IndexColorModel, double)
to enable and configure the density plot.
Turning density on is incompatible with enabling eyeDomeLighting(com.luciad.view.lightspeed.style.TLspEyeDomeLightingSettings)
(EDL).
Trying to combine both will result in an IllegalStateException to be thrown.aDensity
- True if density should be painted, false if density should not be painted.public B density(IndexColorModel aIndexColorModel, double aHardness)
eyeDomeLighting(com.luciad.view.lightspeed.style.TLspEyeDomeLightingSettings)
(EDL).
Trying to combine both will result in an IllegalStateException to be thrown.aIndexColorModel
- a color model to use to visualize density (maps occurrence counts to color)aHardness
- A value between 0 and 1 to determine how "hard" the density visualization should be. 0
is the softest value, and will result in a smooth transition from one point to the other. 1
is the hardest value, and will result in a sharp transition from one point to the other.TLcdJetIndexColorModelFactory allows you to easily create color models.
public B automaticScaling(double aTargetWorldSize)
Icons will be rendered with a given size in world coordinates (typically meters), but will be clamped to their native size in view coordinates (pixels). The effect of this is that icons will get smaller if you zoom out, but will not get magnified if you zoom in. In 3D views, the icons will also be subject to perspective (i.e. icons will get smaller towards the horizon). This is equivalent to TLspIconStyle.ScalingMode.WORLD_SCALING_CLAMPED.
Enabling this option is strongly recommended:
If not set, icons are not rescaled based on zoom level.
This setting can be combined with a custom scale(com.luciad.util.expression.ILcdExpression<java.lang.Float>)
expression.
aTargetWorldSize
- the maximum world size icons should be drawn atpublic 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 modulationColor(Color aFixedColor)
modulationColor(com.luciad.util.expression.ILcdExpression<java.awt.Color>)
for more details.aFixedColor
- The modulation color to apply to all iconspublic B opacity(ILcdExpression<Float> aOpacityExpression)
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.
aOpacityExpression
- An expression of type Floatpublic B opacity(float aFixedOpacity)
opacity(ILcdExpression)
for more details.aFixedOpacity
- The opacity to applypublic B icon(ILcdExpression<? extends ILcdIcon> aIconExpression)
Use null
to display dots instead of icons.
If not set, dots are used (equivalent of null
).
aIconExpression
- An expression of type ILcdIcon
public B icon(ILcdIcon aIcon)
icon(ILcdExpression)
for more details.aIcon
- The icon to usepublic 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.
If the geometry or domain object do not implement ILcdOriented
,
this option has no effect.aOrientationEnabled
- a flag indicating whether or not the icon should respect its
orientationthis
public B eyeDomeLighting(TLspEyeDomeLightingSettings aEyeDomeLightingSettings)
TLspEyeDomeLightingSettings
for more details.
Enabling EDL is incompatible with a density plot
.
Trying to combine both will result in an IllegalStateException to be thrown.aEyeDomeLightingSettings
- The settings to use