com.lowagie.text.rtf.text
Class RtfChunk

java.lang.Object
  extended by com.lowagie.text.rtf.RtfElement
      extended by com.lowagie.text.rtf.text.RtfChunk
All Implemented Interfaces:
RtfBasicElement, RtfElementInterface

public class RtfChunk
extends RtfElement

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 com.lowagie.text.rtf.RtfElement
document, inHeader, inTable
 
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
 
Constructor Summary
RtfChunk(RtfDocument doc, Chunk chunk)
          Constructs a RtfChunk based on the content of a Chunk
 
Method Summary
 boolean getSoftLineBreaks()
          Gets whether to use soft line breaks instead of default hard ones.
 void setRtfDocument(RtfDocument doc)
          Sets the RtfDocument this RtfChunk belongs to.
 void setSoftLineBreaks(boolean softLineBreaks)
          Sets whether to use soft line breaks instead of default hard ones.
 void writeContent(java.io.OutputStream result)
          Writes the content of this RtfChunk.
 
Methods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable, setInHeader, setInTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RtfChunk

public RtfChunk(RtfDocument doc,
                Chunk chunk)
Constructs a RtfChunk based on the content of a Chunk

Parameters:
doc - The RtfDocument that this Chunk belongs to
chunk - The Chunk that this RtfChunk is based on
Method Detail

writeContent

public void writeContent(java.io.OutputStream result)
                  throws java.io.IOException
Writes the content of this RtfChunk. First the font information is written, then the content, and then more font information

Specified by:
writeContent in interface RtfBasicElement
Specified by:
writeContent in class RtfElement
Parameters:
result - The OutputStream to write the content to
Throws:
java.io.IOException

setRtfDocument

public void setRtfDocument(RtfDocument doc)
Sets the RtfDocument this RtfChunk belongs to.

Specified by:
setRtfDocument in interface RtfBasicElement
Overrides:
setRtfDocument in class RtfElement
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.


iText 2.1.7