diff options
author | Mehdi Houshmand <mehdi@apache.org> | 2012-05-31 08:33:36 +0000 |
---|---|---|
committer | Mehdi Houshmand <mehdi@apache.org> | 2012-05-31 08:33:36 +0000 |
commit | eccd73c523bdda6a0634e9849141492f7b14ad63 (patch) | |
tree | 72f06ec1481249bdd639083ee646b3c3fd4be7a4 /src/java/org/apache/fop/render/java2d/Java2DRendererConfigurator.java | |
parent | 05761b1df54ada8a762bfa879dc0e3455d33d828 (diff) | |
download | xmlgraphics-fop-eccd73c523bdda6a0634e9849141492f7b14ad63.tar.gz xmlgraphics-fop-eccd73c523bdda6a0634e9849141492f7b14ad63.zip |
Started unifying URI resolution mechanism, redesigned configuration system and created flexible config testing
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_URI_Unification@1344594 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/java2d/Java2DRendererConfigurator.java')
-rw-r--r-- | src/java/org/apache/fop/render/java2d/Java2DRendererConfigurator.java | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/java/org/apache/fop/render/java2d/Java2DRendererConfigurator.java b/src/java/org/apache/fop/render/java2d/Java2DRendererConfigurator.java index a12cb3898..6b09ff740 100644 --- a/src/java/org/apache/fop/render/java2d/Java2DRendererConfigurator.java +++ b/src/java/org/apache/fop/render/java2d/Java2DRendererConfigurator.java @@ -19,24 +19,23 @@ package org.apache.fop.render.java2d; -import org.apache.avalon.framework.configuration.Configuration; - import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; -import org.apache.fop.render.PrintRendererConfigurator; import org.apache.fop.render.Renderer; +import org.apache.fop.render.RendererConfig.RendererConfigParser; +import org.apache.fop.render.adobe.AdobeRendererConfigurator; /** * Configurerer for Java 2D renderer */ -public class Java2DRendererConfigurator extends PrintRendererConfigurator { +public class Java2DRendererConfigurator extends AdobeRendererConfigurator { /** * Default constructor * @param userAgent user agent */ - public Java2DRendererConfigurator(FOUserAgent userAgent) { - super(userAgent); + public Java2DRendererConfigurator(FOUserAgent userAgent, RendererConfigParser rendererConfigParser) { + super(userAgent, rendererConfigParser); } /** @@ -45,15 +44,14 @@ public class Java2DRendererConfigurator extends PrintRendererConfigurator { * @throws FOPException fop exception */ public void configure(Renderer renderer) throws FOPException { - Configuration cfg = super.getRendererConfig(renderer); - if (cfg != null) { - Java2DRenderer java2dRenderer = (Java2DRenderer)renderer; - String value = cfg.getChild( - Java2DRenderer.JAVA2D_TRANSPARENT_PAGE_BACKGROUND, true).getValue(null); - if (value != null) { - java2dRenderer.setTransparentPageBackground("true".equalsIgnoreCase(value)); + Java2DRendererConfig config = (Java2DRendererConfig) getRendererConfig(renderer); + if (config != null) { + Java2DRenderer java2dRenderer = (Java2DRenderer) renderer; + // new Java2DRendererConfigParser(renderer.getMimeType())); + if (config.isPageBackgroundTransparent() != null) { + java2dRenderer.setTransparentPageBackground(config.isPageBackgroundTransparent()); } + super.configure(renderer); } - super.configure(renderer); } } |