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