public static class TLspLabelBoxStyle.Builder<B extends TLspLabelBoxStyle.Builder<B>> extends ALspStyle.Builder<B>
Builder for label box styles.
The default label box style has a padding of 2, a 1-pixel border and no fill.
Modifier | Constructor and Description |
---|---|
protected |
Builder() |
Modifier and Type | Method and Description |
---|---|
B |
all(ALspStyle aStyle)
Copies all properties from the given style.
|
TLspLabelBoxStyle |
build()
Constructs a label style with the set parameters.
|
B |
fillColor(Color aFillColor)
Sets the background color.
|
B |
filled(boolean aFilled)
Indicate whether a background color should be drawn.
|
B |
frameColor(Color aFrameColor)
Sets the line color of the frame.
|
B |
frameThickness(float aFrameThickness)
Sets the line width of the frame, in pixels.
|
B |
haloColor(Color aColor)
Sets the halo color.
|
B |
haloThickness(float aThickness)
Sets the halo thickness in pixels.
|
B |
padding(int aPadding)
Sets the padding between the label and its frame.
|
equals, hashCode
public B padding(int aPadding)
0
.aPadding
- the padding, in pixelspublic B frameThickness(float aFrameThickness)
0
, which indicates
that no frame should be drawn.aFrameThickness
- the frame line width, in pixelspublic B frameColor(Color aFrameColor)
Color.black
. This property only
has effect if frameThickness(float)
is not set to 0
. If frameThickness(float)
was not called yet, the frame thickness is set to 1
.aFrameColor
- the desired frame colorpublic B filled(boolean aFilled)
false
.aFilled
- true
if the background color should be drawn, false
otherwise.public B fillColor(Color aFillColor)
filled(boolean)
is
set to true
.aFillColor
- the desired background colorpublic B haloColor(Color aColor)
aColor
- the halo colorthis
IllegalArgumentException
- if aColor==null
haloThickness(float)
public B haloThickness(float aThickness)
aThickness
- the thickness in pixelsthis
haloThickness(float)
public B all(ALspStyle aStyle)
all
in class ALspStyle.Builder<B extends TLspLabelBoxStyle.Builder<B>>
aStyle
- the style to copythis
public TLspLabelBoxStyle build()
build
in class ALspStyle.Builder<B extends TLspLabelBoxStyle.Builder<B>>