org.apache.fop.render.rtf.rtflib.rtfdoc

## Class RtfStyleSheetTable

- java.lang.Object
- - org.apache.fop.render.rtf.rtflib.rtfdoc.RtfStyleSheetTable

-     public final class RtfStyleSheetTable
      extends java.lang.Object

  Singelton of the RTF style sheet table. This class belongs to the jfor:stylesheet tag processing. This work was originally authored by Andreas Putz

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `void` | `setDefaultStyle(java.lang.String styleName)` Sets the default style.
    `void` | `writeStyleSheet(org.apache.fop.render.rtf.rtflib.rtfdoc.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

    - #### STATUS_OK

          public static final int STATUS_OK

      OK status value for attribute handling
      See Also:
        Constant Field Values

    - #### STATUS_DEFAULT

          public static final int STATUS_DEFAULT

      Status value for attribute handling, if the stylesheet not found and the stylesheet set to the default stylesheet
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getInstance

          public static RtfStyleSheetTable getInstance()

      Singelton.
      Returns:
        The instance of RtfStyleSheetTable

    - #### setDefaultStyle

          public void setDefaultStyle(java.lang.String styleName)

      Sets the default style.
      Parameters:
        `styleName` - Name of the default style, defined in the stylesheet

    - #### getDefaultStyleName

          public java.lang.String getDefaultStyleName()

      Gets the name of the default style.
      Returns:
        Default style name.

    - #### addStyle

          public void addStyle(java.lang.String name,
                      RtfAttributes attrs)

      Adds a style to the table.
      Parameters:
        `name` - Name of style to add
        `attrs` - Rtf attributes which defines the style

    - #### addStyleToAttributes

          public int addStyleToAttributes(java.lang.String name,
                                 RtfAttributes attr)

      Adds the style attributes to the given attributes.
      Parameters:
        `name` - Name of style, of which the attributes will copied to attr
        `attr` - Default rtf attributes
      Returns:
        Status value

    - #### writeStyleSheet

          public void writeStyleSheet(org.apache.fop.render.rtf.rtflib.rtfdoc.RtfHeader header)
                               throws java.io.IOException

      Writes the rtf style sheet table.
      Parameters:
        `header` - Rtf header is the parent
      Throws:
        `java.io.IOException` - On write error

Copyright 1999-2019 The Apache Software Foundation. All Rights Reserved.