|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.style.RtfColor
public class RtfColor
The RtfColor stores one rtf color value for a rtf document
Field Summary | |
---|---|
private int |
blue
The blue value |
private static byte |
COLON
Constant for the end of one color entry |
private static byte[] |
COLOR_BLUE
Constant for BLUE value |
private static byte[] |
COLOR_GREEN
Constant for GREEN value |
private static byte[] |
COLOR_NUMBER
Constant for the number of the color in the list of colors |
private static byte[] |
COLOR_RED
Constant for RED value |
private int |
colorNumber
The number of the color in the list of colors |
private int |
green
The green value |
private int |
red
The red value |
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 | |
---|---|
|
RtfColor(RtfDocument doc,
Color col)
Constructs a RtfColor based on the Color |
|
RtfColor(RtfDocument doc,
int red,
int green,
int blue)
Constructs a RtfColor based on the red/green/blue values |
protected |
RtfColor(RtfDocument doc,
int red,
int green,
int blue,
int colorNumber)
Constructor only for use when initializing the RtfColorList |
|
RtfColor(RtfDocument doc,
RtfColor col)
Constructs a RtfColor as a clone of an existing RtfColor |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Tests if this RtfColor is equal to another RtfColor. |
int |
getBlue()
Get the blue value of this RtfColor |
int |
getColorNumber()
Gets the number of this RtfColor in the list of colors |
int |
getGreen()
Get the green value of this RtfColor |
int |
getRed()
Get the red value of this RtfColor |
int |
hashCode()
Returns the hash code of this RtfColor. |
void |
setRtfDocument(RtfDocument doc)
Sets the RtfDocument this RtfColor belongs to |
void |
writeBegin(OutputStream result)
Writes the beginning of this RtfColor |
void |
writeContent(OutputStream out)
unused |
void |
writeDefinition(OutputStream result)
Write the definition part of this RtfColor. |
void |
writeEnd(OutputStream result)
Unused |
Methods inherited from class com.lowagie.text.rtf.RtfElement |
---|
intToByteArray, isInTable, setInHeader, setInTable |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.lowagie.text.rtf.RtfBasicElement |
---|
setInHeader, setInTable |
Field Detail |
---|
private static final byte[] COLOR_RED
private static final byte[] COLOR_GREEN
private static final byte[] COLOR_BLUE
private static final byte COLON
private static final byte[] COLOR_NUMBER
private int colorNumber
private int red
private int green
private int blue
Constructor Detail |
---|
protected RtfColor(RtfDocument doc, int red, int green, int blue, int colorNumber)
doc
- The RtfDocument this RtfColor belongs tored
- The red value to usegreen
- The green value to useblue
- The blue value to usecolorNumber
- The number of the color in the color listpublic RtfColor(RtfDocument doc, RtfColor col)
doc
- The RtfDocument this RtfColor belongs tocol
- The RtfColor to use as a basepublic RtfColor(RtfDocument doc, Color col)
doc
- The RtfDocument this RtfColor belongs tocol
- The Color to base this RtfColor onpublic RtfColor(RtfDocument doc, int red, int green, int blue)
doc
- The RtfDocument this RtfColor belongs tored
- The red value to usegreen
- The green value to useblue
- The blue value to useMethod Detail |
---|
public void writeContent(OutputStream out) throws IOException
writeContent
in interface RtfBasicElement
writeContent
in class RtfElement
out
- The OutputStream
to write the content to
IOException
public void writeDefinition(OutputStream result) throws IOException
writeDefinition
in interface RtfExtendedElement
result
- The OutputStream
to write the element definition to
IOException
public void writeBegin(OutputStream result)
public void writeEnd(OutputStream result)
result
- The OutputStream
to which nothing will be writtenpublic boolean equals(Object obj)
equals
in class Object
obj
- another RtfColor
True
if red, green and blue values of the two colors match,
false
otherwise.public int hashCode()
hashCode
in class Object
public int getBlue()
public int getGreen()
public int getRed()
public int getColorNumber()
public void setRtfDocument(RtfDocument doc)
setRtfDocument
in interface RtfBasicElement
setRtfDocument
in class RtfElement
doc
- The RtfDocument to use
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |