Class RichText.Builder
java.lang.Object
com.codename1.wordprocessing.RichText.Builder
- Enclosing class:
RichText
Accumulates runs into a
RichText.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
append
Appends a run, merging it into the previous one when the styles are equal. An
OBJECTcharacter in plain text is replaced by a space: onlyappend(Inline, ...)places objects.Parameters
-
text: the characters; null or empty adds nothing -
style: their style
Returns
this builder
-
-
append
Appends an inline object.
Parameters
-
object: the object; null adds nothing -
style: the style of its character
Returns
this builder
-
-
append
Appends every run of a text.
Parameters
text: the text to append
Returns
this builder
-
length
public int length()The number of characters appended so far.
Returns
the length
-
build
The text built so far.
Returns
an immutable text
-