Creates a RTF writer that writes content starting at offset "start" in the document. <code>start</code> and <code>length</code>can be set to specify partial lines.
Closes the RTF writer. Once closed no more content can be written. <b>NOTE:</b> <code>toString()</code> does not return a valid RTF string until <code>close()</code> has been called.
Returns the index of the specified color in the RTF color table.
Returns the index of the specified color in the RTF color table.
Determines if Unicode RTF should be written. Don't write Unicode RTF on Windows 95/98/ME or NT.
Appends the specified segment of "string" to the RTF data. Copy from <code>start</code> up to, but excluding, <code>end</code>.
Writes the RTF header including font table and color table.
Appends the specified line text to the RTF data. Lines will be formatted using the styles queried from the LineStyleListener, if set, or those set directly in the widget.
Appends the specified line delimiter to the RTF data.
Appends the specified line text to the RTF data. <p> Use the colors and font styles specified in "styles" and "lineBackground". Formatting is written to reflect the text rendering by the text widget. Style background colors take precedence over the line background color. Background colors are written using the \highlight tag (vs. the \cb tag). </p>
Closes the writer. Once closed no more content can be written. <b>NOTE:</b> <code>toString()</code> is not guaranteed to return a valid string unless the writer is closed.
Returns the number of characters to write. @return the integer number of characters to write
Returns the offset where writing starts. 0 based from the start of the widget text. Used to write partial lines. @return the integer offset where writing starts
Returns whether the writer is closed. @return a bool specifying whether or not the writer is closed
Returns the string. <code>close()</code> must be called before <code>toString()</code> is guaranteed to return a valid string.
Appends the given string to the data.
Inserts the given string to the data at the specified offset. <p> Do nothing if "offset" is < 0 or > getCharCount() </p>
Appends the given int to the data.
Appends the given character to the data.
Appends the specified line text to the data.
Appends the specified line delimiter to the data.
The <code>RTFWriter</code> class is used to write widget content as rich text. The implementation complies with the RTF specification version 1.5. <p> toString() is guaranteed to return a valid RTF string only after close() has been called. </p><p> Whole and partial lines and line breaks can be written. Lines will be formatted using the styles queried from the LineStyleListener, if set, or those set directly in the widget. All styles are applied to the RTF stream like they are rendered by the widget. In addition, the widget font name and size is used for the whole text. </p>