public static class TLspTextStyle.Builder<B extends TLspTextStyle.Builder<B>> extends ALspStyle.Builder<B> implements ILspWorldElevationStyle.Builder
Modifier | Constructor and Description |
---|---|
protected |
Builder()
Creates a new builder.
|
Modifier and Type | Method and Description |
---|---|
B |
alignment(TLspTextStyle.Alignment aAlignment)
Specifies how text over multiple lines should be aligned.
|
B |
all(ALspStyle aStyle)
Copies all properties from the given style.
|
TLspTextStyle |
build()
Constructs a text style with the set
parameters.
|
B |
elevationMode(ILspWorldElevationStyle.ElevationMode aMode)
Specifies the elevation mode.
|
B |
font(Font aFont)
Sets the text font.
|
B |
font(String aFont)
Sets the text font based on its textual description.
|
B |
haloColor(Color aColor)
Sets the halo color.
|
B |
haloThickness(float aThickness)
Sets the halo thickness in pixels.
|
B |
textColor(Color aColor)
Sets the text color.
|
B |
transparent(boolean aTransparent)
Sets whether or not the text should be painted
in the transparent paint phase.
|
B |
verticalSpacing(int aVerticalSpacing)
Specifies the spacing in between multiple lines of text
|
B |
zOrder(int aZOrder)
Sets the Z-order of this style.
|
equals, hashCode
public B zOrder(int aZOrder)
Sets the Z-order of this style. Styles should be painted from lowest to highest Z-order.
Increasing the number of different Z-orders can negatively impact painting performance.
By default, it is set to 0
.
aZOrder
- the z orderthis
public B transparent(boolean aTransparent)
aTransparent
- whether or not the text should be
painted in the transparent paint phasethis
public B font(Font aFont)
aFont
- the text fontthis
IllegalArgumentException
- if aFont==null
public B font(String aFont)
font(Font.decode(aFont))
.aFont
- the text fontthis
IllegalArgumentException
- if aFont == null
public B textColor(Color aColor)
aColor
- the text colorIllegalArgumentException
- if aColor==null
public B haloColor(Color aColor)
aColor
- the halo colorthis
IllegalArgumentException
- if aColor==null
haloThickness(float)
public B haloThickness(float aThickness)
aThickness
- the thickness in pixelsthis
haloColor(java.awt.Color)
public B alignment(TLspTextStyle.Alignment aAlignment)
aAlignment
- the alignmentthis
public B verticalSpacing(int aVerticalSpacing)
aVerticalSpacing
- the vertical spacingthis
public B elevationMode(ILspWorldElevationStyle.ElevationMode aMode)
ILspWorldElevationStyle.Builder
elevationMode
in interface ILspWorldElevationStyle.Builder
this
public B all(ALspStyle aStyle)
all
in class ALspStyle.Builder<B extends TLspTextStyle.Builder<B>>
aStyle
- the style to copythis
public TLspTextStyle build()
build
in class ALspStyle.Builder<B extends TLspTextStyle.Builder<B>>