Class TLspS52LayerBuilder
Supports models
for an individual cell, or for whole catalogues.
Example:
String source = ...; ILcdModelDecoder decoder = new TLcdS57UnifiedModelDecoder(); ILcdModel s57Model = decoder.decode( source ); ILspLayer layer = TLspS52LayerBuilder.newBuilder().model(s57Model).build();
Note: it is not allowed to wrap the output of the S57 model decoder in an ordered model.
- Since:
- 2013.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates the layer.filter
(ILcdDynamicFilter aFilter) Specify a filter on the objects on this layer.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 the layer should be created for.static TLspS52LayerBuilder
Creates a new builder with default settings.opacity
(float aOpacity) Sets the overall transparency of the layer with aTLspLayerStyle
.s52DisplaySettings
(TLcdS52DisplaySettings aDisplaySettings) Specify theS52 display settings
to use in this layer.s52ProductConfiguration
(TLcdS52ProductConfiguration aProductConfiguration) Specify theS52 product configuration
to use in this layer.s52Symbology
(ILcdS52Symbology aSymbology) Specify theS52 symbology
to use in this layer.s57ProductConfiguration
(TLcdS57ProductConfiguration aProductConfiguration) Specify theS57 product configuration
to use in this layer.selectable
(boolean aSelectable) Sets whether the elements in the layer should be selectable.Methods inherited from class com.luciad.view.lightspeed.layer.ALspLayerBuilder
getIcon, getLabel, getLayerStyle, getLayerType, getModel
-
Method Details
-
build
Creates the layer.Before building the layer, you must have set a
model
.- Specified by:
build
in classALspLayerBuilder
- Returns:
- the new layer instance
- Throws:
IllegalStateException
- if no model has been specified
-
model
Sets the model the layer should be created for.
Setting a model is mandatory.
The model must be an S57 model: it must have aTLcdS57CatalogueModelDescriptor
orTLcdS57ModelDescriptor
and containS57 objects
.Note: it is not allowed to wrap the output of the S57 model decoder in an ordered model.
- Overrides:
model
in classALspLayerBuilder
- Parameters:
aModel
- a model, notnull
- Returns:
- this
- Throws:
IllegalArgumentException
- if the model is not a proper S57 model or when the model is an ordered model.- 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 is
null
.- Overrides:
label
in classALspLayerBuilder
- Parameters:
aLabel
- the label- Returns:
- this builder
- See Also:
-
icon
Description copied from class:ALspLayerBuilder
Sets the icon of the layer.The default value is
null
.- Overrides:
icon
in classALspLayerBuilder
- Parameters:
aIcon
- the icon- Returns:
- this builder
- See Also:
-
s52DisplaySettings
Specify theS52 display settings
to use in this layer.This call is optional. If not specified, the default
TLcdS52DisplaySettings
will be used.- Parameters:
aDisplaySettings
- S52 display settings to use.- Returns:
- this
-
s57ProductConfiguration
public TLspS52LayerBuilder s57ProductConfiguration(TLcdS57ProductConfiguration aProductConfiguration) Specify theS57 product configuration
to use in this layer.This call is optional. It is only necessary when you have customized S-57 attributes. If not specified, the
default
will be used.This product configuration should preferable be the one used when decoding the S-57 model.
- Parameters:
aProductConfiguration
- S57 product configuration to use.- Returns:
- this
-
s52ProductConfiguration
public TLspS52LayerBuilder s52ProductConfiguration(TLcdS52ProductConfiguration aProductConfiguration) Specify theS52 product configuration
to use in this layer.This call is optional. If not specified, the
default
will be used.The S52 product configuration is only used to create the
ILcdS52Symbology
, but you can also calls52Symbology(com.luciad.format.s52.ILcdS52Symbology)
to specify a customILcdS52Symbology
directly.- Parameters:
aProductConfiguration
- S52 product configuration to use.- Returns:
- this
-
s52Symbology
Specify theS52 symbology
to use in this layer.This call is optional. If not specified, the
default symbology
from theS-52 product configuration
will be used, based on thedisplay settings
.- Parameters:
aSymbology
- S52 symbology to use.- Returns:
- this
-
filter
Specify a filter on the objects on this layer.Operations on this layer will only be applied to objects of the model that pass the filter. This includes painting, labeling, selection, editing, ...
This call is optional. If not specified, no filter is applied.
See
ALcdDynamicFilter
for a convenience class that handles change listeners and events.- Parameters:
aFilter
- The filter to set- Returns:
- this
-
selectable
Sets whether the elements in the layer should be selectable.By default, this is on (true).
- Parameters:
aSelectable
- whether the layer should be selectable- Returns:
- this
-
layerType
Description copied from class:ALspLayerBuilder
Sets the layer type of the layer.The default value is
ILspLayer.LayerType.EDITABLE
.- Overrides:
layerType
in classALspLayerBuilder
- Parameters:
aLayerType
- the layer type- Returns:
- this builder
- See Also:
-
opacity
Sets the overall transparency of the layer with aTLspLayerStyle
.By default, this is 1 (fully opaque).
- Parameters:
aOpacity
- Transparency of the new layer, between 0 (fully transparent) and 1 (fully opaque).
-
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:
-
newBuilder
Creates a new builder with default settings.Before using
build()
to create the layer, you must specify amodel
.- Returns:
- A new builder with default settings.
-