pt.tumba.parser.rtf
Class RTF2HTML.HTMLStateMachine

java.lang.Object
  extended by pt.tumba.parser.rtf.RTF2HTML.HTMLStateMachine
Enclosing class:
RTF2HTML

private class RTF2HTML.HTMLStateMachine
extends java.lang.Object

Description of the Class

Author:
bmartins

Field Summary
 boolean acceptFonts
          Description of the Field
private  int alignment
           
private  java.lang.String[] alignNames
           
private  boolean bold
           
private  java.awt.Color color
           
private  boolean firstLine
           
private  double firstLineIndent
           
private  java.lang.String fontName
           
private  boolean italic
           
private  double leftIndent
           
private  double oldLeftIndent
           
private  double oldRightIndent
           
private  double rightIndent
           
private  int size
           
private  boolean underline
           
 
Constructor Summary
RTF2HTML.HTMLStateMachine()
          Constructor for the HTMLStateMachine object
 
Method Summary
private  void closeIndentTable(java.lang.StringBuffer stringbuffer, double d, double d1)
          Description of the Method
private  void closeSubsetTags(java.lang.StringBuffer stringbuffer)
          Description of the Method
private  void closeTag(boolean flag, java.lang.String s, java.lang.StringBuffer stringbuffer)
          Description of the Method
private  void closeTag(java.awt.Color color1, java.lang.String s, java.lang.StringBuffer stringbuffer)
          Description of the Method
private  void closeTag(int i, int j, java.lang.String s, java.lang.StringBuffer stringbuffer)
          Description of the Method
private  void closeTag(java.lang.String s, java.lang.String s1, java.lang.StringBuffer stringbuffer)
          Description of the Method
 void closeTags(java.lang.StringBuffer stringbuffer)
          Description of the Method
 java.lang.String getSpaceTab(int i)
          Gets the spaceTab attribute of the HTMLStateMachine object
private  java.lang.String makeColorString(java.awt.Color color1)
          Description of the Method
private  void openIndentTable(java.lang.StringBuffer stringbuffer, double d, double d1)
          Description of the Method
 java.lang.String performFirstLineIndent(java.lang.String s2)
          Description of the Method
private  int updateAlignment(javax.swing.text.AttributeSet attributeset, int k, java.lang.StringBuffer stringbuffer)
          Description of the Method
private  boolean updateBoolean(javax.swing.text.AttributeSet attributeset, java.lang.Object obj, java.lang.String s, boolean flag2, java.lang.StringBuffer stringbuffer)
          Description of the Method
private  double updateDouble(javax.swing.text.AttributeSet attributeset, double d2, java.lang.Object obj)
          Description of the Method
private  java.awt.Color updateFontColor(javax.swing.text.AttributeSet attributeset, java.awt.Color color3, java.lang.StringBuffer stringbuffer)
          Description of the Method
private  java.lang.String updateFontName(javax.swing.text.AttributeSet attributeset, java.lang.String s2, java.lang.StringBuffer stringbuffer)
          Description of the Method
private  int updateFontSize(javax.swing.text.AttributeSet attributeset, int k, java.lang.StringBuffer stringbuffer)
          Description of the Method
 void updateState(javax.swing.text.AttributeSet attributeset, java.lang.StringBuffer stringbuffer, javax.swing.text.Element element)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alignNames

private java.lang.String[] alignNames

acceptFonts

public boolean acceptFonts
Description of the Field


fontName

private java.lang.String fontName

color

private java.awt.Color color

size

private int size

alignment

private int alignment

bold

private boolean bold

italic

private boolean italic

underline

private boolean underline

firstLineIndent

private double firstLineIndent

oldLeftIndent

private double oldLeftIndent

oldRightIndent

private double oldRightIndent

leftIndent

private double leftIndent

rightIndent

private double rightIndent

firstLine

private boolean firstLine
Constructor Detail

RTF2HTML.HTMLStateMachine

RTF2HTML.HTMLStateMachine()
Constructor for the HTMLStateMachine object

Method Detail

updateState

public void updateState(javax.swing.text.AttributeSet attributeset,
                        java.lang.StringBuffer stringbuffer,
                        javax.swing.text.Element element)
Description of the Method

Parameters:
attributeset - Description of the Parameter
stringbuffer - Description of the Parameter
element - Description of the Parameter

openIndentTable

private void openIndentTable(java.lang.StringBuffer stringbuffer,
                             double d,
                             double d1)
Description of the Method

