Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.lowagie.text.rtf
Class RtfElement

    java.lang.Object
      com.lowagie.text.rtf.RtfElement

All Implemented Interfaces:
  RtfBasicElement

Direct Known Subclasses:
  RtfAnnotation, RtfBorder, RtfBorderGroup, RtfChunk, RtfCodePage, RtfColor, RtfColorList, RtfDocument, RtfDocumentHeader, RtfFontList, RtfImage, RtfInfoElement, RtfInfoGroup, RtfList, RtfListTable, RtfNewPage, RtfPageSetting, RtfPhrase, RtfRow, RtfSection, RtfStylesheetList, RtfTable

    public abstract class RtfElement

extends Object
implements RtfBasicElement

RtfElement is the base class for all RTF Element classes

Version:
  $Id: RtfElement.java 2996 2007-11-20 22:40:36Z hallm $
Author:
  Mark Hall (mhall@edu.uni-klu.ac.at), Thomas Bickel (tmb99@inode.at)

Field Summary
`protected RtfDocument` | `document` The RtfDocument this RtfElement belongs to
`protected boolean` | `inHeader` Whether this RtfElement is in a header
`protected boolean` | `inTable` Whether this RtfElement is in a table

Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
`CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR`

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.
`boolean` | `isInTable()` Gets whether this RtfElement is in a table
`void` | `setInHeader(boolean inHeader)` Sets whether this RtfElement is in a header
`void` | `setInTable(boolean inTable)` Sets whether this RtfElement is in a table
`void` | `setRtfDocument(RtfDocument doc)` Sets the RtfDocument this RtfElement belongs to
`abstract byte[]` | `write()` Deprecated. As of iText 2.0.6 or earlier, replaced by `writeContent(OutputStream)`, scheduled for removal at or after 2.1.0
`void` | `writeContent(OutputStream out)` Writes the element content to the given output stream.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### document

    protected RtfDocument document

  The RtfDocument this RtfElement belongs to

### inTable

    protected boolean inTable

  Whether this RtfElement is in a table

### inHeader

    protected boolean inHeader

  Whether this RtfElement is in a header

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

### write

    public abstract byte[] write()

  Deprecated. As of iText 2.0.6 or earlier, replaced by `writeContent(OutputStream)`, scheduled for removal at or after 2.1.0

  Returns the content of the RtfElement in a byte array.

  Specified by:
    `write` in interface `RtfBasicElement`
  Returns:
    An empty byte array

### writeContent

    public void writeContent(OutputStream out)
                      throws IOException

  Writes the element content to the given output stream.

  Specified by:
    `writeContent` in interface `RtfBasicElement`
  Throws:
    `IOException`

### setRtfDocument

    public void setRtfDocument(RtfDocument doc)

  Sets the RtfDocument this RtfElement belongs to

  Specified by:
    `setRtfDocument` in interface `RtfBasicElement`
  Parameters:
    `doc` - The RtfDocument to use

### isInTable

    public boolean isInTable()

  Gets whether this RtfElement is in a table

  Returns:
    Whether this RtfElement is in a table

### setInTable

    public void setInTable(boolean inTable)

  Sets whether this RtfElement is in a table

  Specified by:
    `setInTable` in interface `RtfBasicElement`
  Parameters:
    `inTable` - `True` if this RtfElement is in a table, `false` otherwise

### setInHeader

    public void setInHeader(boolean inHeader)

  Sets whether this RtfElement is in a header

  Specified by:
    `setInHeader` in interface `RtfBasicElement`
  Parameters:
    `inHeader` - `True` if this RtfElement is in a header, `false` otherwise

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD