com.lowagie.text.rtf.text
Class RtfParagraph

java.lang.Object
  extended bycom.lowagie.text.rtf.RtfElement
      extended bycom.lowagie.text.rtf.text.RtfPhrase
          extended bycom.lowagie.text.rtf.text.RtfParagraph
All Implemented Interfaces:
RtfBasicElement
Direct Known Subclasses:
RtfListItem

public class RtfParagraph
extends RtfPhrase

The RtfParagraph is an extension of the RtfPhrase that adds alignment and indentation properties. It wraps a Paragraph.

Version:
$Version:$
Author:
Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
static byte[] ALIGN_CENTER
          Constant for center alignment
static byte[] ALIGN_JUSTIFY
          Constant for justified alignment
static byte[] ALIGN_LEFT
          Constant for left alignment
static byte[] ALIGN_RIGHT
          Constant for right alignment
private  int alignment
          The alignment of this RtfParagraph
static byte[] INDENT_LEFT
          Constant for left indentation
static byte[] INDENT_RIGHT
          Constant for right indentation
private  int indentLeft
          The left indentation of this RtfParagraph
private  int indentRight
          The right indentation of this RtfParagraph
static byte[] PARAGRAPH
          Constant for the end of a paragraph
 
Fields inherited from class com.lowagie.text.rtf.text.RtfPhrase
chunks, IN_TABLE, PARAGRAPH_DEFAULTS
 
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
RtfParagraph(RtfDocument doc, Paragraph paragraph)
          Constructs a RtfParagraph belonging to a RtfDocument based on a Paragraph.
 
Method Summary
 byte[] write()
          Writes the content of this RtfParagraph.
 
Methods inherited from class com.lowagie.text.rtf.text.RtfPhrase
setInHeader, setInTable, setRtfDocument
 
Methods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAGRAPH

public static final byte[] PARAGRAPH
Constant for the end of a paragraph


ALIGN_LEFT

public static final byte[] ALIGN_LEFT
Constant for left alignment


ALIGN_RIGHT

public static final byte[] ALIGN_RIGHT
Constant for right alignment


ALIGN_CENTER

public static final byte[] ALIGN_CENTER
Constant for center alignment


ALIGN_JUSTIFY

public static final byte[] ALIGN_JUSTIFY
Constant for justified alignment


INDENT_LEFT

public static final byte[] INDENT_LEFT
Constant for left indentation


INDENT_RIGHT

public static final byte[] INDENT_RIGHT
Constant for right indentation


alignment

private int alignment
The alignment of this RtfParagraph


indentLeft

private int indentLeft
The left indentation of this RtfParagraph


indentRight

private int indentRight
The right indentation of this RtfParagraph

Constructor Detail

RtfParagraph

public RtfParagraph(RtfDocument doc,
                    Paragraph paragraph)
Constructs a RtfParagraph belonging to a RtfDocument based on a Paragraph.

Parameters:
doc - The RtfDocument this RtfParagraph belongs to
paragraph - The Paragraph that this RtfParagraph is based on
Method Detail

write

public byte[] write()
Writes the content of this RtfParagraph. First paragraph specific data is written and then the RtfChunks of this RtfParagraph are added.

Specified by:
write in interface RtfBasicElement
Overrides:
write in class RtfPhrase
Returns:
The content of this RtfParagraph