public final class TLspAIXMLayerBuilder extends ALspLayerBuilder
AIS styler
for bodies and labels, configured for AIXM
.TLspAISStyler
.TLspShapeLayerBuilder
.layer
using
a custom TLspAISStyler
or a custom ILspStyler
:
TLspAISStyler aisStyler = new TLspAISStyler(TLspAIXMLayerBuilder.SYMBOLOGY_ENCODING_FILES_LOCATION); TLspAISStyler customAisStyler = new TLspAISStyler(MY_CUSTOM_LOCATION); ILspStyler customStyler = new MyCustomStyler(); TLspShapeLayerBuilder.newBuilder() .model(model) .bodyStyler(TLspPaintState.REGULAR, aisStyler) .bodyStyler(TLspPaintState.SELECTED, customAisStyler) .labelStyler(TLspPaintState.REGULAR, aisStyler) .labelStyler(TLspPaintState.SELECTED, customStyler) .build();See
TLspAISStyler
for more details on customization.
Modifier and Type | Field and Description |
---|---|
static String |
SYMBOLOGY_ENCODING_FILES_LOCATION
Location of the AIXM-specific
.sld files for use in a TLspAISStyler . |
Modifier and Type | Method and Description |
---|---|
TLspAIXMLayerBuilder |
bodyEditable(boolean aEditable)
Sets whether the body of the layer should be editable.
|
TLspAIXMLayerBuilder |
bodyEditor(ILspEditor aEditor)
Sets the body editor for the layer, alternatively you can use
bodyEditable(boolean) to enable a default editor. |
TLspAIXMLayerBuilder |
bodyScaleRange(ILcdInterval aBodyScaleRange)
Sets the scale range for the body of the layer.
|
TLspAIXMLayerBuilder |
bodyStyler(TLspPaintState aPaintState,
ILspStyler aBodyStyler)
Sets the given body styler for the given paint state.
|
ILspInteractivePaintableLayer |
build()
Creates a new layer instance.
|
TLspAIXMLayerBuilder |
editableSupported(boolean aEditableSupported)
Sets whether the layer should support editing.
|
TLspAIXMLayerBuilder |
filter(ILcdDynamicFilter aFilter)
Sets a filter that will be used to filter objects to prevent them from
being painted by the layer.
|
TLspAIXMLayerBuilder |
icon(ILcdIcon aIcon)
Sets the legend icon for the layer.
|
TLspAIXMLayerBuilder |
label(String aLabel)
Sets the textual label for the layer.
|
TLspAIXMLayerBuilder |
labelEditable(boolean aEditable)
Sets whether the labels of the layer should be editable.
|
TLspAIXMLayerBuilder |
labelEditor(ILspEditor aEditor)
Sets a custom label editor for the layer, alternatively you can use
labelEditable(boolean) to enable a default label editor. |
TLspAIXMLayerBuilder |
labelScaleRange(ILcdInterval aLabelScaleRange)
Sets the scale range for the labels of the layer
By default, no scale range is used.
|
TLspAIXMLayerBuilder |
labelStyler(TLspPaintState aPaintState,
ILspStyler aLabelStyler)
Sets the given label styler for the given paint state.
|
TLspAIXMLayerBuilder |
layerStyle(TLspLayerStyle aLayerStyle)
Set a layer style to be used during the rendering of the layer.
|
TLspAIXMLayerBuilder |
layerType(ILspLayer.LayerType aLayerType)
Sets the layer type of the layer.
|
TLspAIXMLayerBuilder |
model(ILcdModel aModel)
Sets the model used by the layer.
|
static TLspAIXMLayerBuilder |
newBuilder()
Creates a new AIXM layer builder with a
TLspAISStyler configured for AIXM . |
TLspAIXMLayerBuilder |
selectable(boolean aSelectable)
Sets whether the layer should be selectable.
|
TLspAIXMLayerBuilder |
selectableSupported(boolean aSelectableSupported)
Sets whether the layer should support selection.
|
TLspAIXMLayerBuilder |
sldLocations(String... aSLDLocations)
Configure extra locations of
.sld files in addition to the default AIXM configuration. |
getIcon, getLabel, getLayerStyle, getLayerType, getModel
public static final String SYMBOLOGY_ENCODING_FILES_LOCATION
.sld
files for use in a TLspAISStyler
.public static TLspAIXMLayerBuilder newBuilder()
TLspAISStyler
configured for AIXM
.public ILspInteractivePaintableLayer build()
ALspLayerBuilder
Creates a new layer instance.
build
in class ALspLayerBuilder
public TLspAIXMLayerBuilder selectable(boolean aSelectable)
aSelectable
- whether the layer should be selectablethis
public TLspAIXMLayerBuilder selectableSupported(boolean aSelectableSupported)
aSelectableSupported
- whether the layer should support selectionthis
public TLspAIXMLayerBuilder editableSupported(boolean aEditableSupported)
aEditableSupported
- whether the layer should support selectionthis
public TLspAIXMLayerBuilder bodyEditable(boolean aEditable)
aEditable
- whether the body of the layer should be editablethis
bodyEditor(ILspEditor)
public TLspAIXMLayerBuilder labelEditable(boolean aEditable)
aEditable
- whether the labels of the layer should be editablethis
labelEditor(ILspEditor)
public TLspAIXMLayerBuilder bodyStyler(TLspPaintState aPaintState, ILspStyler aBodyStyler)
TLspAISStyler
is set, configured for AIXM
.
See shape layer builder
for the list of supported styles.aPaintState
- the paint state for which to set the body styleraBodyStyler
- the new body styler for the layerthis
public TLspAIXMLayerBuilder labelStyler(TLspPaintState aPaintState, ILspStyler aLabelStyler)
TLspAISStyler
is set, configured for AIXM
.
See shape layer builder
for the list of supported styles.aPaintState
- the paint state for which to set the label styleraLabelStyler
- the new label styler for the layerthis
public TLspAIXMLayerBuilder bodyEditor(ILspEditor aEditor)
bodyEditable(boolean)
to enable a default editor.aEditor
- the body editor for the layerthis
TLspShapeEditor
public TLspAIXMLayerBuilder labelEditor(ILspEditor aEditor)
labelEditable(boolean)
to enable a default label editor.aEditor
- the label editor for the layerthis
TLspLabelEditor
public TLspAIXMLayerBuilder bodyScaleRange(ILcdInterval aBodyScaleRange)
aBodyScaleRange
- the scale range for the body of the layerthis
public TLspAIXMLayerBuilder labelScaleRange(ILcdInterval aLabelScaleRange)
aLabelScaleRange
- the scale range for the labels of the layerthis
public TLspAIXMLayerBuilder filter(ILcdDynamicFilter aFilter)
aFilter
- the filterthis
public TLspAIXMLayerBuilder model(ILcdModel aModel)
This is mandatory. The model must have a data model
with AIXM data types
.
model
in class ALspLayerBuilder
aModel
- a AIXM model, not null
this
ILcdLayer.getModel()
public TLspAIXMLayerBuilder label(String aLabel)
This is optional, by default the model descriptor's display name is used.
label
in class ALspLayerBuilder
aLabel
- the label, not null
this
ILcdLayer.getLabel()
public TLspAIXMLayerBuilder icon(ILcdIcon aIcon)
This is optional, by default an icon is chosen based on the model content.
icon
in class ALspLayerBuilder
aIcon
- the icon, not null
this
ILcdLayer.getIcon()
public TLspAIXMLayerBuilder layerType(ILspLayer.LayerType aLayerType)
ALspLayerBuilder
ILspLayer.LayerType.EDITABLE
.layerType
in class ALspLayerBuilder
aLayerType
- the layer typeILspLayer.getLayerType()
public TLspAIXMLayerBuilder sldLocations(String... aSLDLocations)
.sld
files in addition to the default AIXM
configuration.
See TLspAISStyler
for more details.aSLDLocations
- extra locations of .sld
files.public TLspAIXMLayerBuilder 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)