org.apache.fop.render

Class PrintRendererConfigurator

Implemented Interfaces:
RendererConfigurator
Known Direct Subclasses:
AFPRendererConfigurator, Java2DRendererConfigurator, PCLRendererConfigurator, PDFRendererConfigurator, PSRendererConfigurator, TIFFRendererConfigurator, TXTRendererConfigurator

public class PrintRendererConfigurator
extends AbstractRendererConfigurator
implements RendererConfigurator

Base Print renderer configurator (mostly handles font configuration)

Field Summary

protected static Log
log
logger instance

Fields inherited from class org.apache.fop.render.AbstractRendererConfigurator

log, userAgent

Constructor Summary

PrintRendererConfigurator(FOUserAgent userAgent)
Default constructor

Method Summary

static List
buildFontListFromConfiguration(Configuration cfg, String fontBaseURL, FontResolver fontResolver, boolean strict, FontCache fontCache)
Builds a list of EmbedFontInfo objects for use with the setup() method.
void
configure(Renderer renderer)
Builds a list of EmbedFontInfo objects for use with the setup() method.
static EmbedFontInfo
getFontInfoFromConfiguration(Configuration fontCfg, FontResolver fontResolver, boolean strict, FontCache fontCache)
Returns a font info from a font node Configuration definition

Methods inherited from class org.apache.fop.render.AbstractRendererConfigurator

getRendererConfig

Field Details

log

protected static Log log
logger instance

Constructor Details

PrintRendererConfigurator

public PrintRendererConfigurator(FOUserAgent userAgent)
Default constructor
Parameters:
userAgent - user agent

Method Details

buildFontListFromConfiguration

public static List buildFontListFromConfiguration(Configuration cfg,
                                                  String fontBaseURL,
                                                  FontResolver fontResolver,
                                                  boolean strict,
                                                  FontCache fontCache)
            throws FOPException
Builds a list of EmbedFontInfo objects for use with the setup() method.
Parameters:
cfg - Configuration object
fontBaseURL - the base URL to resolve relative font URLs with
fontResolver - the FontResolver to use
strict - true if an Exception should be thrown if an error is found.
fontCache - the font cache (or null if it is disabled)
Returns:
a List of EmbedFontInfo objects.
Throws:
FOPException - If an error occurs while processing the configuration

configure

public void configure(Renderer renderer)
            throws FOPException
Builds a list of EmbedFontInfo objects for use with the setup() method.
Specified by:
configure in interface RendererConfigurator
Parameters:
renderer - print renderer
Throws:
FOPException - if something's wrong with the config data

getFontInfoFromConfiguration

public static EmbedFontInfo getFontInfoFromConfiguration(Configuration fontCfg,
                                                         FontResolver fontResolver,
                                                         boolean strict,
                                                         FontCache fontCache)
            throws FOPException
Returns a font info from a font node Configuration definition
Parameters:
fontCfg - Configuration object (font node)
fontResolver - font resolver used to resolve font
strict - validate configuration strictly
fontCache - the font cache (or null if it is disabled)
Returns:
font info
Throws:
FOPException - if something's wrong with the config data

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