Configuration
Configuration is based on the Configurable
and Configuration interfaces of
avalon:
org.apache.avalon.framework.configuration.Configurable
org.apache.avalon.framework.configuration.Configuration
A type that implements Configurable can be
configured by calling its method configure(Configuration
configuration), where the argument is the
Configuration object that holds the user
configuration settings. It can also be configured by calling the
static method ContainerUtil.configure(object, cfg)
of the class
ContainerUtil = org.apache.avalon.framework.container.ContainerUtil
This method checks if object implements
Configurable. If not, no configuration is
attempted.
The following classes implement Configurable:
render.AbstractRenderer and its
subclasses (all renderers). Only
render.pdf.PDFRenderer and
render.ps.PSRenderer have meaningful
implementations of the configure method. The
command line module configures each renderer from the user
configuration file with the subconfiguration
renderers/renderer[@mime=$mimetype].
svg.PDFTranscoder
svg.PDFDocumentGraphics2D. This class
is configured by svg.PDFTranscoder via
ContainerUtil.configure(graphics, this.cfg).
In addition render.ps.AbstractPSTranscoder
has a member Configuration cfg. It configures
graphics via ContainerUtil.configure(graphics,
this.cfg). The graphics are of type
render.ps.AbstractPSDocumentGraphics2D, which does
not implement Configurable, so that no
configuration takes place.
render.pdf.PDFRenderer and
svg.PDFDocumentGraphics2D both call
fonts.FontSetup.buildFontListFromConfiguration(cfg)
and
pdf.PDFFilterList.buildFilterMapFromConfiguration(cfg).
Configuration info is used by:
fonts.FontSetup.buildFontListFromConfiguration(cfg). It
uses fonts/font/font-triplet from the renderer
subconfiguration.
pdf.PDFFilterList.buildFilterMapFromConfiguration(cfg). It
uses filterList/value from the renderer
subconfiguration
render.ps.PSRenderer.configure(cfg). It
uses auto-rotate-landscape as a Boolean.