Class TLspGARSGridLayerBuilder
Builder for creating ILspLayer
instances that visualize Global Area Reference System (GARS) grid data.
The styling of the GARS grid and its labels can be done by creating a TLspGARSGridStyle
and passing it to the style
builder method.
An example of how to use this builder:
ILcdModel model = TLspGARSGridLayerBuilder.createModel("GARS Grid");
// See TLspGARSGridStyle for more information on configuring the grid style
ILspLayer layer = TLspGARSGridLayerBuilder.newBuilder()
.model(model)
.label("GARS Grid")
.build();
- Since:
- 2021.1
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a new layer instance.static ILcdModel
createModel
(String aModelName) Creates a model that can be used by this builder.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) This method is not supported for GARS grid layersSets the model of the layer.static TLspGARSGridLayerBuilder
Returns a new GARS grid layer builderoverlayLabel
(TLspGARSGridOverlayLabelBuilder aOverlayLabelBuilder, Object aConstraint) Adds an overlay label to be used.style
(TLspGARSGridStyle aGARSGridStyle) Sets the style to be used by this layer.Methods inherited from class com.luciad.view.lightspeed.layer.ALspLayerBuilder
getIcon, getLabel, getLayerStyle, getLayerType, getModel, icon
-
Method Details
-
newBuilder
Returns a new GARS grid layer builder- Returns:
- a new GARS grid layer builder
-
createModel
Creates a model that can be used by this builder. When no model is set on the builder, a default model is used instead. It is possible to customize the model name, which is used as a default display name for the layer created by this builder.
- Parameters:
aModelName
- The desired model name- Returns:
- A model that can be used in this builder.
-
model
Sets the model of the layer. This model should be created using the
createModel
method of this class. If not, anIllegalArgumentException
is thrown.Calling this method is optional. If not called, a default model is used.
- Overrides:
model
in classALspLayerBuilder
- Parameters:
aModel
- a model- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the given model is not created using thecreateModel
method.- See Also:
-
label
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""GARS Grid""
.- Overrides:
label
in classALspLayerBuilder
- Parameters:
aLabel
- the label- Returns:
- this builder
- See Also:
-
layerType
This method is not supported for GARS grid layers- Overrides:
layerType
in classALspLayerBuilder
- Parameters:
aLayerType
- the layer type- Returns:
- this builder
- Throws:
UnsupportedOperationException
- this method is not supported for GARS grid layers- 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:
-
style
Sets the style to be used by this layer.- Parameters:
aGARSGridStyle
- the GARS grid style to use.- Returns:
- this builder.
-
overlayLabel
public TLspGARSGridLayerBuilder overlayLabel(TLspGARSGridOverlayLabelBuilder aOverlayLabelBuilder, Object aConstraint) Adds an overlay label to be used. When the layer (built using this builder) is added to the view, this overlay label builder is used to add an overlay component to a view. The overlay component is also removed when the layer is removed from a view.- Parameters:
aOverlayLabelBuilder
- the overlay label builder used to create an overlay component. It is not needed to call theTLspGARSGridOverlayLabelBuilder.view()
method before calling this method.aConstraint
- an object expressing layout constraints for this component, usually one of these location constants.- Returns:
- this builder.
-
build
Creates a new layer instance.
This builder returns an
ILspStyledLayer
that containsILspCustomizableStyler
instances.- Specified by:
build
in classALspLayerBuilder
- Returns:
- the new layer instance
-