Package com.luciad.view.lightspeed.style
Class TLspTextStyle.Builder<B extends TLspTextStyle.Builder<B>>
java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle.Builder<B>
com.luciad.view.lightspeed.style.TLspTextStyle.Builder<B>
- All Implemented Interfaces:
ILspWorldElevationStyle.Builder
- Enclosing class:
TLspTextStyle
public static class TLspTextStyle.Builder<B extends TLspTextStyle.Builder<B>>
extends ALspStyle.Builder<B>
implements ILspWorldElevationStyle.Builder
Builder for text styles.
The default text style has a plain black sans-serif font of size 14 (SansSerif-BOLD-14)
with a 1-pixel white halo.
- Since:
- 2012.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionalignment
(TLspTextStyle.Alignment aAlignment) Specifies how text over multiple lines should be aligned.Copies all properties from the given style.build()
Constructs a text style with the set parameters.Specifies the elevation mode.Sets the text font.Sets the text font based on its textual description.Sets the halo color.haloThickness
(float aThickness) Sets the halo thickness in pixels.Sets the text color.transparent
(boolean aTransparent) Sets whether or not the text should be painted in the transparent paint phase.verticalSpacing
(int aVerticalSpacing) Specifies the spacing in between multiple lines of textzOrder
(int aZOrder) Sets the Z-order of this style.Methods inherited from class com.luciad.view.lightspeed.style.ALspStyle.Builder
equals, hashCode
-
Constructor Details
-
Builder
protected Builder()Creates a new builder.
-
-
Method Details
-
zOrder
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
.- Parameters:
aZOrder
- the z order- Returns:
this
-
transparent
Sets whether or not the text should be painted in the transparent paint phase.- Parameters:
aTransparent
- whether or not the text should be painted in the transparent paint phase- Returns:
this
-
font
Sets the text font.- Parameters:
aFont
- the text font- Returns:
this
- Throws:
IllegalArgumentException
-if aFont==null
-
font
Sets the text font based on its textual description. Identical to callingfont(Font.decode(aFont))
.- Parameters:
aFont
- the text font- Returns:
this
- Throws:
IllegalArgumentException
-if aFont == null
-
textColor
Sets the text color.- Parameters:
aColor
- the text color- Returns:
- this
- Throws:
IllegalArgumentException
-if aColor==null
-
haloColor
Sets the halo color. This property is only used if the halo is enabled.- Parameters:
aColor
- the halo color- Returns:
this
- Throws:
IllegalArgumentException
-if aColor==null
- See Also:
-
haloThickness
Sets the halo thickness in pixels. Set to zero if no halo should be visible.- Parameters:
aThickness
- the thickness in pixels- Returns:
this
- See Also:
-
alignment
Specifies how text over multiple lines should be aligned.- Parameters:
aAlignment
- the alignment- Returns:
this
-
verticalSpacing
Specifies the spacing in between multiple lines of text- Parameters:
aVerticalSpacing
- the vertical spacing- Returns:
this
-
elevationMode
Description copied from interface:ILspWorldElevationStyle.Builder
Specifies the elevation mode. The default mode depends on the specific implementation.- Specified by:
elevationMode
in interfaceILspWorldElevationStyle.Builder
- Parameters:
aMode
-- Returns:
this
-
all
Copies all properties from the given style.- Specified by:
all
in classALspStyle.Builder<B extends TLspTextStyle.Builder<B>>
- Parameters:
aStyle
- the style to copy- Returns:
this
-
build
Constructs a text style with the set parameters.- Specified by:
build
in classALspStyle.Builder<B extends TLspTextStyle.Builder<B>>
- Returns:
- the resulting text style
-