|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.rtf.parser.destinations.RtfDestination
com.lowagie.text.rtf.parser.destinations.RtfDestinationColorTable
public class RtfDestinationColorTable
RtfDestinationColorTable
handles data destined for the color table destination
Field Summary | |
---|---|
private int |
blue
The blue component of the current color being parsed. |
private HashMap |
colorMap
Color map object for conversions |
private int |
colorNr
The number of the current color being parsed. |
private int |
cshade
Specifies the shade when specifying a theme color. |
private int |
ctint
Specifies the tint when specifying a theme color. |
private int |
green
The green component of the current color being parsed. |
private RtfImportMgr |
importHeader
The RtfImportHeader to add color mappings to. |
private int |
red
The red component of the current color being parsed. |
private int |
themeColor
Specifies the use of a theme color. |
Fields inherited from class com.lowagie.text.rtf.parser.destinations.RtfDestination |
---|
lastCtrlWord, modified, rtfParser |
Constructor Summary | |
---|---|
RtfDestinationColorTable()
Constructor. |
|
RtfDestinationColorTable(RtfParser parser)
Constructs a new RtfColorTableParser. |
Method Summary | |
---|---|
boolean |
closeDestination()
Clean up when destination is closed. |
Color |
getColor(String key)
Get the Color object that is mapped to the key. |
boolean |
handleCharacter(int ch)
Handle text for this destination |
boolean |
handleCloseGroup()
Clean up when group is closed. |
boolean |
handleControlWord(RtfCtrlWordData ctrlWordData)
Handle control word for this destination |
boolean |
handleOpenGroup()
Setup when group is opened. |
boolean |
handleOpeningSubGroup()
Handle a new subgroup contained within this group |
private void |
processColor()
Processes the color triplet parsed from the document. |
private void |
setBlue(int value)
Set the blue color value. |
private void |
setGreen(int value)
Set the green color value. |
void |
setParser(RtfParser parser)
Set the parser to use with the RtfDestination object. |
private void |
setRed(int value)
Set the red color to value. |
private void |
setShade(int value)
Set the shade value |
private void |
setThemeColor(int value)
Set the theme color value. |
private void |
setTint(int value)
Set the tint value |
void |
setToDefaults()
Set default values. |
Methods inherited from class com.lowagie.text.rtf.parser.destinations.RtfDestination |
---|
addListener, afterCharacter, afterCtrlWord, beforeCharacter, beforeCtrlWord, getNewTokeniserState, isModified, onCharacter, onCloseGroup, onCtrlWord, onOpenGroup, removeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private RtfImportMgr importHeader
private int colorNr
private int red
private int green
private int blue
private int ctint
cshade
,
themeColor
private int cshade
ctint
,
themeColor
private int themeColor
RtfColorThemes
,
ctint
,
cshade
private HashMap colorMap
Constructor Detail |
---|
public RtfDestinationColorTable()
public RtfDestinationColorTable(RtfParser parser)
parser
- an RtfParserMethod Detail |
---|
public void setParser(RtfParser parser)
RtfDestination
setParser
in class RtfDestination
parser
- The RtfParser object.public boolean handleOpeningSubGroup()
RtfDestination
handleOpeningSubGroup
in class RtfDestination
public boolean closeDestination()
RtfDestination
closeDestination
in class RtfDestination
public boolean handleCloseGroup()
RtfDestination
handleCloseGroup
in class RtfDestination
public boolean handleOpenGroup()
RtfDestination
handleOpenGroup
in class RtfDestination
public boolean handleCharacter(int ch)
RtfDestination
handleCharacter
in class RtfDestination
public boolean handleControlWord(RtfCtrlWordData ctrlWordData)
RtfDestination
handleControlWord
in class RtfDestination
ctrlWordData
- The control word and parameter information object
public void setToDefaults()
setToDefaults
in class RtfDestination
private void processColor()
private void setRed(int value)
value
- Value to set red to.private void setGreen(int value)
value
- Value to set green to.private void setBlue(int value)
value
- Value to set blue to.private void setTint(int value)
value
- Value to set the tint toctint
private void setShade(int value)
value
- Value to set the shade tocshade
private void setThemeColor(int value)
value
- Value to set the theme color toRtfColorThemes
public Color getColor(String key)
Color
object that is mapped to the key.
key
- The map number.
*@return Color
object from the map. null if key does not exist.
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |