org.jfree.layouting.input.swing.converter

Class DocumentConverter

public class DocumentConverter extends Object implements Converter

This class handles convertions of document properties to css style attributes.
Field Summary
static StringPAGE_RULE_TYPE
static StringRTF_GUTTERWIDTH
The inner margin of a page (near the spine) of a book.
static StringRTF_LANDSCAPE
Page orientation in which the page width exceeds the page length.
static StringRTF_MARGINBOTTOM
static StringRTF_MARGINLEFT
static StringRTF_MARGINRIGHT
static StringRTF_MARGINTOP
static StringRTF_PAGEHEIGHT
static StringRTF_PAGEWIDTH
Constructor Summary
DocumentConverter()
Method Summary
ConverterAttributeSetconvertToCSS(Object key, Object value, ConverterAttributeSet cssAttr, Element context)
Converts a style key and a style value to a CSS compatible style key and style value.

Field Detail

PAGE_RULE_TYPE

public static final String PAGE_RULE_TYPE

RTF_GUTTERWIDTH

public static final String RTF_GUTTERWIDTH
The inner margin of a page (near the spine) of a book.

RTF_LANDSCAPE

public static final String RTF_LANDSCAPE
Page orientation in which the page width exceeds the page length. The opposit is portrait.

RTF_MARGINBOTTOM

public static final String RTF_MARGINBOTTOM

RTF_MARGINLEFT

public static final String RTF_MARGINLEFT

RTF_MARGINRIGHT

public static final String RTF_MARGINRIGHT

RTF_MARGINTOP

public static final String RTF_MARGINTOP

RTF_PAGEHEIGHT

public static final String RTF_PAGEHEIGHT

RTF_PAGEWIDTH

public static final String RTF_PAGEWIDTH

Constructor Detail

DocumentConverter

public DocumentConverter()

Method Detail

convertToCSS

public ConverterAttributeSet convertToCSS(Object key, Object value, ConverterAttributeSet cssAttr, Element context)
Converts a style key and a style value to a CSS compatible style key and style value. A conversion can result in more than one key and value.

Parameters: key The style key to convert. value The style value to convert. cssAttr The current converted CSS attributes for the current element. context The current Element.

Returns: The conversion result or null if no converstion has been done.