public class TLspTextStyle extends ALspStyle implements ILspWorldElevationStyle
Text style used to style text, labels, etc. The layout of the text is as demonstrated in the following image:
The default text style is a plain black sans-serif font with size 14 and a 1-pixel white halo.
Construction of a text style object is performed through the Builder
design pattern mechanism.
Note that this style can not be used to modify the content of the text label. In order to do so, an
ALspLabelTextProviderStyle
can be used, for example TLspDataObjectLabelTextProviderStyle
.
Note that if the text to be painted starts with <html>
,
TLspLabelPainter
uses HTML to
format and paint the text.
Modifier and Type | Class and Description |
---|---|
static class |
TLspTextStyle.Alignment
Defines the text alignment of labels spanning several lines.
|
static class |
TLspTextStyle.Builder<B extends TLspTextStyle.Builder<B>>
Builder for text styles.
|
ILspWorldElevationStyle.ElevationMode
Modifier | Constructor and Description |
---|---|
protected |
TLspTextStyle(TLspTextStyle.Builder aBuilder)
Creates a new text style.
|
Modifier and Type | Method and Description |
---|---|
TLspTextStyle.Builder<?> |
asBuilder()
Creates a new builder initialized with all the properties of this style.
|
boolean |
equals(Object o) |
TLspTextStyle.Alignment |
getAlignment()
Specifies how text over multiple lines should be aligned.
|
ILspWorldElevationStyle.ElevationMode |
getElevationMode()
Returns the elevation mode of this style.
|
Font |
getFont()
Gets the text font.
|
Color |
getHaloColor()
Gets the halo color.
|
float |
getHaloThickness()
Gets the halo thickness.
|
Color |
getTextColor()
Gets the text color.
|
int |
getVerticalSpacing()
Specifies the spacing in between multiple lines of text
|
int |
hashCode() |
boolean |
isTransparent()
Specifies in which paint phase the text should
be painted.
|
static TLspTextStyle.Builder<?> |
newBuilder()
Creates a new builder with the default values.
|
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
protected TLspTextStyle(TLspTextStyle.Builder aBuilder)
aBuilder
- a builder.public static TLspTextStyle.Builder<?> newBuilder()
public TLspTextStyle.Builder<?> asBuilder()
public Font getFont()
public Color getTextColor()
public Color getHaloColor()
getHaloThickness()
public float getHaloThickness()
getHaloColor()
public TLspTextStyle.Alignment getAlignment()
public int getVerticalSpacing()
public boolean isTransparent()
isTransparent
in class ALspStyle
public ILspWorldElevationStyle.ElevationMode getElevationMode()
ILspWorldElevationStyle
getElevationMode
in interface ILspWorldElevationStyle