@OpenApiAll public class ColoredRichTextBuilder<T extends ColoredRichTextBuilder> extends RichTextBuilder<T>
Constructor and Description |
---|
ColoredRichTextBuilder() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
appendColor(java.lang.String text) |
void |
compress(int textLength)
Compress current text to the given length.
|
boolean |
isColorSupported() |
protected java.lang.String |
prependColor(java.lang.String text) |
T |
setColor(java.awt.Color color)
Set color of the text which will be added later.
|
void |
setText(java.lang.CharSequence text)
Replace current text with the given one
|
java.lang.String |
toString() |
toAppendableText, toPlainText
append, appendToText, isTextAdded, prepend, prependToText, replaceText, textLength
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
append, appendWithNoWrap, isPlainTextEmpty, prepend, prependWithNoWrap, setText
public T setColor(@CheckForNull java.awt.Color color)
TextBuilder
color
- color to set. Null is used to reset previously set colorpublic void compress(int textLength)
TextBuilder
compress
in interface TextBuilder<T extends ColoredRichTextBuilder>
compress
in class RichTextBuilder<T extends ColoredRichTextBuilder>
textLength
- text lengthprotected java.lang.String appendColor(java.lang.String text)
appendColor
in class AbstractTextBuilder<T extends ColoredRichTextBuilder>
protected java.lang.String prependColor(java.lang.String text)
prependColor
in class AbstractTextBuilder<T extends ColoredRichTextBuilder>
public void setText(java.lang.CharSequence text)
TextBuilder
setText
in interface TextBuilder<T extends ColoredRichTextBuilder>
setText
in class AbstractTextBuilder<T extends ColoredRichTextBuilder>
text
- textpublic java.lang.String toString()
toString
in interface TextBuilder<T extends ColoredRichTextBuilder>
toString
in class AbstractTextBuilder<T extends ColoredRichTextBuilder>
public boolean isColorSupported()