Package com.nomagic.text.builders
Class RichTextBuilder<T extends RichTextBuilder>
java.lang.Object
com.nomagic.text.builders.AbstractTextBuilder<T>
com.nomagic.text.builders.RichTextBuilder<T>
- All Implemented Interfaces:
TextBuilder<T>
- Direct Known Subclasses:
ColoredRichTextBuilder
A builder used for rich text building. Colored fragments are not supported.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompress(int textLength) Compress current text to the given length.protected StringtoAppendableText(String text) Methods inherited from class com.nomagic.text.builders.AbstractTextBuilder
append, appendColor, appendToText, isTextAdded, prepend, prependColor, prependToText, replaceText, setText, textLength, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.nomagic.text.builders.TextBuilder
append, appendWithNoWrap, appendWithSpace, appendWithSpace, isColorSupported, isPlainTextEmpty, prepend, prependWithNoWrap, setColor, setText
-
Constructor Details
-
RichTextBuilder
public RichTextBuilder()
-
-
Method Details
-
compress
public void compress(int textLength) Description copied from interface:TextBuilderCompress current text to the given length. This function is not supported in every implementation, so it can be ignored.- Parameters:
textLength- text length
-
toAppendableText
- Overrides:
toAppendableTextin classAbstractTextBuilder<T extends RichTextBuilder>
-
toPlainText
- Returns:
- result string as plain text
-