de.betabeans.scroogexhtml.converter
Class RTFReader

java.lang.Object
  extended by de.betabeans.scroogexhtml.converter.RTFReader
All Implemented Interfaces:
RTFProperties

public final class RTFReader
extends java.lang.Object
implements RTFProperties

A class which represents the RTF reader and its state.

Author:
Michael Justin

Field Summary
 
Fields inherited from interface de.betabeans.scroogexhtml.rtf.RTFProperties
DG_BODY, DG_BULLET, DG_COLORTABLE, DG_FONTTABLE, DG_IGNORE, FN_BIN, FN_CELL, FN_HEX, FN_LINEBREAK, FN_MIDDOT, FN_NBSP, FN_PAR, FN_PLAIN, FN_ROW, FN_SKIPDEST, FN_SKIPWORD, FN_TROWD, KT_CHAR, KT_DEST, KT_FFAM, KT_FNCT, KT_PROP, KT_STRING, NL_BODY, NL_BULLET, NL_NONE, PR_ANSICPG, PR_BCOL, PR_BLUE, PR_BOLD, PR_CENTER, PR_DEFF, PR_FCHARSET, PR_FCOL, PR_FIRSTIND, PR_FONTNR, PR_FROMAN, PR_FSCRIPT, PR_FSIZE, PR_FSWISS, PR_GREEN, PR_HCOL, PR_ITALIC, PR_JUSTIFY, PR_LANG, PR_LEFT, PR_LEFTIND, PR_NOSUB, PR_PARD, PR_PNLVL, PR_PNLVLCONT, PR_RED, PR_RIGHT, PR_RIGHTIND, PR_RTLCHAR, PR_RTLPAR, PR_STRIKE, PR_SUB, PR_SUPER, PR_UNDERLINE, PR_UNICODE, PR_UNISKIP
 
Constructor Summary
RTFReader(ScroogeXHTMLBase aconverter)
          create a new instance and assign the converter.
 
Method Summary
protected  java.lang.String getColor(int index)
           
protected  java.util.List getColorTable()
          Gets the colorTable attribute.
protected  byte getDestination()
          Gets the destination attribute.
protected  int getFontCharSet(int fontNr)
          Gets the charSet attribute of the given font table entry.
protected  java.lang.String getFontName(int fontNr)
          Get a font name for a given font table entry.
protected  FontTable getFontTable()
          Returns the font table value.
protected  byte getIntState()
          Gets the intState attribute.
protected  boolean popRTFState()
          Get the reader state back from the stack.
protected  void pushRTFState()
          Place the reader state on the stack.
 java.lang.String replaceFont(java.lang.String fontName)
          Replace a RTF header font by a user defined font name.
protected  void setDestination(byte d)
          Sets the destination attribute.
protected  void setDocumentGroup(byte dest)
          Set the document group.
protected  void setIntState(byte s)
          Sets the intState attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTFReader

public RTFReader(ScroogeXHTMLBase aconverter)
create a new instance and assign the converter.

Parameters:
aconverter - The converter (owner).
Method Detail

setIntState

protected void setIntState(byte s)
Sets the intState attribute.

Parameters:
s - The new intState value
See Also:
getIntState()

setDestination

protected void setDestination(byte d)
Sets the destination attribute.

Parameters:
d - The new destination value
See Also:
getDestination()

setDocumentGroup

protected void setDocumentGroup(byte dest)
Set the document group.

Parameters:
dest - The new documentGroup value

getIntState

protected byte getIntState()
Gets the intState attribute.

Returns:
The intState value
See Also:
setIntState(byte)

getColorTable

protected java.util.List getColorTable()
Gets the colorTable attribute.

Returns:
The colorTable value

getColor

protected java.lang.String getColor(int index)

getFontTable

protected FontTable getFontTable()
Returns the font table value.

Returns:
FontTable

getDestination

protected byte getDestination()
Gets the destination attribute.

Returns:
The destination value
See Also:
setDestination(byte)

getFontName

protected java.lang.String getFontName(int fontNr)
Get a font name for a given font table entry.

Parameters:
fontNr - Font number.
Returns:
The font name for this font table entry.

getFontCharSet

protected int getFontCharSet(int fontNr)
Gets the charSet attribute of the given font table entry.

Parameters:
fontNr - Font number.
Returns:
The fontCharSet attribute.

replaceFont

public java.lang.String replaceFont(java.lang.String fontName)
Replace a RTF header font by a user defined font name.

Parameters:
fontName - String
Returns:
the XHTML font name or an empty string

pushRTFState

protected void pushRTFState()
Place the reader state on the stack.


popRTFState

protected boolean popRTFState()
Get the reader state back from the stack.

Returns:
True if EOF reached.


Copyright (c) 1998-2006 BetaSoft Michael Justin. All Rights Reserved.