Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.lowagie.text.rtf.direct
Class RtfColorTableParser

    java.lang.Object
      com.lowagie.text.rtf.direct.RtfColorTableParser

    public class RtfColorTableParser

extends Object

The RtfColorTableParser handles the events generated by the RtfTokeniser while the RTF color table is being parsed.

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

Field Summary
`private int` | `blue` The blue component of the current color being parsed.
`private int` | `colorNr` The number of the current color being parsed.
`private int` | `green` The green component of the current color being parsed.
`private RtfImportHeader` | `importHeader` The RtfImportHeader to add color mappings to.
`private int` | `red` The red component of the current color being parsed.

Constructor Summary
`RtfColorTableParser(RtfImportHeader importHeader)` Constructs a new RtfColorTableParser.

Method Summary
`void` | `handleCtrlWord(String ctrlWord, int groupLevel)` Handle RTF control words.
`void` | `handleText(String text, int groupLevel)` Handle text content.
`static boolean` | `stringMatches(String text, String start)`

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 color mappings to.

### colorNr

    private int colorNr

  The number of the current color being parsed.

### red

    private int red

  The red component of the current color being parsed.

### green

    private int green

  The green component of the current color being parsed.

### blue

    private int blue

  The blue component of the current color being parsed.

Constructor Detail

### RtfColorTableParser

    public RtfColorTableParser(RtfImportHeader importHeader)

  Constructs a new RtfColorTableParser.

  Parameters:
    `importHeader` - The RtfImportHeader to add the color mappings to.

Method Detail

### stringMatches

    public static boolean stringMatches(String text,
                                        String start)

### handleCtrlWord

    public void handleCtrlWord(String ctrlWord,
                               int groupLevel)

  Handle RTF control words. The relevant control words are \red, \green and \blue each with a number specifying the value for that component.

  Parameters:
    `ctrlWord` - The control word to handle.
    `groupLevel` - Unused

### handleText

    public void handleText(String text,
                           int groupLevel)

  Handle text content. This is to find the end of each color definition, because they are separated by a semicolon (;).

  Parameters:
    `text` - The text to handle.
    `groupLevel` - Unused.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD