public class TLspVPFLayerBuilder extends ALspLayerBuilder
Layer builder for VPF models which are decoded by the TLcdVPFModelDecoder
.
This builder only accepts models with a TLcdVPFModelDescriptor
.
The builder supports model trees which combine multiple VPF feature classes as well as individual models.
This builder creates layers which use a TLspVPFGeoSymStyler
and TLspVPFGeoSymLabelStyler
.
The user can choose between full and simplified styling using simplifiedStyling(boolean)
.
Modifier and Type | Method and Description |
---|---|
ILspLayer |
build()
Creates a new layer for the given model and configures GeoSym styling.
|
TLspVPFLayerBuilder |
icon(ILcdIcon aIcon)
Sets the icon of the layer.
|
TLspVPFLayerBuilder |
label(String aLabel)
Sets the label of the layer.
|
TLspVPFLayerBuilder |
layerStyle(TLspLayerStyle aLayerStyle)
Set a layer style to be used during the rendering of the layer.
|
TLspVPFLayerBuilder |
layerType(ILspLayer.LayerType aLayerType)
Sets the layer type of the layer.
|
TLspVPFLayerBuilder |
model(ILcdModel aModel)
Sets the model of the layer.
|
static TLspVPFLayerBuilder |
newBuilder() |
TLspVPFLayerBuilder |
simplifiedStyling(boolean aSimplifiedStyling)
Specifies whether the builder should configure full or simplified GeoSym styling
for the layers it creates.
|
getIcon, getLabel, getLayerStyle, getLayerType, getModel
public static TLspVPFLayerBuilder newBuilder()
public TLspVPFLayerBuilder simplifiedStyling(boolean aSimplifiedStyling)
false
.aSimplifiedStyling
- true to use simplified styling, false to use full stylingpublic ILspLayer build()
ILcdModelTreeNode
, the builder will create a
TLspLayerTreeNode
with the same structure. Otherwise, it will
create an individual layer.build
in class ALspLayerBuilder
public TLspVPFLayerBuilder model(ILcdModel aModel)
ALspLayerBuilder
null
.model
in class ALspLayerBuilder
aModel
- a modelILcdLayer.getModel()
public TLspVPFLayerBuilder label(String aLabel)
ALspLayerBuilder
null
.label
in class ALspLayerBuilder
aLabel
- the labelILcdLayer.getLabel()
public TLspVPFLayerBuilder icon(ILcdIcon aIcon)
ALspLayerBuilder
null
.icon
in class ALspLayerBuilder
aIcon
- the iconILcdLayer.getIcon()
public TLspVPFLayerBuilder layerType(ILspLayer.LayerType aLayerType)
ALspLayerBuilder
ILspLayer.LayerType.EDITABLE
.layerType
in class ALspLayerBuilder
aLayerType
- the layer typeILspLayer.getLayerType()
public TLspVPFLayerBuilder layerStyle(TLspLayerStyle aLayerStyle)
ALspLayerBuilder
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 calling
ILspLayer.setLayerStyle(TLspLayerStyle)
.layerStyle
in class ALspLayerBuilder
aLayerStyle
- the layer style. Must not be null
. If you want to set the default layer style, set TLspLayerStyle.newBuilder().build()
ILspLayer.getLayerStyle()
,
ILspLayer.setLayerStyle(TLspLayerStyle)