Package com.luciad.format.nvg.lightspeed
Class TLspNVGLayerBuilder
java.lang.Object
com.luciad.view.lightspeed.layer.ALspLayerBuilder
com.luciad.format.nvg.lightspeed.TLspNVGLayerBuilder
A layer builder for visualizing NVG data in a Lightspeed view.
- It uses an
TLspNVGStyler
for bodies and labels by default. - It has many of the options available on
TLspShapeLayerBuilder
.
layer
using
a custom TLspNVGStyler
or a custom ILspStyler
:
TLspNVGStyler nvgStyler = new TLspNVGStyler(); TLspNVGStyler customNVGStyler = new CustomNVGStyler(); ILspStyler customLabelStyler = new MyCustomLabelStyler(); TLspNVGLayerBuilder.newBuilder() .model(model) .bodyStyler(TLspPaintState.REGULAR, nvgStyler) .bodyStyler(TLspPaintState.SELECTED, customNVGStyler) .labelStyler(TLspPaintState.REGULAR, customLabelStyler) .labelStyler(TLspPaintState.SELECTED, customLabelStyler) .build();See
TLspNVGStyler
for more details on customization.
- Since:
- 2015.0
-
Method Summary
Modifier and TypeMethodDescriptionbodyEditable
(boolean aEditable) Sets whether the body of the symbols should be editable.bodyScaleRange
(ILcdInterval aBodyScaleRange) Sets the scale range for the body of the symbols.bodyStyler
(TLspPaintState aPaintState, ILspStyler aStyler) Sets the given body styler for the given paint state.build()
Creates a new layer instance.culling
(boolean aUseCulling) Sets whether objects outside the visible view portion are culled and not painted.editableSupported
(boolean aEditableSupported) Sets whether the layer should support editing.filter
(ILcdDynamicFilter aFilter) Sets a filter that will be used to filter objects to prevent them from being painted by the layer.Sets the icon of the layer.Sets the label of the layer.labelScaleRange
(ILcdInterval aLabelScaleRange) Sets the scale range for the labels of the symbols.labelStyler
(TLspPaintState aPaintState, ILspStyler aLabelStyler) Sets the given label styler for the given paint state.layerStyle
(TLspLayerStyle aLayerStyle) Set a layer style to be used during the rendering of the layer.layerType
(ILspLayer.LayerType aLayerType) Sets the layer type of the layer.Sets the model of the layer.static TLspNVGLayerBuilder
selectable
(boolean aSelectable) Sets whether the symbols should be selectable.Methods inherited from class com.luciad.view.lightspeed.layer.ALspLayerBuilder
getIcon, getLabel, getLayerStyle, getLayerType, getModel
-
Method Details
-
newBuilder
- Returns:
- a new NVG layer builder
-
build
Description copied from class:ALspLayerBuilder
Creates a new layer instance.
- Specified by:
build
in classALspLayerBuilder
- Returns:
- the new layer instance
-
layerType
Description copied from class:ALspLayerBuilder
Sets the layer type of the layer. The default value isILspLayer.LayerType.EDITABLE
.- Overrides:
layerType
in classALspLayerBuilder
- Parameters:
aLayerType
- the layer type- Returns:
- this builder
- See Also:
-
bodyEditable
Sets whether the body of the symbols should be editable.- Parameters:
aEditable
- whether the body of the symbols should be editable- Returns:
- this builder
-
bodyScaleRange
Sets the scale range for the body of the symbols.- Parameters:
aBodyScaleRange
- the scale range for the body of the symbols- Returns:
- this builder
-
culling
Sets whether objects outside the visible view portion are culled and not painted. Enabling culling restricts the objects that are painted to those that (approximately) overlap with the view. This typically reduces the memory usage and increases the frame rate. However because culling also introduces an additional overhead, you may get better performance by disabling it for either very dynamic layers or layers with only a small amount of objects.- Parameters:
aUseCulling
- whether the layer should use culling or not- Returns:
- this builder
-
filter
Sets a filter that will be used to filter objects to prevent them from being painted by the layer. No filter is set by default.- Parameters:
aFilter
- the filter- Returns:
this
-
icon
Description copied from class:ALspLayerBuilder
Sets the icon of the layer. The default value isnull
.- Overrides:
icon
in classALspLayerBuilder
- Parameters:
aIcon
- the icon- Returns:
- this builder
- See Also:
-
label
Description copied from class:ALspLayerBuilder
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 classALspLayerBuilder
- Parameters:
aLabel
- the label- Returns:
- this builder
- See Also:
-
labelScaleRange
Sets the scale range for the labels of the symbols.- Parameters:
aLabelScaleRange
- the scale range for the labels of the symbols- Returns:
- this builder
-
model
Description copied from class:ALspLayerBuilder
Sets the model of the layer. The default value isnull
.- Overrides:
model
in classALspLayerBuilder
- Parameters:
aModel
- a model- Returns:
- this builder
- See Also:
-
layerStyle
Description copied from class:ALspLayerBuilder
Set a layer style to be used during the rendering of the layer.TLspLayerStyle
is used to style the layer as a whole. Layer style can for example modify the transparency of a layer. Also, layer style can be modified after building the layer by callingILspLayer.setLayerStyle(TLspLayerStyle)
.- Overrides:
layerStyle
in classALspLayerBuilder
- Parameters:
aLayerStyle
- the layer style. Must not benull
. If you want to set the default layer style, setTLspLayerStyle.newBuilder().build()
- Returns:
- this
- See Also:
-
selectable
Sets whether the symbols should be selectable.- Parameters:
aSelectable
- whether the symbols should be selectable- Returns:
- this builder
-
bodyStyler
Sets the given body styler for the given paint state. By default, aTLspNVGStyler
is set, with the appropriateTLspPaintState
. Seeshape layer builder
for the list of supported styles.- Parameters:
aPaintState
- the paint state for which to set the body styleraStyler
- the new body styler for the layer- Returns:
this
-
labelStyler
Sets the given label styler for the given paint state. By default, aTLspNVGStyler
is set, with the appropriateTLspPaintState
. Seeshape layer builder
for the list of supported styles.- Parameters:
aPaintState
- the paint state for which to set the label styleraLabelStyler
- the new label styler for the layer- Returns:
this
-
editableSupported
Sets whether the layer should support editing. By default, nvg layers support edition.- Parameters:
aEditableSupported
- whether the layer should support edition.- Returns:
- this
See
TLspShapeLayerBuilder.editableSupported(boolean)
-