|
![]() |
||||||||
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.RtfDestinationFontTable
public final class RtfDestinationFontTable
RtfDestinationFontTable
handles data destined for the font table destination
Field Summary | |
---|---|
private String |
charset
The \charset value |
private static String |
CHARSET_DEFAULT
|
private String |
cpg
The \cpg value |
private String |
falt
The \falt alternate font if primary font is not available. |
private int |
fbias
The \fbias value |
private String |
fontemb
The \falt alternate font if primary font is not available. |
private String |
fontFamily
The family of the font being parsed. |
private String |
fontFile
The \falt alternate font if primary font is not available. |
private String |
fontFileCpg
The \falt alternate font if primary font is not available. |
private HashMap |
fontMap
Convert font mapping to FontFactory font objects. |
private String |
fontName
The name of the font being parsed. |
private String |
fontNr
The number of the font being parsed. |
private String |
fontType
The \falt alternate font if primary font is not available. |
private int |
fprq
The \fprq |
private RtfImportMgr |
importHeader
The RtfImportHeader to add font mappings to. |
private String |
nontaggedname
The \*\fname |
private String |
panose
The \*\panose font matching value if primary font is not available. |
private static int |
SETTING_ALTERNATE
\falt |
private static int |
SETTING_FONT_EMBED
\fontemb |
private static int |
SETTING_FONT_FILE
\ffile |
private static int |
SETTING_FONTNAME
\fname |
private static int |
SETTING_NORMAL
Normal |
private static int |
SETTING_PANOSE
\panose |
private int |
state
state flag to handle different parsing of a font element |
private String |
themeFont
The theme (Office 2007) |
private String |
trueType
The \fnil, \fttruetype value |
Fields inherited from class com.lowagie.text.rtf.parser.destinations.RtfDestination |
---|
lastCtrlWord, modified, rtfParser |
Constructor Summary | |
---|---|
RtfDestinationFontTable()
Constructor |
|
RtfDestinationFontTable(RtfParser parser)
Constructs a new RtfFontTableParser. |
Method Summary | |
---|---|
boolean |
closeDestination()
Clean up when destination is closed. |
private Font |
createfont(String fontName)
Create a font via the FontFactory |
private Properties |
getEnvironmentVariables()
Utility method to load the environment variables. |
Font |
getFont(String key)
Get a Font object from the font map object |
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 |
importSystemFonts()
Load system fonts into the static FontFactory object |
private void |
init(boolean importFonts)
Initialize the object. |
private void |
processFont()
Process the font information that was parsed from the input. |
void |
setBias(String value)
Set the font bias |
void |
setCharset(String charset)
Set the character-set to the parsed value. |
void |
setCodePage(String value)
Set the code page |
void |
setFontAlternate(String fontAlternate)
Set the alternate font name. |
void |
setFontFamily(String fontFamily)
Set the font family to the parsed value. |
void |
setFontName(String fontName)
Set the font name to the parsed value. |
void |
setFontNumber(String fontNr)
Set the font number to the parsed value. |
void |
setParser(RtfParser parser)
Set the parser to use with the RtfDestination object. |
void |
setPitch(String value)
Set the font pitch |
void |
setThemeFont(String themeFont)
Set the font theme |
void |
setToDefaults()
Method to set this object to the default values. |
void |
setTrueType(String value)
Set the TrueTtype type |
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 String themeFont
private String fontNr
private String fontFamily
private String charset
private static final String CHARSET_DEFAULT
private int fprq
private String panose
private String nontaggedname
private String fontName
private String falt
private String fontemb
private String fontType
private String fontFile
private String fontFileCpg
private int fbias
private String cpg
private String trueType
private int state
private static final int SETTING_NORMAL
private static final int SETTING_ALTERNATE
private static final int SETTING_FONTNAME
private static final int SETTING_PANOSE
private static final int SETTING_FONT_EMBED
private static final int SETTING_FONT_FILE
private HashMap fontMap
FontFactory
font objects.
Constructor Detail |
---|
public RtfDestinationFontTable()
public RtfDestinationFontTable(RtfParser parser)
parser
- an RtfParser.Method Detail |
---|
public void setParser(RtfParser parser)
RtfDestination
setParser
in class RtfDestination
parser
- The RtfParser object.private void init(boolean importFonts)
importFonts
- true to import the fonts into the FontFactory, false do not load fontspublic 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 setCodePage(String value)
value
- The code page valuepublic void setTrueType(String value)
value
- The typepublic void setPitch(String value)
value
- Pitch valuepublic void setBias(String value)
value
- Bias valuepublic void setThemeFont(String themeFont)
themeFont
- Theme valuepublic void setFontName(String fontName)
fontName
- The font name.public void setFontFamily(String fontFamily)
fontFamily
- The font family.public void setFontNumber(String fontNr)
fontNr
- The font number.public void setFontAlternate(String fontAlternate)
fontAlternate
- The falt font valuepublic void setCharset(String charset)
charset
- The charset valuepublic void setToDefaults()
RtfDestination
setToDefaults
in class RtfDestination
private void processFont()
private Font createfont(String fontName)
FontFactory
fontName
- The font name to create
Font
objectpublic Font getFont(String key)
Font
object from the font map object
key
- The font number to get
Font
object.private void importSystemFonts()
FontFactory
object
private Properties getEnvironmentVariables() throws Throwable
Throwable
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |