Class TLspSelectionStylerBuilder

java.lang.Object
com.luciad.view.lightspeed.style.TLspSelectionStylerBuilder

public final class TLspSelectionStylerBuilder extends Object

Builds an styler wrapper that adds or changes selection specific style elements from the wrapped styler:

  • Lines: Line selection color replaces the original line color
  • Areas: Line and fill selection color replaces the original color
  • Icons: A rectangle is added around the icon (bounding box for 3D icons)
  • Text: Text selection color replaces the original color and a default black halo is added
  • Complex strokes: A halo is added

Example

    //Create the style for the body. Here we use a single ALspStyle,
    //but it also works for an ALspStyler
    ALspStyle iconStyle = TLspIconStyle.newBuilder()
                                       .build();

    //Use the TLspSelectionStylerBuilder to create a selection styler
    ALspStyler selectionStyler = TLspSelectionStylerBuilder.newBuilder()
                                                           .styles(iconStyle)
                                                           .outlineColor(Color.BLUE)
                                                           .build();

    //Install the selection styler on the layer
    TLspLayer layer = TLspShapeLayerBuilder.newBuilder()
                                           .bodyStyler(TLspPaintState.REGULAR, iconStyle)
                                           .bodyStyler(TLspPaintState.SELECTED, selectionStyler)
                                           .model(model)
                                           .build();
Since:
2017.1