Class TLspNVGLayerBuilder

java.lang.Object
com.luciad.view.lightspeed.layer.ALspLayerBuilder
com.luciad.format.nvg.lightspeed.TLspNVGLayerBuilder

public class TLspNVGLayerBuilder extends ALspLayerBuilder
A layer builder for visualizing NVG data in a Lightspeed view.

You can also create a layer using a custom TLspNVGStyler or a custom ILspStyler:

 TLspNVGStyler nvgStyler = new TLspNVGStyler();
 TLspNVGStyler customNVGStyler = new CustomNVGStyler();
 ILspStyler customLabelStyler = new MyCustomLabelStyler();
 TLspNVGLayerBuilder.newBuilder()
                      .model(model)
                      .bodyStyler(TLspPaintState.REGULAR, nvgStyler)
                      .bodyStyler(TLspPaintState.SELECTED, customNVGStyler)
                      .labelStyler(TLspPaintState.REGULAR, customLabelStyler)
                      .labelStyler(TLspPaintState.SELECTED, customLabelStyler)
                      .build();
 
See TLspNVGStyler for more details on customization.

Since:
2015.0
  • Method Details

    • newBuilder

      public static TLspNVGLayerBuilder newBuilder()
      Returns:
      a new NVG layer builder
    • build

      Description copied from class: ALspLayerBuilder

      Creates a new layer instance.

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

      public TLspNVGLayerBuilder 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:
    • bodyEditable

      public TLspNVGLayerBuilder bodyEditable(boolean aEditable)
      Sets whether the body of the symbols should be editable.
      Parameters:
      aEditable - whether the body of the symbols should be editable
      Returns:
      this builder
    • bodyScaleRange

      public TLspNVGLayerBuilder bodyScaleRange(ILcdInterval aBodyScaleRange)
      Sets the scale range for the body of the symbols.
      Parameters:
      aBodyScaleRange - the scale range for the body of the symbols
      Returns:
      this builder
    • culling

      public TLspNVGLayerBuilder culling(boolean aUseCulling)
      Sets whether objects outside the visible view portion are culled and not painted.

      Enabling culling restricts the objects that are painted to those that (approximately) overlap with the view. This typically reduces the memory usage and increases the frame rate. However because culling also introduces an additional overhead, you may get better performance by disabling it for either very dynamic layers or layers with only a small amount of objects.

      Parameters:
      aUseCulling - whether the layer should use culling or not
      Returns:
      this builder
    • filter

      public TLspNVGLayerBuilder 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
    • icon

      public TLspNVGLayerBuilder icon(ILcdIcon aIcon)
      Description copied from class: ALspLayerBuilder
      Sets the icon of the layer.

      The default value is null.

      Overrides:
      icon in class ALspLayerBuilder
      Parameters:
      aIcon - the icon
      Returns:
      this builder
      See Also:
    • label

      public TLspNVGLayerBuilder label(String aLabel)
      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 class ALspLayerBuilder
      Parameters:
      aLabel - the label
      Returns:
      this builder
      See Also:
    • labelScaleRange

      public TLspNVGLayerBuilder labelScaleRange(ILcdInterval aLabelScaleRange)
      Sets the scale range for the labels of the symbols.
      Parameters:
      aLabelScaleRange - the scale range for the labels of the symbols
      Returns:
      this builder
    • model

      public TLspNVGLayerBuilder model(ILcdModel aModel)
      Description copied from class: ALspLayerBuilder
      Sets the model of the layer.

      The default value is null.

      Overrides:
      model in class ALspLayerBuilder
      Parameters:
      aModel - a model
      Returns:
      this builder
      See Also:
    • layerStyle

      public TLspNVGLayerBuilder 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:
    • selectable

      public TLspNVGLayerBuilder selectable(boolean aSelectable)
      Sets whether the symbols should be selectable.
      Parameters:
      aSelectable - whether the symbols should be selectable
      Returns:
      this builder
    • bodyStyler

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

      By default, a TLspNVGStyler is set, with the appropriate TLspPaintState.

      See shape layer builder for the list of supported styles.

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

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

      By default, a TLspNVGStyler is set, with the appropriate TLspPaintState.

      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
    • editableSupported

      public TLspNVGLayerBuilder editableSupported(boolean aEditableSupported)
      Sets whether the layer should support editing. By default, nvg layers support edition.
      Parameters:
      aEditableSupported - whether the layer should support edition.
      Returns:
      this See TLspShapeLayerBuilder.editableSupported(boolean)