Package com.luciad.view.lightspeed.style
Class TLspLabelOpacityStyle.Builder<B extends TLspLabelOpacityStyle.Builder<B>>
java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle.Builder<B>
com.luciad.view.lightspeed.style.TLspLabelOpacityStyle.Builder<B>
- Enclosing class:
TLspLabelOpacityStyle
public static class TLspLabelOpacityStyle.Builder<B extends TLspLabelOpacityStyle.Builder<B>>
extends ALspStyle.Builder<B>
Builder for label opacity styles. The default style has a white color and is fully opaque.
Example usages:
To create the default opacity style:
TLspLabelOpacityStyle whiteNotDraped = TLspLabelOpacityStyle.newBuilder().build();
To create a half transparent, red style:TLspLabelOpacityStyle redDraped = TLspLabelOpacityStyle.newBuilder().color( Color.red ).opacity( 0.5f ).build();
- Since:
- 2012.0
-
Constructor Summary
-
Method Summary
Methods inherited from class com.luciad.view.lightspeed.style.ALspStyle.Builder
equals, hashCode
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
color
Sets the color. Should not benull
.- Parameters:
aColor
- the color- Returns:
this
- Throws:
IllegalArgumentException
-if aColor==null
-
opacity
Sets the opacity (alpha) value for the color. This is a convenience method: One could equally well use thecolor(...)
method. However, this method leaves the RGB values intact and only modifies the alpha value. Note that, the other way around, thecolor(...)
method does override the set alpha value.- Parameters:
aOpacity
- the alpha value. Must be contained in the [0,1] interval (0 is fully transparent, 1 is fully opaque).- Returns:
this
-
all
Description copied from class:ALspStyle.Builder
Sets all parameters on the builder based on the given style. This is useful for example to create a new style that has almost all properties equal to another style.- Specified by:
all
in classALspStyle.Builder<B extends TLspLabelOpacityStyle.Builder<B>>
- Parameters:
aColorStyle
- the style to copy- Returns:
this
-
build
Description copied from class:ALspStyle.Builder
Builds the style with the set parameters.- Specified by:
build
in classALspStyle.Builder<B extends TLspLabelOpacityStyle.Builder<B>>
- Returns:
- the resulting style
-