Package com.lowagie.text.rtf.parser
Class RtfImportMappings
java.lang.Object
com.lowagie.text.rtf.parser.RtfImportMappings
The RtfImportMappings make it possible to define font
and color mappings when using the RtfWriter2.importRtfFragment
method. This is necessary, because a RTF fragment does not
contain font or color information, just references to the
font and color tables.
The font mappings are fontNr -> fontName and the color mappigns are colorNr -> Color.
The font mappings are fontNr -> fontName and the color mappigns are colorNr -> Color.
- Since:
- 2.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe colorNr to Color mappings.The fontNr to fontName mappings.The listNr to List mappings.The sytlesheetListNr to Stylesheet mappings. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new RtfImportMappings initialising the mappings. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a color to the list of mappings.void
Add a font to the list of mappings.void
Add a List to the list of mappings.void
addStylesheetList
(String stylesheetListNr, com.lowagie.text.List list) Add a Stylesheet List to the list of mappings.Gets the list of color mappings.Gets the list of font mappings.Gets the list of List mappings.Gets the list of Stylesheet mappings.
-
Field Details
-
fontMappings
The fontNr to fontName mappings. -
colorMappings
The colorNr to Color mappings. -
listMappings
The listNr to List mappings. -
stylesheetListMappings
The sytlesheetListNr to Stylesheet mappings.
-
-
Constructor Details
-
RtfImportMappings
public RtfImportMappings()Constructs a new RtfImportMappings initialising the mappings.
-
-
Method Details
-
addFont
Add a font to the list of mappings.- Parameters:
fontNr
- The font number.fontName
- The font name.
-
addColor
Add a color to the list of mappings.- Parameters:
colorNr
- The color number.color
- The Color.
-
addList
Add a List to the list of mappings.- Parameters:
listNr
- The List number.list
- The List.
-
addStylesheetList
Add a Stylesheet List to the list of mappings.- Parameters:
stylesheetListNr
- The Stylesheet List number.list
- The StylesheetList.
-
getFontMappings
Gets the list of font mappings. String to String.- Returns:
- The font mappings.
-
getColorMappings
Gets the list of color mappings. String to Color.- Returns:
- The color mappings.
-
getListMappings
Gets the list of List mappings.- Returns:
- The List mappings.
-
getStylesheetListMappings
Gets the list of Stylesheet mappings. .- Returns:
- The Stylesheet List mappings.
-