public final class RtfCtrlWordMgr
extends java.lang.Object
RtfCtrlWordMgr
handles the dispatching of control words from
the table of known control words.Modifier and Type | Field and Description |
---|---|
private RtfCtrlWordMap |
ctrlWordMap |
static boolean |
debug |
static boolean |
debugFound |
static boolean |
debugNotFound |
private java.util.ArrayList |
listeners
The
RtfCtrlWordListener . |
private java.io.PushbackInputStream |
reader |
private RtfParser |
rtfParser |
Constructor and Description |
---|
RtfCtrlWordMgr(RtfParser rtfParser,
java.io.PushbackInputStream reader)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addRtfCtrlWordListener(RtfCtrlWordListener listener)
Adds a
RtfCtrlWordListener to the RtfCtrlWordMgr . |
private boolean |
afterCtrlWord(RtfCtrlWordData ctrlWordData) |
private boolean |
beforeCtrlWord(RtfCtrlWordData ctrlWordData) |
private int |
dispatchKeyword(RtfCtrlWordData ctrlWordData,
int groupLevel)
Dispatch the token to the correct control word handling object.
|
int |
handleKeyword(RtfCtrlWordData ctrlWordData,
int groupLevel)
Internal to control word manager class.
|
private boolean |
onCtrlWord(RtfCtrlWordData ctrlWordData) |
void |
removeRtfCtrlWordListener(RtfCtrlWordListener listener)
Removes a
RtfCtrlWordListener from the RtfCtrlWordMgr . |
public static final boolean debug
public static final boolean debugFound
public static final boolean debugNotFound
private java.io.PushbackInputStream reader
private RtfParser rtfParser
private RtfCtrlWordMap ctrlWordMap
private java.util.ArrayList listeners
RtfCtrlWordListener
.public RtfCtrlWordMgr(RtfParser rtfParser, java.io.PushbackInputStream reader)
rtfParser
- The parser object this manager works with.reader
- the PushbackReader from the tokeniser.public int handleKeyword(RtfCtrlWordData ctrlWordData, int groupLevel)
ctrlWordData
- The RtfCtrlWordData
object with control word and paramgroupLevel
- The current document group parsing levelprivate int dispatchKeyword(RtfCtrlWordData ctrlWordData, int groupLevel)
ctrlWordData
- The RtfCtrlWordData
object with control word and paramgroupLevel
- The current document group parsing levelpublic void addRtfCtrlWordListener(RtfCtrlWordListener listener)
RtfCtrlWordListener
to the RtfCtrlWordMgr
.listener
- the new RtfCtrlWordListener.public void removeRtfCtrlWordListener(RtfCtrlWordListener listener)
RtfCtrlWordListener
from the RtfCtrlWordMgr
.listener
- the RtfCtrlWordListener that has to be removed.private boolean beforeCtrlWord(RtfCtrlWordData ctrlWordData)
private boolean onCtrlWord(RtfCtrlWordData ctrlWordData)
private boolean afterCtrlWord(RtfCtrlWordData ctrlWordData)