public final class TLspSelectionStylerBuilder extends Object
Builds an styler
wrapper that adds or changes selection specific style elements from the
wrapped styler:
//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();
Modifier and Type | Method and Description |
---|---|
ALspStyler |
build()
Returns a new
ALspStyler instance. |
TLspSelectionStylerBuilder |
fillColor(Color aFillColor)
Sets the fill selection color.
|
static TLspSelectionStylerBuilder |
newBuilder()
Create a new builder instance
|
TLspSelectionStylerBuilder |
outlineColor(Color aOutlineColor)
Sets the selection color for outlines.
|
TLspSelectionStylerBuilder |
styler(ALspStyler aStyler)
Sets the styler to be wrapped by the selection styler.
|
TLspSelectionStylerBuilder |
styles(ALspStyle... aStyles)
Sets the styles to be wrapped by the selection styler.
|
public static TLspSelectionStylerBuilder newBuilder()
public TLspSelectionStylerBuilder styles(ALspStyle... aStyles)
Use either styler(com.luciad.view.lightspeed.style.styler.ALspStyler)
or styles(com.luciad.view.lightspeed.style.ALspStyle...)
, not both.
aStyles
- the styles to be wrapped by the selection stylerpublic TLspSelectionStylerBuilder styler(ALspStyler aStyler)
Use either styler(com.luciad.view.lightspeed.style.styler.ALspStyler)
or styles(com.luciad.view.lightspeed.style.ALspStyle...)
, not both.
aStyler
- the styler to be wrapped by the selection stylerpublic TLspSelectionStylerBuilder fillColor(Color aFillColor)
TLspFillStyle
.
The alpha component of the selection color will be the result of the multiplication of the alpha component of the
original fill color and the fill selection color.aFillColor
- the fill selection colorpublic TLspSelectionStylerBuilder outlineColor(Color aOutlineColor)
aOutlineColor
- the outline selection colorpublic ALspStyler build()
ALspStyler
instance.ALspStyler
.