public final class RtfDestinationDocument extends RtfDestination implements RtfPropertyListener
RtfDestinationDocument
handles data destined for the document destinationModifier and Type | Field and Description |
---|---|
private java.lang.StringBuffer |
buffer |
private int |
conversionType
Indicates the parser action.
|
private static java.util.List |
CONVERT_IGNORED_CTRLWORDS |
private Document |
doc
The iText Document object.
|
private static java.util.List |
IMPORT_IGNORED_CTRLWORDS |
private Paragraph |
iTextParagraph |
private RtfDocument |
rtfDoc
The RtfDocument object.
|
private int |
tableLevel
Indicates the current table level being processed
|
lastCtrlWord, modified, rtfParser
Constructor and Description |
---|
RtfDestinationDocument() |
RtfDestinationDocument(RtfParser parser)
Constructs a new
RtfDestinationDocument using
the parameters to initialize the object. |
Modifier and Type | Method and Description |
---|---|
private void |
addParagraphToDocument() |
void |
afterPropertyChange(java.lang.String propertyName) |
void |
beforePropertyChange(java.lang.String propertyName) |
boolean |
closeDestination()
Clean up when destination is closed.
|
protected void |
finalize() |
boolean |
handleCharacter(int ch)
Handle text for this destination
|
boolean |
handleCloseGroup()
Clean up when group is closed.
|
boolean |
handleControlWord(RtfCtrlWordData ctrlWordData)
Handle control word for this destination
|
boolean |
handleOpenGroup()
Setup when group is opened.
|
boolean |
handleOpeningSubGroup()
Handle a new subgroup contained within this group
|
void |
setParser(RtfParser parser)
Set the parser to use with the RtfDestination object.
|
void |
setToDefaults()
Method to set this object to the default values.
|
private void |
writeBuffer()
Write the accumulated buffer to the destination.
|
private void |
writeText(java.lang.String value)
Write the string value to the destination.
|
addListener, afterCharacter, afterCtrlWord, beforeCharacter, beforeCtrlWord, getNewTokeniserState, isModified, onCharacter, onCloseGroup, onCtrlWord, onOpenGroup, removeListener
private RtfDocument rtfDoc
RtfDocument
private java.lang.StringBuffer buffer
private int conversionType
private int tableLevel
private static final java.util.List IMPORT_IGNORED_CTRLWORDS
private static final java.util.List CONVERT_IGNORED_CTRLWORDS
private Paragraph iTextParagraph
public RtfDestinationDocument()
public RtfDestinationDocument(RtfParser parser)
RtfDestinationDocument
using
the parameters to initialize the object.parser
- an RtfParser.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void setParser(RtfParser parser)
RtfDestination
setParser
in class RtfDestination
parser
- The RtfParser object.public boolean closeDestination()
RtfDestination
closeDestination
in class RtfDestination
public boolean handleOpenGroup()
RtfDestination
handleOpenGroup
in class RtfDestination
public boolean handleOpeningSubGroup()
RtfDestination
handleOpeningSubGroup
in class RtfDestination
public boolean handleCloseGroup()
RtfDestination
handleCloseGroup
in class RtfDestination
public boolean handleCharacter(int ch)
RtfDestination
handleCharacter
in class RtfDestination
public boolean handleControlWord(RtfCtrlWordData ctrlWordData)
RtfDestination
handleControlWord
in class RtfDestination
ctrlWordData
- The control word and parameter information objectprivate void writeBuffer()
private void writeText(java.lang.String value)
value
- public void setToDefaults()
RtfDestination
setToDefaults
in class RtfDestination
public void afterPropertyChange(java.lang.String propertyName)
afterPropertyChange
in interface RtfPropertyListener
public void beforePropertyChange(java.lang.String propertyName)
beforePropertyChange
in interface RtfPropertyListener
private void addParagraphToDocument()