|
|||||||||
| Home >> All >> org >> jfor >> jfor >> rtflib >> [ rtfdoc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jfor.jfor.rtflib.rtfdoc
Class RtfColorTable

java.lang.Objectorg.jfor.jfor.rtflib.rtfdoc.RtfColorTable
- public class RtfColorTable
- extends java.lang.Object
Singelton of the RTF color table.
This class was created for
Field Summary
private static intBLUE
private java.util.HashtablecolorIndex
Index table for the colors
private java.util.VectorcolorTable
Used colors to this vector
private static intGREEN
private static RtfColorTableinstance
Singelton instance
private java.util.HashtablenamedColors
Map of color names to color numbers
private static intRED
Constructor Summary
private RtfColorTable()
Constructor.
Method Summary
private voidaddColor(java.lang.Integer i)
Adds a color to the table.
private voidaddNamedColor(java.lang.String name,
int colorNumber)
define a named color for getColorNumber(String)
private intdetermineColorLevel(int identifier,
int color)
Determines the color level from the identifier.
private intdetermineIdentifier(int red,
int green,
int blue)
Determines a identifier for the color.
intgetColorNumber(int red,
int green,
int blue)
Gets the number of color in the color table
java.lang.IntegergetColorNumber(java.lang.String name)
get the RTF number of a named color
static RtfColorTablegetInstance()
Singelton.
private voidinit()
Initialize the color table.
voidwriteColors(RtfHeader header)
Writes the color table in the header.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
RED
private static int RED
GREEN
private static int GREEN
BLUE
private static int BLUE
instance
private static RtfColorTable instance
colorIndex
private java.util.Hashtable colorIndex
colorTable
private java.util.Vector colorTable
namedColors
private java.util.Hashtable namedColors
Constructor Detail
RtfColorTable
private RtfColorTable()
Method Detail
getInstance
public static RtfColorTable getInstance()
init
private void init()
addNamedColor
private void addNamedColor(java.lang.String name,
int colorNumber)
getColorNumber
public java.lang.Integer getColorNumber(java.lang.String name)
getColorNumber
public int getColorNumber(int red,
int green,
int blue)
writeColors
public void writeColors(RtfHeader header)
throws java.io.IOException
addColor
private void addColor(java.lang.Integer i)
determineIdentifier
private int determineIdentifier(int red,
int green,
int blue)
determineColorLevel
private int determineColorLevel(int identifier,
int color)
Overview
Package
Class
Use
Deprecated
Index
Home >> All >> org >> jfor >> jfor >> rtflib >> [ rtfdoc overview ]
PREV CLASS NEXT CLASS
SUMMARY:
JAVADOC |
SOURCE |
DOWNLOAD | NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
org.jfor.jfor.rtflib.rtfdoc.RtfColorTable