com.lowagie.text.rtf

Class RtfElement

public abstract class RtfElement extends Object implements RtfBasicElement

RtfElement is the base class for all RTF Element classes

Version: $Id:RtfElement.java 3126 2008-02-07 20:30:46Z hallm $

Author: Mark Hall (Mark.Hall@mail.room3b.eu) Thomas Bickel (tmb99@inode.at)

Field Summary
protected RtfDocumentdocument
The RtfDocument this RtfElement belongs to
protected booleaninHeader
Whether this RtfElement is in a header
protected booleaninTable
Whether this RtfElement is in a table
Constructor Summary
RtfElement(RtfDocument doc)
Constructs a RtfElement belonging to the specified RtfDocument.
Method Summary
byte[]intToByteArray(int i)
Transforms an integer into its String representation and then returns the bytes of that string.
booleanisInTable()
Gets whether this RtfElement is in a table
voidsetInHeader(boolean inHeader)
Sets whether this RtfElement is in a header
voidsetInTable(boolean inTable)
Sets whether this RtfElement is in a table
voidsetRtfDocument(RtfDocument doc)
Sets the RtfDocument this RtfElement belongs to
abstract voidwriteContent(OutputStream out)
Writes the element content to the given output stream.

Field Detail

document

protected RtfDocument document
The RtfDocument this RtfElement belongs to

inHeader

protected boolean inHeader
Whether this RtfElement is in a header

inTable

protected boolean inTable
Whether this RtfElement is in a table

Constructor Detail

RtfElement

public RtfElement(RtfDocument doc)
Constructs a RtfElement belonging to the specified RtfDocument.

Parameters: doc The RtfDocument this RtfElement belongs to

Method Detail

intToByteArray

public byte[] intToByteArray(int i)
Transforms an integer into its String representation and then returns the bytes of that string.

Parameters: i The integer to convert

Returns: A byte array representing the integer

isInTable

public boolean isInTable()
Gets whether this RtfElement is in a table

Returns: Whether this RtfElement is in a table

setInHeader

public void setInHeader(boolean inHeader)
Sets whether this RtfElement is in a header

Parameters: inHeader True if this RtfElement is in a header, false otherwise

setInTable

public void setInTable(boolean inTable)
Sets whether this RtfElement is in a table

Parameters: inTable True if this RtfElement is in a table, false otherwise

setRtfDocument

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

Parameters: doc The RtfDocument to use

writeContent

public abstract void writeContent(OutputStream out)
Writes the element content to the given output stream.