com.lowagie.text.rtf.direct
Class RtfFontTableParser

java.lang.Object
  extended by com.lowagie.text.rtf.direct.RtfFontTableParser

public class RtfFontTableParser
extends java.lang.Object

The RtfFontTableParser handles the events generated by the RtfTokeniser while the RTF font table is parsed.

Version:
$Revision: 3071 $
Author:
Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
private  java.lang.String fontName
          The name of the font being parsed.
private  java.lang.String fontNr
          The number of the font being parsed.
private  RtfImportHeader importHeader
          The RtfImportHeader to add font mappings to.
 
Constructor Summary
RtfFontTableParser(RtfImportHeader importHeader)
          Constructs a new RtfFontTableParser.
 
Method Summary
 void handleCloseGroup(int groupLevel)
          Handles closing of a group during parsing.
 void handleCtrlWord(java.lang.String ctrlWord, int groupLevel)
          Handles the font number control word.
 void handleText(java.lang.String text, int groupLevel)
          Handles the font name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

importHeader

private RtfImportHeader importHeader
The RtfImportHeader to add font mappings to.


fontNr

private java.lang.String fontNr
The number of the font being parsed.


fontName

private java.lang.String fontName
The name of the font being parsed.

Constructor Detail

RtfFontTableParser

public RtfFontTableParser(RtfImportHeader importHeader)
Constructs a new RtfFontTableParser.

Parameters:
importHeader - The RtfImportHeader to add font mappings to.
Method Detail

handleCloseGroup

public void handleCloseGroup(int groupLevel)
Handles closing of a group during parsing. If the group nesting level is 3 then an individual font definition was closed and thus if the font number and font name are set, they can be added to the mappings.

Parameters:
groupLevel - The current group nesting level.

handleCtrlWord

public void handleCtrlWord(java.lang.String ctrlWord,
                           int groupLevel)
Handles the font number control word. Only relevant if the group nesting level is 3.

Parameters:
ctrlWord - The control word to handle.
groupLevel - The current group nesting level.

handleText

public void handleText(java.lang.String text,
                       int groupLevel)
Handles the font name. The font name must be ended by a semicolon and must be at group nesting level 3.

Parameters:
text - The font name to handle.
groupLevel - The current group nesting level.