com.lowagie.text.rtf.parser.ctrlwords

Class RtfCtrlWordMgr

public final class RtfCtrlWordMgr extends Object

RtfCtrlWordMgr handles the dispatching of control words from the table of known control words.

Since: 2.0.8

Author: Howard Shank (hgshank@yahoo.com)

Field Summary
RtfCtrlWordMapctrlWordMap
static booleandebug
static booleandebugFound
static booleandebugNotFound
ArrayListlisteners
The RtfCtrlWordListener.
PushbackInputStreamreader
RtfParserrtfParser
Constructor Summary
RtfCtrlWordMgr(RtfParser rtfParser, PushbackInputStream reader)
Constructor
Method Summary
voidaddRtfCtrlWordListener(RtfCtrlWordListener listener)
Adds a RtfCtrlWordListener to the RtfCtrlWordMgr.
booleanafterCtrlWord(RtfCtrlWordData ctrlWordData)
booleanbeforeCtrlWord(RtfCtrlWordData ctrlWordData)
intdispatchKeyword(RtfCtrlWordData ctrlWordData, int groupLevel)
Dispatch the token to the correct control word handling object.
inthandleKeyword(RtfCtrlWordData ctrlWordData, int groupLevel)
Internal to control word manager class.
booleanonCtrlWord(RtfCtrlWordData ctrlWordData)
voidremoveRtfCtrlWordListener(RtfCtrlWordListener listener)
Removes a RtfCtrlWordListener from the RtfCtrlWordMgr.

Field Detail

ctrlWordMap

private RtfCtrlWordMap ctrlWordMap

debug

public static final boolean debug

debugFound

public static final boolean debugFound

debugNotFound

public static final boolean debugNotFound

listeners

private ArrayList listeners
The RtfCtrlWordListener.

reader

private PushbackInputStream reader

rtfParser

private RtfParser rtfParser

Constructor Detail

RtfCtrlWordMgr

public RtfCtrlWordMgr(RtfParser rtfParser, PushbackInputStream reader)
Constructor

Parameters: rtfParser The parser object this manager works with. reader the PushbackReader from the tokeniser.

Method Detail

addRtfCtrlWordListener

public void addRtfCtrlWordListener(RtfCtrlWordListener listener)
Adds a RtfCtrlWordListener to the RtfCtrlWordMgr.

Parameters: listener the new RtfCtrlWordListener.

afterCtrlWord

private boolean afterCtrlWord(RtfCtrlWordData ctrlWordData)

beforeCtrlWord

private boolean beforeCtrlWord(RtfCtrlWordData ctrlWordData)

dispatchKeyword

private int dispatchKeyword(RtfCtrlWordData ctrlWordData, int groupLevel)
Dispatch the token to the correct control word handling object.

Parameters: ctrlWordData The RtfCtrlWordData object with control word and param groupLevel The current document group parsing level

Returns: errOK if ok, otherwise an error code.

handleKeyword

public int handleKeyword(RtfCtrlWordData ctrlWordData, int groupLevel)
Internal to control word manager class.

Parameters: ctrlWordData The RtfCtrlWordData object with control word and param groupLevel The current document group parsing level

Returns: errOK if ok, otherwise an error code.

onCtrlWord

private boolean onCtrlWord(RtfCtrlWordData ctrlWordData)

removeRtfCtrlWordListener

public void removeRtfCtrlWordListener(RtfCtrlWordListener listener)
Removes a RtfCtrlWordListener from the RtfCtrlWordMgr.

Parameters: listener the RtfCtrlWordListener that has to be removed.