java.lang.Object | ||||
↳ | com.carto.styles.StyleBuilder | |||
↳ | com.carto.styles.BillboardStyleBuilder | |||
↳ | com.carto.styles.LabelStyleBuilder | |||
↳ | com.carto.styles.TextStyleBuilder |
A builder class for TextStyle.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TextStyleBuilder()
Constructs a TextStyleBuilder object with all parameters set to defaults.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TextStyle |
buildStyle()
Builds a new instance of the TextStyle object using previously set parameters.
| ||||||||||
synchronized void | delete() | ||||||||||
Color |
getBackgroundColor()
Returns the background color for the text label.
| ||||||||||
Color |
getBorderColor()
Returns the border color for the text label.
| ||||||||||
float |
getBorderWidth()
Returns the border width for the text label.
| ||||||||||
String |
getFontName()
Returns the font name for the text label.
| ||||||||||
float |
getFontSize()
Returns the font size for the text label.
| ||||||||||
Color |
getStrokeColor()
Returns the stroke color for the text label.
| ||||||||||
float |
getStrokeWidth()
Returns the stroke width for the text label.
| ||||||||||
String |
getTextField()
Returns the text field variable.
| ||||||||||
TextMargins |
getTextMargins()
Returns the margins for the text.
| ||||||||||
boolean |
isBreakLines()
Returns the state of the 'break lines' flag.
| ||||||||||
void |
setBackgroundColor(Color backgroundColor)
Sets the background color for the text label.
| ||||||||||
void |
setBorderColor(Color borderColor)
Sets the border color for the text label.
| ||||||||||
void |
setBorderWidth(float borderWidth)
Sets the border width for the text label.
| ||||||||||
void |
setBreakLines(boolean enable)
Sets the state of the 'break lines' flag.
| ||||||||||
void |
setFontName(String fontName)
Sets the font name for the text label.
| ||||||||||
void |
setFontSize(float size)
Sets the font size for the text label.
| ||||||||||
void |
setStrokeColor(Color strokeColor)
Sets the stroke color for the text label.
| ||||||||||
void |
setStrokeWidth(float strokeWidth)
Sets the stroke width for the text label.
| ||||||||||
void |
setTextField(String field)
Sets the text field variable.
| ||||||||||
void |
setTextMargins(TextMargins textMargins)
Sets the margins for the text.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a TextStyleBuilder object with all parameters set to defaults.
Builds a new instance of the TextStyle object using previously set parameters.
Returns the background color for the text label.
Returns the border color for the text label.
Returns the border width for the text label.
Returns the font name for the text label.
Returns the font size for the text label.
Returns the stroke color for the text label.
Returns the stroke width for the text label.
Returns the text field variable. If not empty, this variable is used to read actual text string from object meta info.
Returns the margins for the text.
Returns the state of the 'break lines' flag.
Sets the background color for the text label.
backgroundColor | The new background color for the text label. By default the background color is transparent. |
---|
Sets the border color for the text label.
borderColor | The new border color for the text label. By default the border color is transparent. |
---|
Sets the border width for the text label.
borderWidth | The new border width for the text label in screen density independent pixels. By default the border width is 0. |
---|
Sets the state of the 'break lines' flag.
If enabled, texts containing CR or NL characters are split into multiple lines.
By default the flag is false, due to backward compatibility reasons.
Sets the font name for the text label.
fontName | The new platform dependent font name for the text label. |
---|
Sets the font size for the text label.
size | The new font size for the text label in points. |
---|
Sets the stroke color for the text label.
strokeColor | The new stroke color for the text label. |
---|
Sets the stroke width for the text label.
strokeWidth | The new stroke width for the text label in screen density independent pixels. |
---|
Sets the text field variable. If not empty, this variable is used to read actual text string from object meta info.
field | The text field to use for displaying text from metainfo. |
---|
Sets the margins for the text. The margins will determine how much
empty space should surround the text. The default is TextMargins(0, 0, 0, 0).
textMargins | The new margins for the text in dp. |
---|