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.text
Class RtfPhrase

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

All Implemented Interfaces:
  RtfBasicElement

Direct Known Subclasses:
  RtfParagraph

    public class RtfPhrase

extends RtfElement

The RtfPhrase contains multiple RtfChunks

Version:
  $Id: RtfPhrase.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 ArrayList` | `chunks` ArrayList containing the RtfChunks of this RtfPhrase
`static byte[]` | `IN_TABLE` Constant for phrase in a table indication
`static byte[]` | `LINE_SPACING` Constant for the line spacing.
`private int` | `lineLeading` The height of each line.
`static byte[]` | `PARAGRAPH_DEFAULTS` Constant for the resetting of the paragraph defaults
`static byte[]` | `PLAIN` Constant for resetting of font settings to their 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
`protected` | `RtfPhrase(RtfDocument doc)` A basically empty constructor that is used by the RtfParagraph.
`` | `RtfPhrase(RtfDocument doc, Phrase phrase)` Constructs a new RtfPhrase for the RtfDocument with the given Phrase

Method Summary
`void` | `setInHeader(boolean inHeader)` Sets whether this RtfPhrase is in a header.
`void` | `setInTable(boolean inTable)` Sets whether this RtfPhrase is in a table.
`void` | `setRtfDocument(RtfDocument doc)` Sets the RtfDocument this RtfPhrase belongs to.
`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 result)` Write the content of this RtfPhrase.

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_DEFAULTS

    public static final byte[] PARAGRAPH_DEFAULTS

  Constant for the resetting of the paragraph defaults

### PLAIN

    public static final byte[] PLAIN

  Constant for resetting of font settings to their defaults

### IN_TABLE

    public static final byte[] IN_TABLE

  Constant for phrase in a table indication

### LINE_SPACING

    public static final byte[] LINE_SPACING

  Constant for the line spacing.

### chunks

    protected ArrayList chunks

  ArrayList containing the RtfChunks of this RtfPhrase

### lineLeading

    private int lineLeading

  The height of each line.

Constructor Detail

### RtfPhrase

    protected RtfPhrase(RtfDocument doc)

  A basically empty constructor that is used by the RtfParagraph.

  Parameters:
    `doc` - The RtfDocument this RtfPhrase belongs to.

### RtfPhrase

    public RtfPhrase(RtfDocument doc,
                     Phrase phrase)

  Constructs a new RtfPhrase for the RtfDocument with the given Phrase

  Parameters:
    `doc` - The RtfDocument this RtfPhrase belongs to
    `phrase` - The Phrase this RtfPhrase is based on

Method Detail

### write

    public byte[] write()

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

  Write the content of this RtfPhrase. First resets to the paragraph defaults then if the RtfPhrase is in a RtfCell a marker for this is written and finally the RtfChunks of this RtfPhrase are written.

  Specified by:
    `write` in interface `RtfBasicElement`
  Specified by:
    `write` in class `RtfElement`
  Returns:
    The content of this RtfPhrase

### writeContent

    public void writeContent(OutputStream result)
                      throws IOException

  Write the content of this RtfPhrase. First resets to the paragraph defaults then if the RtfPhrase is in a RtfCell a marker for this is written and finally the RtfChunks of this RtfPhrase are written.

  Specified by:
    `writeContent` in interface `RtfBasicElement`
  Overrides:
    `writeContent` in class `RtfElement`
  Throws:
    `IOException`

### setInTable

    public void setInTable(boolean inTable)

  Sets whether this RtfPhrase is in a table. Sets the correct inTable setting for all child elements.

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

### setInHeader

    public void setInHeader(boolean inHeader)

  Sets whether this RtfPhrase is in a header. Sets the correct inTable setting for all child elements.

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

### setRtfDocument

    public void setRtfDocument(RtfDocument doc)

  Sets the RtfDocument this RtfPhrase belongs to. Also sets the RtfDocument for all child elements.

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

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