|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.rtf.direct.RtfImportHeader
public class RtfImportHeader
The RtfImportHeader stores the docment header information from an RTF document that is being imported. Currently font and color settings are stored. The RtfImportHeader maintains a mapping from font and color numbers from the imported RTF document to the RTF document that is the target of the import. This guarantees that the merged document has the correct font and color settings.
Field Summary | |
---|---|
private java.util.HashMap |
importColorMapping
The HashMap storing the color number mapings. |
private java.util.HashMap |
importFontMapping
The HashMap storing the font number mappings. |
private RtfDocument |
rtfDoc
The RtfDocument to get font and color numbers from. |
Constructor Summary | |
---|---|
RtfImportHeader(RtfDocument rtfDoc)
Constructs a new RtfImportHeader. |
Method Summary | |
---|---|
void |
importColor(java.lang.String colorNr,
java.awt.Color color)
Imports a color value. |
void |
importFont(java.lang.String fontNr,
java.lang.String fontName)
Imports a font. |
java.lang.String |
mapColorNr(java.lang.String colorNr)
Performs the mapping from the original font number to the actual font number used in the RTF document. |
java.lang.String |
mapFontNr(java.lang.String fontNr)
Performs the mapping from the original font number to the actual font number in the resulting RTF document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.HashMap importFontMapping
private java.util.HashMap importColorMapping
private RtfDocument rtfDoc
Constructor Detail |
---|
public RtfImportHeader(RtfDocument rtfDoc)
rtfDoc
- The RtfDocument to get font and color numbers from.Method Detail |
---|
public void importFont(java.lang.String fontNr, java.lang.String fontName)
fontNr
- The original font number.fontName
- The font name to look up.public java.lang.String mapFontNr(java.lang.String fontNr)
fontNr
- The font number to map.
public void importColor(java.lang.String colorNr, java.awt.Color color)
colorNr
- The original color number.color
- The color to import.public java.lang.String mapColorNr(java.lang.String colorNr)
colorNr
- The color number to map.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |