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

Class RtfStyleSheetTable


public class RtfStyleSheetTable
extends java.lang.Object

Singelton of the RTF style sheet table. This class belongs to the tag processing.
Author:
Andreas Putz

Field Summary

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

void
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.
String
getDefaultStyleName()
Gets the name of the default style.
static RtfStyleSheetTable
getInstance()
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_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
Field Value:
1

STATUS_OK

public static final int STATUS_OK
OK status value for attribute handling
Field Value:
0

Method Details

addStyle

public void addStyle(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(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

getDefaultStyleName

public String getDefaultStyleName()
Gets the name of the default style.
Returns:
Default style name.

getInstance

public static RtfStyleSheetTable getInstance()
Singelton.
Returns:
The instance of RtfStyleSheetTable

setDefaultStyle

public void setDefaultStyle(String styleName)
Sets the default style.
Parameters:
styleName - Name of the default style, defined in the stylesheet

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

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