com.lowagie.text.rtf.parser.ctrlwords

## Class RtfCtrlWordMgr

- java.lang.Object
- - com.lowagie.text.rtf.parser.ctrlwords.RtfCtrlWordMgr

-     public final class RtfCtrlWordMgr
      extends java.lang.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

    Fields
    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 Summary

    Constructors
    Constructor and Description
    `RtfCtrlWordMgr(RtfParser rtfParser, java.io.PushbackInputStream reader)` Constructor

  - ### Method Summary

    Methods
    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`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

      The `RtfCtrlWordListener`.

  - ### 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` - The `RtfCtrlWordData` object with control word and param
        `groupLevel` - 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` - The `RtfCtrlWordData` object with control word and param
        `groupLevel` - The current document group parsing level
      Returns:
        errOK if ok, otherwise an error code.

    - #### addRtfCtrlWordListener

          public void addRtfCtrlWordListener(RtfCtrlWordListener listener)

      Adds a `RtfCtrlWordListener` to the `RtfCtrlWordMgr`.
      Parameters:
        `listener` - the new RtfCtrlWordListener.

    - #### removeRtfCtrlWordListener

          public void removeRtfCtrlWordListener(RtfCtrlWordListener listener)

      Removes a `RtfCtrlWordListener` from the `RtfCtrlWordMgr`.
      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)