StyledDocument (the target).
The RTF is lexed
from the character stream by the RTFParser which is this class's
superclass.
This class is an indirect subclass of OutputStream. It must be closed
in order to guarantee that all of the text has been sent to
the text acceptor.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv abstract class | RTFReader.
An abstract RTF destination which simply tracks the attributes specified by the RTF control words in internal form and can produce acceptable attribute sets for the current character, paragraph, and section attributes. |
| pack-priv class | RTFReader.
Reads the colortbl group. |
| pack-priv static class | RTFReader.
The base class for an RTF destination. |
| pack-priv class | RTFReader.
This Destination accumulates the styled segments within this reader. |
| pack-priv class | RTFReader.
Reads the fonttbl group, inserting fonts into the RTFReader's fontTable map. |
| pack-priv class | RTFReader.
Handles the stylesheet keyword. |
| Modifier and Type | Field and Description |
|---|---|
| private static final HashMap | |
| private HashMap | characterStyles
This Map maps character style numbers to Style objects. |
| private Color[] | colorTable
This array maps color indices to Color objects. |
| private static final String | |
| private AttrSet | documentAttributes
This holds the current document attributes. |
| private HashMap | fontTable
This Dictionary maps Integer font numbers to String font names. |
| private final AttrSet. | |
| private boolean | ignoreGroupIfUnknownKeyword
|
| private HashMap | paragraphStyles
This Map maps paragraph style numbers to Style objects. |
| private HashMap | parserState
Miscellaneous information about the parser's state. |
| private RTFReader. | rtfDestination
This is the "dst" item from parserState. |
| private HashMap | sectionStyles
This Map maps section style numbers to Style objects. |
| private ArrayList | |
| private int | skippingCharacters
The parameter of the most recently parsed \\ucN keyword, used for skipping alternative representations after a Unicode character. |
| private static final HashMap | |
| private static final Object | STYLE_ADDITIVE
Whether the style is additive |
| private static final Object | STYLE_CHARACTER
Value for StyleType indicating a character style |
| private static final Object | STYLE_HIDDEN
Whether the style is hidden from the user |
| private static final Object | STYLE_NEXT
The style of the text following this style |
| private static final Object | STYLE_PARAGRAPH
Value for StyleType indicating a paragraph style |
| private static final Object | STYLE_SECTION
Value for StyleType indicating a section style |
| private static final Object | STYLE_TYPE
Indicates the domain of a Style |
| private final HashMap | |
| private final String | |
| private static final HashMap | textKeywords
textKeywords maps RTF keywords to single-character strings, for those keywords which simply insert some text. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private Style | |
| public void | begingroup()
Implements abstract com. Called by the superclass when a new RTF group is begun. |
| public void | close()
Overrides com. Implements java. Called by the user when there is no more input (i.e., at the end of the RTF file.) |
| private static void | defineCharacterSet(String name, char[] table)
Adds a character set to the RTFReader's list of known character sets |
| public void | endgroup()
Implements abstract com. Called by the superclass when the current RTF group is closed. |
| public StyledInput | Returns: the StyledInputProcesses the RTF input and generates a StyledInput instance. |
| public static Object | |
| private Style | |
| public void | handleBinaryBlob(byte[] data)
Implements abstract com. Called when the RTFParser encounters a bin keyword in the RTF stream. |
| public boolean | Returns: true if the keyword is recognized and handled; false otherwiseImplements abstract com. Handles a parameterless RTF keyword. |
| public boolean | Returns: true if the keyword is recognized and handled; false otherwiseThe keyword, as with keyword, int handleKeyword(String).The parameter following the keyword. parameter)Implements abstract com. Handles an RTF keyword and its integer parameter. |
| public void | handleText(String text)
Implements abstract com. Handles any pure text (containing no control characters) in the input stream. |
| private static HashMap | |
| private HashMap | |
| private static HashMap | |
| pack-priv static char[] | Returns: the newly read character setParses a character set from an InputStream. |
| public void | setCharacterSet(String name)
setCharacterSet sets the current translation table to correspond with the named character set. |
| protected void |