com.lowagie.text.rtf.style

Class RtfColorList

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 2776 2007-05-23 20:01:40Z hallm $

Author: Mark Hall (mhall@edu.uni-klu.ac.at) Thomas Bickel (tmb99@inode.at)

Field Summary
ArrayListcolorList
ArrayList containing all colours of this RtfColorList
static byte[]COLOR_TABLE
Constant for the beginning of the colour table
Constructor Summary
RtfColorList(RtfDocument doc)
Constructs a new RtfColorList for the RtfDocument.
Method Summary
intgetColorNumber(RtfColor color)
Returns the index of the given RtfColor in the colour list.
byte[]write()
unused
voidwriteContent(OutputStream out)
unused
byte[]writeDefinition()
Write the definition part of the colour list.
voidwriteDefinition(OutputStream result)
Write the definition part of the colour list.

Field Detail

colorList

ArrayList colorList
ArrayList containing all colours of this RtfColorList

COLOR_TABLE

private static final byte[] COLOR_TABLE
Constant for the beginning of the colour table

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: replaced by writeContent

unused

writeContent

public void writeContent(OutputStream out)
unused

writeDefinition

public byte[] writeDefinition()

Deprecated: replaced by writeDefinition

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

Returns: A byte array with the definition colour list

writeDefinition

public void writeDefinition(OutputStream result)
Write the definition part of the colour list. Calls the writeDefinition methods of the RtfColors in the colour list.