Class TLspAIXMLayerBuilder

java.lang.Object
com.luciad.view.lightspeed.layer.ALspLayerBuilder
com.luciad.format.aixm.view.lightspeed.TLspAIXMLayerBuilder

public final class TLspAIXMLayerBuilder extends ALspLayerBuilder
A layer builder for visualizing AIXM 3/4 data in a Lightspeed view.

This layer builder is for convenience:

  • It uses an AIS styler for bodies and labels, configured for AIXM.
  • It can directly customize TLspAISStyler.
  • It sets appropriate layer icons based on the model contents.
  • It sets appropriate layer labels.
  • It has many of the options available on TLspShapeLayerBuilder.

You can also create a 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.

Since:
2014.0
  • Field Details

  • Method Details

    • newBuilder

      public static TLspAIXMLayerBuilder newBuilder()
      Creates a new AIXM layer builder with a TLspAISStyler configured for AIXM.
      Returns:
      a new AIXM layer builder.
    • build

      Description copied from class: ALspLayerBuilder

      Creates a new layer instance.

      Specified by:
      build in class ALspLayerBuilder
      Returns:
      the new layer instance
    • selectable

      public TLspAIXMLayerBuilder selectable(boolean aSelectable)
      Sets whether the layer should be selectable.

      By default, it is selectable.

      Parameters:
      aSelectable - whether the layer should be selectable
      Returns:
      this
    • selectableSupported

      public TLspAIXMLayerBuilder selectableSupported(boolean aSelectableSupported)
      Sets whether the layer should support selection.

      By default, it support selection.

      Parameters:
      aSelectableSupported - whether the layer should support selection
      Returns:
      this
    • editableSupported

      public TLspAIXMLayerBuilder editableSupported(boolean aEditableSupported)
      Sets whether the layer should support editing.

      By default, layers support editing.

      Parameters:
      aEditableSupported - whether the layer should support selection
      Returns:
      this
    • bodyEditable

      public TLspAIXMLayerBuilder bodyEditable(boolean aEditable)
      Sets whether the body of the layer should be editable. A default body editor will be used if no body editor is provided.

      By default, the bodies are not editable.

      Parameters:
      aEditable - whether the body of the layer should be editable
      Returns:
      this
      See Also:
    • labelEditable

      public TLspAIXMLayerBuilder labelEditable(boolean aEditable)
      Sets whether the labels of the layer should be editable. A default label editor will be used if no label editor is provided.

      By default, the labels are not editable.

      Parameters:
      aEditable - whether the labels of the layer should be editable
      Returns:
      this
      See Also:
    • bodyStyler

      public TLspAIXMLayerBuilder bodyStyler(TLspPaintState aPaintState, ILspStyler aBodyStyler)
      Sets the given body styler for the given paint state.

      By default, a TLspAISStyler is set, configured for AIXM.

      See shape layer builder for the list of supported styles.

      Parameters:
      aPaintState - the paint state for which to set the body styler
      aBodyStyler - the new body styler for the layer
      Returns:
      this
    • labelStyler

      public TLspAIXMLayerBuilder labelStyler(TLspPaintState aPaintState, ILspStyler aLabelStyler)
      Sets the given label styler for the given paint state.

      By default, a TLspAISStyler is set, configured for AIXM.

      See shape layer builder for the list of supported styles.

      Parameters:
      aPaintState - the paint state for which to set the label styler
      aLabelStyler - the new label styler for the layer
      Returns:
      this
    • bodyEditor

      public TLspAIXMLayerBuilder bodyEditor(ILspEditor aEditor)
      Sets the body editor for the layer, alternatively you can use bodyEditable(boolean) to enable a default editor.
      Parameters:
      aEditor - the body editor for the layer
      Returns:
      this
      See Also:
    • labelEditor

      public TLspAIXMLayerBuilder labelEditor(ILspEditor aEditor)
      Sets a custom label editor for the layer, alternatively you can use labelEditable(boolean) to enable a default label editor.
      Parameters:
      aEditor - the label editor for the layer
      Returns:
      this
      See Also:
    • bodyScaleRange

      public TLspAIXMLayerBuilder bodyScaleRange(ILcdInterval aBodyScaleRange)
      Sets the scale range for the body of the layer.

      By default, no scale range is used.

      Parameters:
      aBodyScaleRange - the scale range for the body of the layer
      Returns:
      this
    • labelScaleRange

      public TLspAIXMLayerBuilder labelScaleRange(ILcdInterval aLabelScaleRange)
      Sets the scale range for the labels of the layer

      By default, no scale range is used.

      Parameters:
      aLabelScaleRange - the scale range for the labels of the layer
      Returns:
      this
    • filter

      public TLspAIXMLayerBuilder filter(ILcdDynamicFilter aFilter)
      Sets a filter that will be used to filter objects to prevent them from being painted by the layer.

      No filter is set by default.

      Parameters:
      aFilter - the filter
      Returns:
      this
    • model

      public TLspAIXMLayerBuilder model(ILcdModel aModel)
      Sets the model used by the layer.

      This is mandatory. The model must have a data model with AIXM data types.

      Overrides:
      model in class ALspLayerBuilder
      Parameters:
      aModel - a AIXM model, not null
      Returns:
      this
      See Also:
    • label

      public TLspAIXMLayerBuilder label(String aLabel)
      Sets the textual label for the layer.

      This is optional, by default the model descriptor's display name is used.

      Overrides:
      label in class ALspLayerBuilder
      Parameters:
      aLabel - the label, not null
      Returns:
      this
      See Also:
    • icon

      public TLspAIXMLayerBuilder icon(ILcdIcon aIcon)
      Sets the legend icon for the layer.

      This is optional, by default an icon is chosen based on the model content.

      Overrides:
      icon in class ALspLayerBuilder
      Parameters:
      aIcon - the icon, not null
      Returns:
      this
      See Also:
    • layerType

      public TLspAIXMLayerBuilder layerType(ILspLayer.LayerType aLayerType)
      Description copied from class: ALspLayerBuilder
      Sets the layer type of the layer.

      The default value is ILspLayer.LayerType.EDITABLE.

      Overrides:
      layerType in class ALspLayerBuilder
      Parameters:
      aLayerType - the layer type
      Returns:
      this builder
      See Also:
    • sldLocations

      public TLspAIXMLayerBuilder sldLocations(String... aSLDLocations)
      Configure extra locations of .sld files in addition to the default AIXM configuration. See TLspAISStyler for more details.
      Parameters:
      aSLDLocations - extra locations of .sld files.
      Returns:
      this
    • layerStyle

      public TLspAIXMLayerBuilder layerStyle(TLspLayerStyle aLayerStyle)
      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 calling ILspLayer.setLayerStyle(TLspLayerStyle).
      Overrides:
      layerStyle in class ALspLayerBuilder
      Parameters:
      aLayerStyle - the layer style. Must not be null. If you want to set the default layer style, set TLspLayerStyle.newBuilder().build()
      Returns:
      this
      See Also: