de.betabeans.scroogexhtml
Class ScroogeXHTMLDocument

java.lang.Object
  |
  +--de.betabeans.scroogexhtml.ScroogeXHTMLDocument

public class ScroogeXHTMLDocument
extends java.lang.Object

ScroogeXHTML uses a ScroogeXHTMLDocument to store the complete content of the RTF file before it is converted.
Each ScroogeXHTMLDocument is a sequence of ScroogeXHTMLDocParagraph objects, which are sequences of ScroogeXHTMLDocText objects.

See Also:
ScroogeXHTMLDocParagraph, ScroogeXHTMLDocText

Field Summary
protected  ScroogeXHTMLBase converter
           
 
Constructor Summary
ScroogeXHTMLDocument(ScroogeXHTMLBase converter)
          Constructor for the ScroogeXHTMLDocument object
 
Method Summary
protected  void add()
          add a paragraph to the document
 void add(char c)
          add a character to the current text object of the current paragraph
 void add(java.lang.String text)
          add a string to the current text object of the current paragraph
protected  java.lang.StringBuffer buildHtml()
          convert the document to XHTML
protected  ScroogeXHTMLDocParagraph nextPar(ScroogeXHTMLDocParagraph paragraph)
          find the following paragraph in the document
protected  ScroogeXHTMLDocParagraph prevPar(ScroogeXHTMLDocParagraph paragraph)
          find the previous paragraph in the document
protected  void setParProperties(int al, boolean pn, int nl, int li, int ri, int fi)
          set the current paragraph properties
protected  void setTextProperties(boolean b, boolean i, boolean u, boolean strike, java.lang.String f, java.lang.String fgcolor, java.lang.String bgcolor, java.lang.String hlcolor, int s, boolean subScript, boolean superScript)
          set the current text element properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

converter

protected ScroogeXHTMLBase converter
Constructor Detail

ScroogeXHTMLDocument

public ScroogeXHTMLDocument(ScroogeXHTMLBase converter)
Constructor for the ScroogeXHTMLDocument object
Parameters:
owner - Description of Parameter
Method Detail

add

public void add(java.lang.String text)
add a string to the current text object of the current paragraph
Parameters:
text - the String to be added

add

public void add(char c)
add a character to the current text object of the current paragraph
Parameters:
c - the character to be added

prevPar

protected ScroogeXHTMLDocParagraph prevPar(ScroogeXHTMLDocParagraph paragraph)
find the previous paragraph in the document
Parameters:
paragraph - the current paragraph
Returns:
the previous paragraph or null

nextPar

protected ScroogeXHTMLDocParagraph nextPar(ScroogeXHTMLDocParagraph paragraph)
find the following paragraph in the document
Parameters:
paragraph - the current paragraph
Returns:
the next paragraph or null

setParProperties

protected void setParProperties(int al,
                                boolean pn,
                                int nl,
                                int li,
                                int ri,
                                int fi)
set the current paragraph properties
Parameters:
a - alignment
b - bullet
i -  

setTextProperties

protected void setTextProperties(boolean b,
                                 boolean i,
                                 boolean u,
                                 boolean strike,
                                 java.lang.String f,
                                 java.lang.String fgcolor,
                                 java.lang.String bgcolor,
                                 java.lang.String hlcolor,
                                 int s,
                                 boolean subScript,
                                 boolean superScript)
set the current text element properties
Parameters:
b -  
i -  
u -  
strike -  
f -  
fgcolor -  
bgcolor -  
s -  
subScript -  
superScript -  

buildHtml

protected java.lang.StringBuffer buildHtml()
convert the document to XHTML
Returns:
Description of the Returned Value

add

protected void add()
add a paragraph to the document