|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.rtf.parser.RtfImportMgr
public class RtfImportMgr
The RtfImportHeader stores the document 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. It also handles other list based items that need mapping, for example stylesheets and lists.
Field Summary | |
---|---|
private Document |
doc
The Document. |
private HashMap |
importColorMapping
The HashMap storing the color number mappings. |
private HashMap |
importFontMapping
The HashMap storing the font number mappings. |
private HashMap |
importListMapping
The HashMap storing the List number mappings. |
private HashMap |
importStylesheetListMapping
The HashMap storing the Stylesheet List number mappings. |
private RtfDocument |
rtfDoc
The RtfDocument to get font and color numbers from. |
Constructor Summary | |
---|---|
RtfImportMgr(RtfDocument rtfDoc,
Document doc)
Constructs a new RtfImportHeader. |
Method Summary | |
---|---|
void |
importColor(String colorNr,
Color color)
Imports a color value. |
boolean |
importFont(String fontNr,
String fontName)
Imports a font. |
boolean |
importFont(String fontNr,
String fontName,
int charset)
Imports a font. |
boolean |
importFont(String fontNr,
String fontName,
String fontFamily,
int charset)
Imports a font. |
void |
importList(String origListNr,
String newListNr)
Imports a List value. |
boolean |
importStylesheetList(String listNr,
List listIn)
Imports a stylesheet list value. |
String |
mapColorNr(String colorNr)
Performs the mapping from the original font number to the actual font number used in the RTF document. |
String |
mapFontNr(String fontNr)
Performs the mapping from the original font number to the actual font number in the resulting RTF document. |
String |
mapListNr(String listNr)
Performs the mapping from the original list number to the actual list number in the resulting RTF document. |
String |
mapStylesheetListNr(String listNr)
Performs the mapping from the original stylesheet number to the actual stylesheet 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 HashMap importFontMapping
private HashMap importColorMapping
private HashMap importStylesheetListMapping
private HashMap importListMapping
private RtfDocument rtfDoc
private Document doc
Constructor Detail |
---|
public RtfImportMgr(RtfDocument rtfDoc, Document doc)
rtfDoc
- The RtfDocument to get font and color numbers from.Method Detail |
---|
public boolean importFont(String fontNr, String fontName)
fontNr
- The original font number.fontName
- The font name to look up.public boolean importFont(String fontNr, String fontName, int charset)
fontNr
- The original font number.fontName
- The font name to look up.charset
- The character set to use for the font.public boolean importFont(String fontNr, String fontName, String fontFamily, int charset)
fontNr
- The original font number.fontName
- The font name to look up.charset
- The character set to use for the font.public String mapFontNr(String fontNr)
fontNr
- The font number to map.
public void importColor(String colorNr, Color color)
colorNr
- The original color number.color
- The color to import.public String mapColorNr(String colorNr)
colorNr
- The color number to map.
public void importList(String origListNr, String newListNr)
public String mapListNr(String listNr)
public boolean importStylesheetList(String listNr, List listIn)
public String mapStylesheetListNr(String listNr)
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |