Class RtfChunk
java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.text.RtfChunk
- All Implemented Interfaces:
RtfBasicElement
The RtfChunk contains one piece of text. The smallest text element available
in iText.
- Version:
- $Id: RtfChunk.java 3580 2008-08-06 15:52:00Z howard_s $
- Author:
- Mark Hall (Mark.Hall@mail.room3b.eu), Thomas Bickel (tmb99@inode.at)
-
Field Summary
Fields inherited from class RtfElement
document, inHeader, inTableFields inherited from interface RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR -
Constructor Summary
ConstructorsConstructorDescriptionRtfChunk(RtfDocument doc, com.lowagie.text.Chunk chunk) Constructs a RtfChunk based on the content of a Chunk -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets whether to use soft line breaks instead of default hard ones.voidSets the RtfDocument this RtfChunk belongs to.voidsetSoftLineBreaks(boolean softLineBreaks) Sets whether to use soft line breaks instead of default hard ones.voidwriteContent(OutputStream result) Writes the content of this RtfChunk.Methods inherited from class RtfElement
intToByteArray, isInTable, setInHeader, setInTable
-
Constructor Details
-
RtfChunk
Constructs a RtfChunk based on the content of a Chunk- Parameters:
doc- The RtfDocument that this Chunk belongs tochunk- The Chunk that this RtfChunk is based on
-
-
Method Details
-
writeContent
Writes the content of this RtfChunk. First the font information is written, then the content, and then more font information- Specified by:
writeContentin interfaceRtfBasicElement- Specified by:
writeContentin classRtfElement- Parameters:
result- TheOutputStreamto write the content to- Throws:
IOException
-
setRtfDocument
Sets the RtfDocument this RtfChunk belongs to.- Specified by:
setRtfDocumentin interfaceRtfBasicElement- Overrides:
setRtfDocumentin classRtfElement- Parameters:
doc- The RtfDocument to use
-
setSoftLineBreaks
public void setSoftLineBreaks(boolean softLineBreaks) Sets whether to use soft line breaks instead of default hard ones.- Parameters:
softLineBreaks- whether to use soft line breaks instead of default hard ones.
-
getSoftLineBreaks
public boolean getSoftLineBreaks()Gets whether to use soft line breaks instead of default hard ones.- Returns:
- whether to use soft line breaks instead of default hard ones.
-