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:
- $Version:$
- Author:
- Mark Hall (mhall@edu.uni-klu.ac.at)
Field Summary |
private static byte[] |
COLOR_TABLE
Constant for the beginning of the colour table |
(package private) java.util.ArrayList |
colorList
ArrayList containing all colours of this RtfColorList |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COLOR_TABLE
private static final byte[] COLOR_TABLE
- Constant for the beginning of the colour table
colorList
java.util.ArrayList colorList
- ArrayList containing all colours of this RtfColorList
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
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
writeDefinition
public byte[] writeDefinition()
- 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