Class TLspPlotLayerBuilder
You can configure the following aspects using this builder:
model
: seehere
for restrictionsplot styles
label styles
mandatory attributes and orientation
scale range
See newBuilder()
for default values.
Example:
ILspLayer layer = TLspPLotLayerBuilder.newBuilder() .model(myModel) .label("Plots") .bodyStyles(REGULAR, TLspPlotStyle.newBuilder()....build() .build()
- Since:
- 2012.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbodyScaleRange
(ILcdInterval aScaleRange) Deprecated.Sets a scale range within which the objects are displayed.bodyStyler
(TLspPaintState aPaintState, ILspStyler aStyler) Deprecated.Sets the styler used for the points in theBODY
paint representation.bodyStyles
(TLspPaintState aPaintState, TLspPlotStyle... aStyles) Deprecated.Sets a (fixed) set of styles to use in this layer for theBODY
paint representation.Deprecated.Sets the icon of the layer.Deprecated.Sets the label of the layer.labelEditable
(boolean aEditable) Deprecated.Sets whether the labels of the layer should be editable.labelEditor
(ILspEditor aEditor) Deprecated.Sets a custom label editor for the layer, alternatively you can useTLspPlotLayerBuilder.labelEditable(boolean)
to enable a default label editor.labelScaleRange
(ILcdInterval aScaleRange) Deprecated.Sets a scale range within which the objects' labels are displayed.labelStyler
(TLspPaintState aPaintState, ILspStyler aLabelStyler) Deprecated.Sets the given label styler for the given paint state.labelStyles
(TLspPaintState aPaintState, ALspStyle... aLabelStyles) Deprecated.Sets the given label styles for the given paint state.layerType
(ILspLayer.LayerType aLayerType) Deprecated.The layer type of plot layers cannot be set. The layer type of plot layers cannot be set. Sets the layer type of the layer.mandatoryAttributes
(ILcdExpression... aMandatoryAttributes) Deprecated.Set a list of attributes that should always be loaded, regardless of what is necessary for styling and filtering.mandatoryOrientation
(boolean aOrientationMandatory) Deprecated.Indicates that orientation information should always be loaded, regardless of styling and filtering.Deprecated.Sets the model of the layer.static TLspPlotLayerBuilder
Deprecated.Creates a new builder.paintingHints
(TLspPlotPaintingHints aPaintingHints) Deprecated.selectable
(boolean aSelectable) Deprecated.Specifies whether layers should be selectable.Methods inherited from class com.luciad.view.lightspeed.layer.plots.TLspPlotLayerBuilder
bodyMapScaleRange, build, labelMapScaleRange, layerStyle, paintingHints
Methods inherited from class com.luciad.view.lightspeed.layer.ALspLayerBuilder
getIcon, getLabel, getLayerStyle, getLayerType, getModel
-
Method Details
-
layerType
Deprecated.Description copied from class:TLspPlotLayerBuilder
The layer type of plot layers cannot be set. Sets the layer type of the layer. The default value isILspLayer.LayerType.EDITABLE
.- Overrides:
layerType
in classTLspPlotLayerBuilder
- Parameters:
aLayerType
- the layer type- Returns:
- this builder
- See Also:
-
model
Deprecated.Description copied from class:TLspPlotLayerBuilder
Sets the model of the layer. The default value isnull
.- Models that are
ILcd2DBoundsIndexedModel
are dynamically/partially loaded and unloaded depending on cache size and visible area. - Other models are processed entirely. The domain objects must be
ILcdBounded
.
- Overrides:
model
in classTLspPlotLayerBuilder
- Parameters:
aModel
- a model- Returns:
- this builder
- See Also:
- Models that are
-
label
Deprecated.Description copied from class:TLspPlotLayerBuilder
Sets the label of the layer. This is a short textual representation for it, often used to represent the layer to end-users. The default value isnull
.- Overrides:
label
in classTLspPlotLayerBuilder
- Parameters:
aLabel
- the label- Returns:
- this builder
- See Also:
-
icon
Deprecated.Description copied from class:TLspPlotLayerBuilder
Sets the icon of the layer. The default value isnull
.- Overrides:
icon
in classTLspPlotLayerBuilder
- Parameters:
aIcon
- the icon- Returns:
- this builder
- See Also:
-
mandatoryAttributes
Deprecated.Description copied from class:TLspPlotLayerBuilder
Set a list of attributes that should always be loaded, regardless of what is necessary for styling and filtering.
This call is optional. The layer will automatically determine the necessary attributes based on the expressions inside
TLspPlotStyle
.However, if at runtime a new style is set with other attributes, the layer will have to process the new attributes. To avoid this processing, you can set the super-set of all attributes you may need up front.
- Overrides:
mandatoryAttributes
in classTLspPlotLayerBuilder
- Parameters:
aMandatoryAttributes
- The set of mandatory attributes- Returns:
- this
- See Also:
-
mandatoryOrientation
Deprecated.Description copied from class:TLspPlotLayerBuilder
Indicates that orientation information should always be loaded, regardless of styling and filtering.
This call is optional. The layer will automatically determine if orientation is necessary based on the
TLspPlotStyle
.However, if at runtime a new style is set with different orientation settings, the layer will have to process the data again. To avoid this processing, you can set the super-set of all attributes you may need up front.
- Overrides:
mandatoryOrientation
in classTLspPlotLayerBuilder
- Parameters:
aOrientationMandatory
- Whether the orientation should always be loaded or not- Returns:
- this
- See Also:
-
bodyStyles
Deprecated.Description copied from class:TLspPlotLayerBuilder
Sets a (fixed) set of styles to use in this layer for theBODY
paint representation.This method delegates to
TLspPlotLayerBuilder.bodyStyler(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.styler.ILspStyler)
. CallTLspPlotLayerBuilder.bodyStyler(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.styler.ILspStyler)
with a custom styler if you need to change styles at runtime after creation.If not set, a default
TLspPlotStyle
is used.- Overrides:
bodyStyles
in classTLspPlotLayerBuilder
- Parameters:
aPaintState
- Paint state for this styleraStyles
- The styles to use- Returns:
- this
- See Also:
-
bodyStyler
Deprecated.Description copied from class:TLspPlotLayerBuilder
Sets the styler used for the points in theBODY
paint representation.Special considerations:
- It must submit
TLspPlotStyle
. - It must submit the whole, original collection of domain objects. You cannot split styles per object. Instead, you can use expressions to style objects based on rules.
- It is strongly advised (although not mandatory) to re-use the same style instance if it is unchanged.
- You can use a
ALspStyleTargetProvider
to extract the actual point geometry out of the domain object. It must returnILcdPoint
objects (that optionally also implementILcdOriented
).
public void style(Collection<?> aObjects, ALspStyleCollector aStyleCollector, TLspContext aContext) { aStyleCollector.objects(aObjects).geometry(fPointExtractor).style(fStyle).submit(); }
If not set, a default
TLspPlotStyle
is used.- Overrides:
bodyStyler
in classTLspPlotLayerBuilder
- Parameters:
aPaintState
- Paint state for this styleraStyler
- The styler to use- Returns:
- this
- See Also:
- It must submit
-
bodyScaleRange
Deprecated.Description copied from class:TLspPlotLayerBuilder
Sets a scale range within which the objects are displayed. The layer will not paint anything if the view's current scale is outside the given range. If not set, no scale range is used and the layer will always paint itself. Note that to improve performance you can additionally useTLspPlotStyle.Builder.automaticScaling(double)
.- Overrides:
bodyScaleRange
in classTLspPlotLayerBuilder
- Parameters:
aScaleRange
- The scale range- Returns:
- this
-
labelStyler
Deprecated.Description copied from class:TLspPlotLayerBuilder
Sets the given label styler for the given paint state.If you need control over other labeling aspects such as positioning or priorities, use an
The following styles are supported:ALspLabelStyler
.- TLspTextStyle to get text with a specific font, font color, size, halo etc.
- TLspIconStyle to get custom images.
- ALspLabelTextProviderStyle to specify which text to use (default is
toString()
). See also TLspDataObjectLabelTextProviderStyle.- TLspLabelBoxStyle to specify fill color or frames
- TLspLabelOpacityStyle to specify the opacity and modulation color.
- TLspPinLineStyle to draw pins for the labels.
Use either
TLspPlotLayerBuilder.labelStyler(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.styler.ILspStyler)
orTLspPlotLayerBuilder.labelStyles(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.ALspStyle...)
, not both.- Overrides:
labelStyler
in classTLspPlotLayerBuilder
- Parameters:
aPaintState
- the paint state for which to set the label styleraLabelStyler
- the new label styler for the layer- Returns:
this
-
labelStyles
Deprecated.Description copied from class:TLspPlotLayerBuilder
Sets the given label styles for the given paint state. The following styles are supported:- TLspTextStyle to get text with a specific font, font color, size, halo etc.
- TLspIconStyle to get custom images.
- ALspLabelTextProviderStyle to specify which text to use (default is
toString()
). See also TLspDataObjectLabelTextProviderStyle.- TLspLabelBoxStyle to specify fill color or frames
- TLspLabelOpacityStyle to specify the opacity and modulation color.
- TLspPinLineStyle to draw pins for the labels.
Use either
TLspPlotLayerBuilder.labelStyler(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.styler.ILspStyler)
orTLspPlotLayerBuilder.labelStyles(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.ALspStyle...)
, not both.- Overrides:
labelStyles
in classTLspPlotLayerBuilder
- Parameters:
aPaintState
- the paint state for which to set the label stylesaLabelStyles
- the new label styles for the layer- Returns:
this
-
labelScaleRange
Deprecated.Description copied from class:TLspPlotLayerBuilder
Sets a scale range within which the objects' labels are displayed. The layer will not paint any labels if the view's current scale is outside the given range. If not set, no scale range is used and the layer will always paint labels. This can lead to performance problems.- Overrides:
labelScaleRange
in classTLspPlotLayerBuilder
- Parameters:
aScaleRange
- The scale range- Returns:
- this
-
paintingHints
Deprecated. -
selectable
Deprecated.Description copied from class:TLspPlotLayerBuilder
Specifies whether layers should be selectable.- Overrides:
selectable
in classTLspPlotLayerBuilder
- Parameters:
aSelectable
- true if layers should be selectable- Returns:
- this
-
labelEditable
Deprecated.Description copied from class:TLspPlotLayerBuilder
Sets whether the labels of the layer should be editable. A default label editor will be used if no label editor is provided.- Overrides:
labelEditable
in classTLspPlotLayerBuilder
- Parameters:
aEditable
- whether the labels of the layer should be editable- Returns:
this
- See Also:
-
labelEditor
Deprecated.Description copied from class:TLspPlotLayerBuilder
Sets a custom label editor for the layer, alternatively you can useTLspPlotLayerBuilder.labelEditable(boolean)
to enable a default label editor.- Overrides:
labelEditor
in classTLspPlotLayerBuilder
- Parameters:
aEditor
- the label editor for the layer- Returns:
this
- See Also:
-
newBuilder
Deprecated.Creates a new builder.You must set a model on it using
model(com.luciad.model.ILcdModel)
.Default values:
- attributes: not set (no mandatory attributes)
- style(r): default
TLspPlotStyle
- scale range: not set (always visible)
- Returns:
- A builder
-
TLspPlotLayerBuilder
instead.