Parameters:
stringbuffer - Description of the Parameter
d - Description of the Parameter
d1 - Description of the Parameter

closeIndentTable

private void closeIndentTable(java.lang.StringBuffer stringbuffer,
                              double d,
                              double d1)
Description of the Method

Parameters:
stringbuffer - Description of the Parameter
d - Description of the Parameter
d1 - Description of the Parameter

closeTags

public void closeTags(java.lang.StringBuffer stringbuffer)
Description of the Method

Parameters:
stringbuffer - Description of the Parameter

closeSubsetTags

private void closeSubsetTags(java.lang.StringBuffer stringbuffer)
Description of the Method

Parameters:
stringbuffer - Description of the Parameter

closeTag

private void closeTag(boolean flag,
                      java.lang.String s,
                      java.lang.StringBuffer stringbuffer)
Description of the Method

Parameters:
flag - Description of the Parameter
s - Description of the Parameter
stringbuffer - Description of the Parameter

closeTag

private void closeTag(java.awt.Color color1,
                      java.lang.String s,
                      java.lang.StringBuffer stringbuffer)
Description of the Method

Parameters:
color1 - Description of the Parameter
s - Description of the Parameter
stringbuffer - Description of the Parameter

closeTag

private void closeTag(java.lang.String s,
                      java.lang.String s1,
                      java.lang.StringBuffer stringbuffer)
Description of the Method

Parameters:
s - Description of the Parameter
s1 - Description of the Parameter
stringbuffer - Description of the Parameter

closeTag

private void closeTag(int i,
                      int j,
                      java.lang.String s,
                      java.lang.StringBuffer stringbuffer)
Description of the Method

Parameters:
i - Description of the Parameter
j - Description of the Parameter
s - Description of the Parameter
stringbuffer - Description of the Parameter

updateAlignment

private int updateAlignment(javax.swing.text.AttributeSet attributeset,
                            int k,
                            java.lang.StringBuffer stringbuffer)
Description of the Method

Parameters:
attributeset - Description of the Parameter
i - Description of the Parameter
stringbuffer - Description of the Parameter
Returns:
Description of the Return Value

updateFontColor

private java.awt.Color updateFontColor(javax.swing.text.AttributeSet attributeset,
                                       java.awt.Color color3,
                                       java.lang.StringBuffer stringbuffer)
Description of the Method

Parameters:
attributeset - Description of the Parameter
color1 - Description of the Parameter
stringbuffer - Description of the Parameter
Returns:
Description of the Return Value

updateFontName

private java.lang.String updateFontName(javax.swing.text.AttributeSet attributeset,
                                        java.lang.String s2,
                                        java.lang.StringBuffer stringbuffer)
Description of the Method

Parameters:
attributeset - Description of the Parameter
s - Description of the Parameter
stringbuffer - Description of the Parameter
Returns:
Description of the Return Value

updateDouble

private double updateDouble(javax.swing.text.AttributeSet attributeset,
                            double d2,
                            java.lang.Object obj)
Description of the Method

Parameters:
attributeset - Description of the Parameter
d - Description of the Parameter
obj - Description of the Parameter
Returns:
Description of the Return Value

updateFontSize

private int updateFontSize(javax.swing.text.AttributeSet attributeset,
                           int k,
                           java.lang.StringBuffer stringbuffer)
Description of the Method

Parameters:
attributeset - Description of the Parameter
i - Description of the Parameter
stringbuffer - Description of the Parameter
Returns:
Description of the Return Value

updateBoolean

private boolean updateBoolean(javax.swing.text.AttributeSet attributeset,
                              java.lang.Object obj,
                              java.lang.String s,
                              boolean flag2,
                              java.lang.StringBuffer stringbuffer)
Description of the Method

Parameters:
attributeset - Description of the Parameter
obj - Description of the Parameter
s - Description of the Parameter
flag - Description of the Parameter
stringbuffer - Description of the Parameter
Returns:
Description of the Return Value

makeColorString

private java.lang.String makeColorString(java.awt.Color color1)
Description of the Method

Parameters:
color1 - Description of the Parameter
Returns:
Description of the Return Value

performFirstLineIndent

public java.lang.String performFirstLineIndent(java.lang.String s2)
Description of the Method

Parameters:
s - Description of the Parameter
Returns:
Description of the Return Value

getSpaceTab

public java.lang.String getSpaceTab(int i)
Gets the spaceTab attribute of the HTMLStateMachine object

Parameters:
i - Description of the Parameter
Returns:
The spaceTab value