Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jfor.jfor.rtflib.rtfdoc
Class RtfStyleSheetTable  view RtfStyleSheetTable download RtfStyleSheetTable.java

java.lang.Object
  extended byorg.jfor.jfor.rtflib.rtfdoc.RtfStyleSheetTable

public class RtfStyleSheetTable
extends java.lang.Object

Singelton of the RTF style sheet table. This class belongs to the tag processing.


Field Summary
private  java.util.Hashtable attrTable
          Used, style attributes to this vector
private  java.lang.String defaultStyleName
          Default style
private static RtfStyleSheetTable instance
          Singelton instance
private  java.util.Vector nameTable
          Used, style names to this vector
private static java.lang.String STANDARD_STYLE
          Standard style name
private static int startIndex
          Start index number for the stylesheet reference table
static int STATUS_DEFAULT
          Status value for attribute handling, if the stylesheet not found and the stylesheet set to the default stylesheet
static int STATUS_OK
          OK status value for attribute handling
private  java.util.Hashtable styles
          Table of styles
 
Constructor Summary
private RtfStyleSheetTable()
          Constructor.
 
Method Summary
 void addStyle(java.lang.String name, RtfAttributes attrs)
          Adds a style to the table.
 int addStyleToAttributes(java.lang.String name, RtfAttributes attr)
          Adds the style attributes to the given attributes.
 java.lang.String getDefaultStyleName()
          Gets the name of the default style.
static RtfStyleSheetTable getInstance()
          Singelton.
private  java.lang.String getRtfStyleReference(java.lang.String name)
          Gets the rtf style reference from the table.
 void setDefaultStyle(java.lang.String styleName)
          Sets the default style.
 void writeStyleSheet(RtfHeader header)
          Writes the rtf style sheet table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startIndex

private static int startIndex
Start index number for the stylesheet reference table


STATUS_OK

public static int STATUS_OK
OK status value for attribute handling


STATUS_DEFAULT

public static int STATUS_DEFAULT
Status value for attribute handling, if the stylesheet not found and the stylesheet set to the default stylesheet


STANDARD_STYLE

private static java.lang.String STANDARD_STYLE
Standard style name


instance

private static RtfStyleSheetTable instance
Singelton instance


styles

private java.util.Hashtable styles
Table of styles


attrTable

private java.util.Hashtable attrTable
Used, style attributes to this vector


nameTable

private java.util.Vector nameTable
Used, style names to this vector


defaultStyleName

private java.lang.String defaultStyleName
Default style

Constructor Detail

RtfStyleSheetTable

private RtfStyleSheetTable()
Constructor.

Method Detail

getInstance

public static RtfStyleSheetTable getInstance()
Singelton.


setDefaultStyle

public void setDefaultStyle(java.lang.String styleName)
Sets the default style.


getDefaultStyleName

public java.lang.String getDefaultStyleName()
Gets the name of the default style.


addStyle

public void addStyle(java.lang.String name,
                     RtfAttributes attrs)
Adds a style to the table.


addStyleToAttributes

public int addStyleToAttributes(java.lang.String name,
                                RtfAttributes attr)
Adds the style attributes to the given attributes.


writeStyleSheet

public void writeStyleSheet(RtfHeader header)
                     throws java.io.IOException
Writes the rtf style sheet table.


getRtfStyleReference

private java.lang.String getRtfStyleReference(java.lang.String name)
Gets the rtf style reference from the table.