| java.lang.Object com.lowagie.text.rtf.direct.RtfParser
RtfParser | public class RtfParser (Code) | | The RtfParser allows the importing of RTF documents or
RTF document fragments. The RTF document or fragment is tokenised,
font and color definitions corrected and then added to
the document being written.
version: $Revision: 2377 $ author: Mark Hall (mhall@edu.uni-klu.ac.at) |
handleCloseGroup | public void handleCloseGroup(int groupLevel)(Code) | | Handles close group tokens. Depending on what is currently
being parsed the parse state may change.
Parameters: groupLevel - The current group nesting level. |
handleCtrlCharacter | public void handleCtrlCharacter(String ctrlCharacter, int groupLevel)(Code) | | Handles single control character tokens.
Parameters: ctrlCharacter - The control character to handle. Parameters: groupLevel - The current group nesting level. |
handleCtrlWord | public void handleCtrlWord(String ctrlWord, int groupLevel)(Code) | | Handles control word tokens. Depending on the current
state a control word can lead to a state change. When
parsing the actual document contents, The font number,
color number and background color number are remapped.
Parameters: ctrlWord - The control word to handle. Parameters: groupLevel - The current group nesting level. |
handleOpenGroup | public void handleOpenGroup(int groupLevel)(Code) | | Handles open group tokens.
Parameters: groupLevel - The current group nesting level. |
handleText | public void handleText(String text, int groupLevel)(Code) | | Handles text tokens. These are either handed on to the
RtfColorTableParser or RtfFontTableParser or added directly
to the document.
Parameters: text - The text token to handle. Parameters: groupLevel - The current group nesting level. |
importRtfDocument | public void importRtfDocument(Reader reader, RtfDocument rtfDoc) throws IOException(Code) | | Imports a complete RTF document.
Parameters: reader - The Reader to read the RTF document from. Parameters: rtfDoc - The RtfDocument to add the imported document to. throws: IOException - On I/O errors. |
importRtfFragment | public void importRtfFragment(Reader reader, RtfDocument rtfDoc, RtfImportMappings importMappings) throws IOException(Code) | | Imports an RTF fragment.
Parameters: reader - The Reader to read the RTF fragment from. Parameters: rtfDoc - The RTF document to add the RTF fragment to. Parameters: importMappings - The RtfImportMappings defining font and color mappings for the fragment. throws: IOException - On I/O errors. |
|
|