Constructor and Description |
---|
FormattedSection(String text)
Creates a formatted section.
|
FormattedSection(String text,
Number fontScale)
Deprecated.
use
FormattedSection(String) and setters
or FormattedSection(String, Number, String[], String) instead |
FormattedSection(String text,
Number fontScale,
String[] fontStack)
Deprecated.
use
FormattedSection(String) and setters
or FormattedSection(String, Number, String[], String) instead |
FormattedSection(String text,
Number fontScale,
String[] fontStack,
String textColor)
Creates a formatted section.
|
FormattedSection(String text,
String[] fontStack)
Deprecated.
use
FormattedSection(String) and setters
or FormattedSection(String, Number, String[], String) instead |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Number |
getFontScale()
Returns displayed text's font scale.
|
String[] |
getFontStack()
Returns the font stack with main and fallback fonts.
|
String |
getText()
Returns the displayed text.
|
String |
getTextColor()
Returns the text color.
|
int |
hashCode() |
void |
setFontScale(Number fontScale)
Set font scale.
|
void |
setFontStack(String[] fontStack)
Set main and fallback fonts that are a part of the style.
|
void |
setTextColor(int textColor)
Set the text color.
|
void |
setTextColor(String textColor)
Set text color.
|
String |
toString() |
public FormattedSection(String text)
text
- displayed stringpublic FormattedSection(String text, Number fontScale, String[] fontStack, String textColor)
text
- displayed stringfontScale
- scale of the font, setting to null will fall back to style's default settingsfontStack
- main and fallback fonts that are a part of the style,
setting null will fall back to style's default settings.
The requested font stack has to be a part of the used style.
For more information see
the documentation.textColor
- text color, setting to null will fall back to style's default settings.
Value of red, green, blue components must range between 0 and 255,
an alpha component must range between 0 and 1.
For more information see the documentation.
@Deprecated public FormattedSection(String text, Number fontScale, String[] fontStack)
FormattedSection(String)
and setters
or FormattedSection(String, Number, String[], String)
insteadtext
- displayed stringfontScale
- scale of the font, setting to null will fall back to style's default settingsfontStack
- main and fallback fonts that are a part of the style,
setting null will fall back to style's default settings@Deprecated public FormattedSection(String text, Number fontScale)
FormattedSection(String)
and setters
or FormattedSection(String, Number, String[], String)
insteadtext
- displayed stringfontScale
- scale of the font, setting to null will fall back to style's default settings@Deprecated public FormattedSection(String text, String[] fontStack)
FormattedSection(String)
and setters
or FormattedSection(String, Number, String[], String)
insteadtext
- displayed stringfontStack
- main and fallback fonts that are a part of the style,
setting null will fall back to style's default settingspublic String getText()
public Number getFontScale()
public String[] getFontStack()
public String getTextColor()
public void setFontScale(Number fontScale)
fontScale
- fontScalepublic void setFontStack(String[] fontStack)
The requested font stack has to be a part of the used style. For more information see the documentation.
fontStack
- fontStackpublic void setTextColor(String textColor)
For more information see the documentation.
textColor
- text colorpublic void setTextColor(int textColor)
textColor
- text color.© 2015–2019 Mapbox. All rights reserved.