Class RtfCtrlWordMgr
- java.lang.Object
-
- com.lowagie.text.rtf.parser.ctrlwords.RtfCtrlWordMgr
-
public final class RtfCtrlWordMgr extends java.lang.ObjectRtfCtrlWordMgrhandles the dispatching of control words from the table of known control words.- Since:
- 2.0.8
- Author:
- Howard Shank (hgshank@yahoo.com)
-
-
Field Summary
Fields Modifier and Type Field Description private RtfCtrlWordMapctrlWordMapstatic booleandebugstatic booleandebugFoundstatic booleandebugNotFoundprivate java.util.ArrayListlistenersTheRtfCtrlWordListener.private java.io.PushbackInputStreamreaderprivate RtfParserrtfParser
-
Constructor Summary
Constructors Constructor Description RtfCtrlWordMgr(RtfParser rtfParser, java.io.PushbackInputStream reader)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRtfCtrlWordListener(RtfCtrlWordListener listener)Adds aRtfCtrlWordListenerto theRtfCtrlWordMgr.private booleanafterCtrlWord(RtfCtrlWordData ctrlWordData)private booleanbeforeCtrlWord(RtfCtrlWordData ctrlWordData)private 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.private booleanonCtrlWord(RtfCtrlWordData ctrlWordData)voidremoveRtfCtrlWordListener(RtfCtrlWordListener listener)Removes aRtfCtrlWordListenerfrom theRtfCtrlWordMgr.
-
-
-
Field Detail
-
debug
public static final boolean debug
- See Also:
- Constant Field Values
-
debugFound
public static final boolean debugFound
- See Also:
- Constant Field Values
-
debugNotFound
public static final boolean debugNotFound
- See Also:
- Constant Field Values
-
reader
private java.io.PushbackInputStream reader
-
rtfParser
private RtfParser rtfParser
-
ctrlWordMap
private RtfCtrlWordMap ctrlWordMap
-
listeners
private java.util.ArrayList listeners
TheRtfCtrlWordListener.
-
-
Constructor Detail
-
RtfCtrlWordMgr
public RtfCtrlWordMgr(RtfParser rtfParser, java.io.PushbackInputStream reader)
Constructor- Parameters:
rtfParser- The parser object this manager works with.reader- the PushbackReader from the tokeniser.
-
-
Method Detail
-
handleKeyword
public int handleKeyword(RtfCtrlWordData ctrlWordData, int groupLevel)
Internal to control word manager class.- Parameters:
ctrlWordData- TheRtfCtrlWordDataobject with control word and paramgroupLevel- The current document group parsing level- Returns:
- errOK if ok, otherwise an error code.
-
dispatchKeyword
private int dispatchKeyword(RtfCtrlWordData ctrlWordData, int groupLevel)
Dispatch the token to the correct control word handling object.- Parameters:
ctrlWordData- TheRtfCtrlWordDataobject with control word and paramgroupLevel- The current document group parsing level- Returns:
- errOK if ok, otherwise an error code.
-
addRtfCtrlWordListener
public void addRtfCtrlWordListener(RtfCtrlWordListener listener)
Adds aRtfCtrlWordListenerto theRtfCtrlWordMgr.- Parameters:
listener- the new RtfCtrlWordListener.
-
removeRtfCtrlWordListener
public void removeRtfCtrlWordListener(RtfCtrlWordListener listener)
Removes aRtfCtrlWordListenerfrom theRtfCtrlWordMgr.- Parameters:
listener- the RtfCtrlWordListener that has to be removed.
-
beforeCtrlWord
private boolean beforeCtrlWord(RtfCtrlWordData ctrlWordData)
-
onCtrlWord
private boolean onCtrlWord(RtfCtrlWordData ctrlWordData)
-
afterCtrlWord
private boolean afterCtrlWord(RtfCtrlWordData ctrlWordData)
-
-