public final class TextFormat extends Object
and {@link TextColor}
.Constructor and Description |
---|
TextFormat()
Constructs a new
TextFormat with the default style and color. |
TextFormat(TextColor color)
Constructs a new
TextFormat with the default style. |
TextFormat(TextStyle style)
Constructs a new
TextFormat with the default color. |
TextFormat(TextStyle style,
TextColor color)
Constructs a new
TextFormat . |
Modifier and Type | Method and Description |
---|---|
TextFormat |
color(TextColor color)
Returns a new
TextFormat with the given color. |
boolean |
equals(Object o) |
TextColor |
getColor()
Returns the
TextColor in this format. |
TextStyle |
getStyle()
Returns the
TextStyle in this format. |
int |
hashCode() |
TextFormat |
style(TextStyle style)
Returns a new
TextFormat with the given style. |
String |
toString() |
public TextFormat(TextStyle style, TextColor color)
TextFormat
.style
- The stylecolor
- The colorpublic TextFormat(TextStyle style)
TextFormat
with the default color.style
- The stylepublic TextFormat(TextColor color)
TextFormat
with the default style.color
- The colorpublic TextFormat()
TextFormat
with the default style and color.public final TextFormat style(TextStyle style)
TextFormat
with the given style.style
- The styleTextFormat
public final TextFormat color(TextColor color)
TextFormat
with the given color.color
- The colorTextFormat