Class TLspBUFRLayerBuilder
java.lang.Object
com.luciad.view.lightspeed.layer.ALspLayerBuilder
com.luciad.format.bufr.lightspeed.TLspBUFRLayerBuilder
Layer builder for BUFR models. It implements standard BUFR/SIGWX visualization of a BUFR data model.
An example of how to use this builder:
ILspLayer layer = TLspBUFRLayerBuilder.newBuilder()
.model(model)
.label("My BUFR layer")
.build();
An example of how to add styling to a layer using this builder:
TLcdBUFRStyleSettings styleSettings = TLcdBUFRStyleSettings
.newBuilder()
.sigwxStyleSettings(
TLcdSIGWXStyleSettings
.newBuilder()
.cloudBorderColor(new Color(205, 0, 0))
.cloudBorderLineWidth(1)
.jetStreamLineColor(new Color(0, 139, 0))
.jetStreamLineWidth(3)
.jetStreamWindSymbolColor(new Color(0, 139, 0))
.jetStreamLabelForegroundColor(new Color(0, 139, 0))
.clearAirTurbulenceBorderColor(new Color(255, 255, 0))
.clearAirTurbulenceBorderLineWidth(2)
.volcanoLabelForegroundColor(Color.white)
.volcanoIconColor(Color.red)
.radiationIconColor(Color.red)
.radiationLabelForegroundColor(Color.white)
.stormIconColor(Color.red)
.stormLabelForegroundColor(Color.white)
.build())
.build();
ILspLayer styledLayer = TLspBUFRLayerBuilder.newBuilder()
.model(model)
.styleSettings(styleSettings)
.label("My styled BUFR layer")
.build();
Note that this layer builder cannot handle model tree nodes. In order to visualize a model tree node with multiple BUFR leaf models, one can create a layer tree node for the model tree node, and use this layer builder for the leaf BUFR models. See the Visualize BUFR data on a Lightspeed map tutorial for an example.
- Since:
- 2020.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a new layer instance.Sets the icon of the layer.Sets the label of the layer.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 TLspBUFRLayerBuilder
Returns a new layer builder with the default settingsselectable
(boolean aSelectable) Sets whether the layer should be selectablestyleSettings
(TLcdBUFRStyleSettings aBUFRStyleSettings) Sets the style settings to use when creating layersMethods inherited from class com.luciad.view.lightspeed.layer.ALspLayerBuilder
getIcon, getLabel, getLayerStyle, getLayerType, getModel
-
Method Details
-
newBuilder
Returns a new layer builder with the default settings- Returns:
- a new layer builder with the default settings.
-
selectable
Sets whether the layer should be selectable- Parameters:
aSelectable
- whether the layer should be selectable- Returns:
this
-
styleSettings
Sets the style settings to use when creating layers- Parameters:
aBUFRStyleSettings
- The style settings- Returns:
this
-
model
Sets the model of the layer. The default value isnull
.- Overrides:
model
in classALspLayerBuilder
- Parameters:
aModel
- a model- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the given model is not a BUFR model- See Also:
-
build
Description copied from class:ALspLayerBuilder
Creates a new layer instance.
- Specified by:
build
in classALspLayerBuilder
- Returns:
- the new layer instance
-
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:
-
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:
-
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:
-
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:
-