public class RtfColor extends RtfElement implements RtfExtendedElement
document, inHeader, inTable
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
Modifier | Constructor and Description |
---|---|
|
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
|
Modifier and Type | Method and Description |
---|---|
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
|
intToByteArray, isInTable, setInHeader, setInTable
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
setInHeader, setInTable
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 usepublic void writeContent(OutputStream out) throws IOException
writeContent
in interface RtfBasicElement
writeContent
in class RtfElement
out
- The OutputStream
to write the content toIOException
public void writeDefinition(OutputStream result) throws IOException
writeDefinition
in interface RtfExtendedElement
result
- The OutputStream
to write the element definition toIOException
public void writeBegin(OutputStream result)
public void writeEnd(OutputStream result)
result
- The OutputStream
to which nothing will be writtenpublic boolean equals(Object obj)
public int hashCode()
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 useCopyright © 2015. All rights reserved.