org.jfree.layouting.input.swing.converter

Class DocumentConverter

Implemented Interfaces:
Converter

public class DocumentConverter
extends java.lang.Object
implements Converter

This class handles convertions of document properties to css style attributes.

Field Summary

static String
PAGE_RULE_TYPE
static String
RTF_GUTTERWIDTH
The inner margin of a page (near the spine) of a book.
static String
RTF_LANDSCAPE
Page orientation in which the page width exceeds the page length.
static String
RTF_MARGINBOTTOM
static String
RTF_MARGINLEFT
static String
RTF_MARGINRIGHT
static String
RTF_MARGINTOP
static String
RTF_PAGEHEIGHT
static String
RTF_PAGEWIDTH

Constructor Summary

DocumentConverter()

Method Summary

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.

Field Details

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 Details

DocumentConverter

public DocumentConverter()

Method Details

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.
Specified by:
convertToCSS in interface Converter
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.