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.style
Class RtfColorList

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

All Implemented Interfaces:
  RtfBasicElement, RtfExtendedElement

    public class RtfColorList

extends RtfElement
implements RtfExtendedElement

The RtfColorList stores all colours that appear in the document. Black and White are always added

Version:
  $Id: RtfColorList.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 static byte[]` | `COLOR_TABLE` Constant for the beginning of the colour table
`(package private) ArrayList` | `colorList` ArrayList containing all colours of this RtfColorList

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
`RtfColorList(RtfDocument doc)` Constructs a new RtfColorList for the RtfDocument.

Method Summary
`int` | `getColorNumber(RtfColor color)` Returns the index of the given RtfColor in the colour list.
`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)` unused
`byte[]` | `writeDefinition()` Deprecated. As of iText 2.0.6 or earlier, replaced by `writeDefinition(OutputStream)`, scheduled for removal at or after 2.1.0
`void` | `writeDefinition(OutputStream result)` Write the definition part of the colour list.

Methods inherited from class com.lowagie.text.rtf.RtfElement
`intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument`

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

Methods inherited from interface com.lowagie.text.rtf.RtfBasicElement
`setInHeader, setInTable, setRtfDocument`

Field Detail

### COLOR_TABLE

    private static final byte[] COLOR_TABLE

  Constant for the beginning of the colour table

### colorList

    ArrayList colorList

  ArrayList containing all colours of this RtfColorList

Constructor Detail

### RtfColorList

    public RtfColorList(RtfDocument doc)

  Constructs a new RtfColorList for the RtfDocument. Will add the default black and white colours.

  Parameters:
    `doc` - The RtfDocument this RtfColorList belongs to

Method Detail

### getColorNumber

    public int getColorNumber(RtfColor color)

  Returns the index of the given RtfColor in the colour list. If the RtfColor is not in the list of colours, then it is added.

  Parameters:
    `color` - The RtfColor for which to get the index
  Returns:
    The index of the RtfColor

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

  unused

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

### writeContent

    public void writeContent(OutputStream out)
                      throws IOException

  unused

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

### writeDefinition

    public byte[] writeDefinition()

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

  Write the definition part of the colour list. Calls the writeDefinition methods of the RtfColors in the colour list.

  Specified by:
    `writeDefinition` in interface `RtfExtendedElement`
  Returns:
    A byte array with the definition colour list

### writeDefinition

    public void writeDefinition(OutputStream result)
                         throws IOException

  Write the definition part of the colour list. Calls the writeDefinition methods of the RtfColors in the colour list.

  Specified by:
    `writeDefinition` in interface `RtfExtendedElement`
  Throws:
    `IOException`

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