public class FormattedSection
extends java.lang.Object
Formatted
.Constructor and Description |
---|
FormattedSection(java.lang.String text)
Creates a formatted section.
|
FormattedSection(java.lang.String text,
java.lang.Number fontScale)
Deprecated.
use
FormattedSection(String) and setters
or FormattedSection(String, Number, String[], String) instead |
FormattedSection(java.lang.String text,
java.lang.Number fontScale,
java.lang.String[] fontStack)
Deprecated.
use
FormattedSection(String) and setters
or FormattedSection(String, Number, String[], String) instead |
FormattedSection(java.lang.String text,
java.lang.Number fontScale,
java.lang.String[] fontStack,
java.lang.String textColor)
Creates a formatted section.
|
FormattedSection(java.lang.String text,
java.lang.String[] fontStack)
Deprecated.
use
FormattedSection(String) and setters
or FormattedSection(String, Number, String[], String) instead |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Number |
getFontScale()
Returns displayed text's font scale.
|
java.lang.String[] |
getFontStack()
Returns the font stack with main and fallback fonts.
|
java.lang.String |
getText()
Returns the displayed text.
|
java.lang.String |
getTextColor()
Returns the text color.
|
int |
hashCode() |
void |
setFontScale(java.lang.Number fontScale)
Set font scale.
|
void |
setFontStack(java.lang.String[] fontStack)
Set main and fallback fonts that are a part of the style.
|
void |
setTextColor(int textColor)
Set the text color.
|
void |
setTextColor(java.lang.String textColor)
Set text color.
|
java.lang.String |
toString() |
public FormattedSection(java.lang.String text)
text
- displayed stringpublic FormattedSection(java.lang.String text, java.lang.Number fontScale, java.lang.String[] fontStack, java.lang.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(java.lang.String text, java.lang.Number fontScale, java.lang.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(java.lang.String text, java.lang.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(java.lang.String text, java.lang.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 java.lang.String getText()
public java.lang.Number getFontScale()
public java.lang.String[] getFontStack()
public java.lang.String getTextColor()
public void setFontScale(java.lang.Number fontScale)
fontScale
- fontScalepublic void setFontStack(java.lang.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(java.lang.String textColor)
For more information see the documentation.
textColor
- text colorpublic void setTextColor(int textColor)
textColor
- text color.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
© 2015–2019 Mapbox. All rights reserved.