Package 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
,com.lowagie.text.RtfElementInterface
The RtfColorList stores all colors that appear in the document. Black
and White are always added
- Version:
- $Id: RtfColorList.java 3580 2008-08-06 15:52:00Z howard_s $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]
Constant for the beginning of the color tableArrayList containing all colors of this RtfColorListFields 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
ConstructorsConstructorDescriptionRtfColorList
(RtfDocument doc) Constructs a new RtfColorList for the RtfDocument. -
Method Summary
Modifier and TypeMethodDescriptionint
getColorNumber
(RtfColor color) Returns the index of the given RtfColor in the color list.void
writeContent
(OutputStream out) unusedvoid
writeDefinition
(OutputStream result) Write the definition part of the color 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 Details
-
COLOR_TABLE
private static final byte[] COLOR_TABLEConstant for the beginning of the color table -
colorList
ArrayList containing all colors of this RtfColorList
-
-
Constructor Details
-
RtfColorList
Constructs a new RtfColorList for the RtfDocument. Will add the default black and white colors.- Parameters:
doc
- The RtfDocument this RtfColorList belongs to
-
-
Method Details
-
getColorNumber
Returns the index of the given RtfColor in the color list. If the RtfColor is not in the list of colors, then it is added.- Parameters:
color
- The RtfColor for which to get the index- Returns:
- The index of the RtfColor
-
writeContent
unused- Specified by:
writeContent
in interfaceRtfBasicElement
- Specified by:
writeContent
in classRtfElement
- Parameters:
out
- TheOutputStream
to write the content to- Throws:
IOException
-
writeDefinition
Write the definition part of the color list. Calls the writeDefinition methods of the RtfColors in the color list.- Specified by:
writeDefinition
in interfaceRtfExtendedElement
- Parameters:
result
- TheOutputStream
to write the element definition to- Throws:
IOException
-