public static class TLspLabelOpacityStyle.Builder<B extends TLspLabelOpacityStyle.Builder<B>> extends ALspStyle.Builder<B>
TLspLabelOpacityStyle whiteNotDraped = TLspLabelOpacityStyle.newBuilder().build();
To create a half transparent, red style:TLspLabelOpacityStyle redDraped = TLspLabelOpacityStyle.newBuilder().color( Color.red ).opacity( 0.5f ).build();
Modifier | Constructor and Description |
---|---|
protected |
Builder() |
Modifier and Type | Method and Description |
---|---|
B |
all(ALspStyle aColorStyle)
Sets all parameters on the builder based on the given style.
|
TLspLabelOpacityStyle |
build()
Builds the style with the set parameters.
|
B |
color(Color aColor)
Sets the color.
|
B |
opacity(float aOpacity)
Sets the opacity (alpha) value for the color.
|
equals, hashCode
public B color(Color aColor)
null
.aColor
- the colorthis
IllegalArgumentException
- if aColor==null
public B opacity(float aOpacity)
color(...)
method.
However, this method leaves the RGB values intact and only
modifies the alpha value. Note that, the other way around,
the color(...)
method does override the set alpha value.aOpacity
- the alpha value.
Must be contained in the [0,1] interval (0 is fully transparent, 1 is fully opaque).this
public B all(ALspStyle aColorStyle)
ALspStyle.Builder
all
in class ALspStyle.Builder<B extends TLspLabelOpacityStyle.Builder<B>>
aColorStyle
- the style to copythis
public TLspLabelOpacityStyle build()
ALspStyle.Builder
build
in class ALspStyle.Builder<B extends TLspLabelOpacityStyle.Builder<B>>