public class EscapedText extends Object implements EscapedColor
| Constructor and Description |
|---|
EscapedText(String text)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
short |
getBackground()
Return the background color.
|
short |
getForeground()
Return the foreground color.
|
String |
getText()
Return the text.
|
boolean |
hasBackground()
Return true if there is a background color.
|
boolean |
hasForeground()
Return true if there is a foreground color.
|
boolean |
isBold()
Return true if the text is bold.
|
boolean |
isEscaped()
Return true if the text is escaped.
|
boolean |
isInverse() |
boolean |
isItalic()
Return true if the text is italic.
|
boolean |
isStrikethrough()
Return true if the text is strikethrough.
|
boolean |
isUnderline()
Return true if the text is underlined.
|
void |
setBackground(short background)
Set the background color.
|
void |
setBold(boolean bold)
Set if the text is bold.
|
void |
setForeground(short foreground)
Set the foreground color.
|
void |
setInverse(boolean inverse)
Set if the text is on inverse video.
|
void |
setItalic(boolean italic)
Set if the text is italic.
|
void |
setStrikethrough(boolean strikethrough)
Set if the text is strikethrough.
|
void |
setStyle(int style)
Set the text style.
|
void |
setUnderline(boolean underline)
Set if the text is underlined.
|
String |
toString()
Return the text.
|
public EscapedText(String text)
text - the textpublic String getText()
public boolean isEscaped()
public void setForeground(short foreground)
foreground - the colorpublic short getForeground()
public boolean hasForeground()
public void setBackground(short background)
background - the colorpublic short getBackground()
public boolean hasBackground()
public void setStyle(int style)
style argument use the values of the FontStyle interface.style - the text stylepublic void setBold(boolean bold)
bold - true if the text is boldpublic boolean isBold()
public void setItalic(boolean italic)
italic - true if the text is italicpublic boolean isItalic()
public void setUnderline(boolean underline)
underline - true if the text is underlinedpublic boolean isUnderline()
public void setStrikethrough(boolean strikethrough)
strikethrough - true if the text is strikethroughpublic boolean isStrikethrough()
public void setInverse(boolean inverse)
inverse - true if the text is on inverse videopublic boolean isInverse()