Class TLspARINCLayerBuilder

java.lang.Object
com.luciad.view.lightspeed.layer.ALspLayerBuilder
com.luciad.format.arinc.view.lightspeed.TLspARINCLayerBuilder

public final class TLspARINCLayerBuilder extends ALspLayerBuilder
A layer builder for visualizing ARINC data in a Lightspeed view.

This layer builder is for convenience:

  • It uses an AIS styler for bodies and labels, configured for ARINC.
  • 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(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.

Since:
2014.0
  • Field Details

    • SYMBOLOGY_ENCODING_FILES_LOCATION

      public static final String SYMBOLOGY_ENCODING_FILES_LOCATION
      Location of the ARINC-specific .sld files for use in a TLspAISStyler.
      See Also:
  • Method Details

    • newBuilder

      public static TLspARINCLayerBuilder newBuilder()
      Creates a new ARINC layer builder with a TLspAISStyler configured for ARINC.
      Returns:
      a new ARINC 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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder bodyStyler(TLspPaintState aPaintState, ILspStyler aBodyStyler)
      Sets the given body styler for the given paint state.

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

      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 TLspARINCLayerBuilder labelStyler(TLspPaintState aPaintState, ILspStyler aLabelStyler)
      Sets the given label styler for the given paint state.

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

      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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder model(ILcdModel aModel)
      Sets the model used by the layer.

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

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

      public TLspARINCLayerBuilder 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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder 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 TLspARINCLayerBuilder sldLocations(String... aSLDLocations)
      Configure extra locations of .sld files in addition to the default ARINC configuration. See TLspAISStyler for more details.
      Parameters:
      aSLDLocations - extra locations of .sld files.
      Returns:
      this
    • layerStyle

      public TLspARINCLayerBuilder 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: