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 RtfChunk

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

All Implemented Interfaces:
  RtfBasicElement

    public class RtfChunk

extends RtfElement

The RtfChunk contains one piece of text. The smallest text element available in iText.

Version:
  $Id: RtfChunk.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
`private RtfColor` | `background` An optional background colour.
`private String` | `content` The actual content of this RtfChunk
`private RtfFont` | `font` The font of this RtfChunk
`private static byte[]` | `FONT_END_SUPER_SUBSCRIPT` Constant for the end of sub / superscript flag
`private static byte[]` | `FONT_SUBSCRIPT` Constant for the subscript flag
`private static byte[]` | `FONT_SUPERSCRIPT` Constant for the superscript flag
`private static byte[]` | `HIGHLIGHT` Constant for background colour.
`private boolean` | `softLineBreaks` Whether to use soft line breaks instead of hard ones.
`private float` | `superSubScript` The super / subscript of this RtfChunk

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.
`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)` 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`

Field Detail

### FONT_SUBSCRIPT

    private static final byte[] FONT_SUBSCRIPT

  Constant for the subscript flag

### FONT_SUPERSCRIPT

    private static final byte[] FONT_SUPERSCRIPT

  Constant for the superscript flag

### FONT_END_SUPER_SUBSCRIPT

    private static final byte[] FONT_END_SUPER_SUBSCRIPT

  Constant for the end of sub / superscript flag

### HIGHLIGHT

    private static final byte[] HIGHLIGHT

  Constant for background colour.

### font

    private RtfFont font

  The font of this RtfChunk

### content

    private String content

  The actual content of this RtfChunk

### softLineBreaks

    private boolean softLineBreaks

  Whether to use soft line breaks instead of hard ones.

### superSubScript

    private float superSubScript

  The super / subscript of this RtfChunk

### background

    private RtfColor background

  An optional background colour.

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

### 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

  Writes the content of this RtfChunk. First the font information is written, then the content, and then more font information

  Specified by:
    `write` in interface `RtfBasicElement`
  Specified by:
    `write` in class `RtfElement`
  Returns:
    A byte array with the content of this RtfChunk

### writeContent

    public void writeContent(OutputStream result)
                      throws 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`
  Overrides:
    `writeContent` in class `RtfElement`
  Throws:
    `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.

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