Class RtfStyleSheetTable
java.lang.Object
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfStyleSheetTable
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
Modifier and TypeFieldDescriptionstatic final int
Status value for attribute handling, if the stylesheet not found and the stylesheet set to the default stylesheetstatic final int
OK status value for attribute handling -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStyle
(String name, RtfAttributes attrs) Adds a style to the table.int
addStyleToAttributes
(String name, RtfAttributes attr) Adds the style attributes to the given attributes.Gets the name of the default style.static RtfStyleSheetTable
Singelton.void
setDefaultStyle
(String styleName) Sets the default style.void
writeStyleSheet
(org.apache.fop.render.rtf.rtflib.rtfdoc.RtfHeader header) Writes the rtf style sheet table.
-
Field Details
-
STATUS_OK
public static final int STATUS_OKOK status value for attribute handling- See Also:
-
STATUS_DEFAULT
public static final int STATUS_DEFAULTStatus value for attribute handling, if the stylesheet not found and the stylesheet set to the default stylesheet- See Also:
-
-
Method Details
-
getInstance
Singelton.- Returns:
- The instance of RtfStyleSheetTable
-
setDefaultStyle
Sets the default style.- Parameters:
styleName
- Name of the default style, defined in the stylesheet
-
getDefaultStyleName
Gets the name of the default style.- Returns:
- Default style name.
-
addStyle
Adds a style to the table.- Parameters:
name
- Name of style to addattrs
- Rtf attributes which defines the style
-
addStyleToAttributes
Adds the style attributes to the given attributes.- Parameters:
name
- Name of style, of which the attributes will copied to attrattr
- Default rtf attributes- Returns:
- Status value
-
writeStyleSheet
public void writeStyleSheet(org.apache.fop.render.rtf.rtflib.rtfdoc.RtfHeader header) throws IOException Writes the rtf style sheet table.- Parameters:
header
- Rtf header is the parent- Throws:
IOException
- On write error
-