Class RtfDestinationDocument
java.lang.Object
com.lowagie.text.rtf.parser.destinations.RtfDestination
com.lowagie.text.rtf.parser.destinations.RtfDestinationDocument
- All Implemented Interfaces:
RtfPropertyListener
,EventListener
RtfDestinationDocument
handles data destined for the document destination- Since:
- 2.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringBuilder
private int
Indicates the parser action.private com.lowagie.text.Document
The iText Document object.private com.lowagie.text.Paragraph
private RtfDocument
The RtfDocument object.private int
Indicates the current table level being processedFields inherited from class com.lowagie.text.rtf.parser.destinations.RtfDestination
lastCtrlWord, modified, rtfParser
-
Constructor Summary
ConstructorsConstructorDescriptionRtfDestinationDocument
(RtfParser parser) Constructs a newRtfDestinationDocument
using the parameters to initialize the object. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
afterPropertyChange
(String propertyName) void
beforePropertyChange
(String propertyName) boolean
Clean up when destination is closed.protected void
finalize()
boolean
handleCharacter
(int ch) Handle text for this destinationboolean
Clean up when group is closed.boolean
handleControlWord
(RtfCtrlWordData ctrlWordData) Handle control word for this destinationboolean
Setup when group is opened.boolean
Handle a new subgroup contained within this groupvoid
Set the parser to use with the RtfDestination object.void
Method to set this object to the default values.private void
Write the accumulated buffer to the destination.private void
Write the string value to the destination.Methods inherited from class com.lowagie.text.rtf.parser.destinations.RtfDestination
addListener, afterCharacter, afterCtrlWord, beforeCharacter, beforeCtrlWord, getNewTokeniserState, isModified, onCharacter, onCloseGroup, onCtrlWord, onOpenGroup, removeListener
-
Field Details
-
rtfDoc
The RtfDocument object.- See Also:
-
doc
private com.lowagie.text.Document docThe iText Document object.- See Also:
-
buffer
-
conversionType
private int conversionTypeIndicates the parser action. Import or Conversion.- See Also:
-
tableLevel
private int tableLevelIndicates the current table level being processed -
IMPORT_IGNORED_CTRLWORDS
-
CONVERT_IGNORED_CTRLWORDS
-
iTextParagraph
private com.lowagie.text.Paragraph iTextParagraph
-
-
Constructor Details
-
RtfDestinationDocument
public RtfDestinationDocument() -
RtfDestinationDocument
Constructs a newRtfDestinationDocument
using the parameters to initialize the object.- Parameters:
parser
- an RtfParser.
-
-
Method Details
-
finalize
-
setParser
Description copied from class:RtfDestination
Set the parser to use with the RtfDestination object.- Overrides:
setParser
in classRtfDestination
- Parameters:
parser
- The RtfParser object.
-
closeDestination
public boolean closeDestination()Description copied from class:RtfDestination
Clean up when destination is closed.- Specified by:
closeDestination
in classRtfDestination
- Returns:
- true if handled, false if not handled
-
handleOpenGroup
public boolean handleOpenGroup()Description copied from class:RtfDestination
Setup when group is opened.- Specified by:
handleOpenGroup
in classRtfDestination
- Returns:
- true if handled, false if not handled
-
handleOpeningSubGroup
public boolean handleOpeningSubGroup()Description copied from class:RtfDestination
Handle a new subgroup contained within this group- Specified by:
handleOpeningSubGroup
in classRtfDestination
- Returns:
- true if handled, false if not handled
-
handleCloseGroup
public boolean handleCloseGroup()Description copied from class:RtfDestination
Clean up when group is closed.- Specified by:
handleCloseGroup
in classRtfDestination
- Returns:
- true if handled, false if not handled
-
handleCharacter
public boolean handleCharacter(int ch) Description copied from class:RtfDestination
Handle text for this destination- Specified by:
handleCharacter
in classRtfDestination
- Returns:
- true if handled, false if not handled
-
handleControlWord
Description copied from class:RtfDestination
Handle control word for this destination- Specified by:
handleControlWord
in classRtfDestination
- Parameters:
ctrlWordData
- The control word and parameter information object- Returns:
- true if handled, false if not handled
-
writeBuffer
private void writeBuffer()Write the accumulated buffer to the destination. Used for direct content -
writeText
Write the string value to the destination. Used for direct content- Parameters:
value
-
-
setToDefaults
public void setToDefaults()Description copied from class:RtfDestination
Method to set this object to the default values. Must be implemented in child class.- Specified by:
setToDefaults
in classRtfDestination
-
afterPropertyChange
- Specified by:
afterPropertyChange
in interfaceRtfPropertyListener
-
beforePropertyChange
- Specified by:
beforePropertyChange
in interfaceRtfPropertyListener
-
addParagraphToDocument
private void addParagraphToDocument()
-