diff options
author | Glen Mazza <gmazza@apache.org> | 2004-03-21 12:38:56 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-03-21 12:38:56 +0000 |
commit | 2e9f66f684d857e38a8d2ea5dd987936b79ba454 (patch) | |
tree | 0359467f64b80b06d9f6dd466eb405a589ef7e62 /src/java/org/apache/fop/svg | |
parent | e99b480d3fd6b6f608e749c9e002c3bac7ae63a6 (diff) | |
download | xmlgraphics-fop-2e9f66f684d857e38a8d2ea5dd987936b79ba454.tar.gz xmlgraphics-fop-2e9f66f684d857e38a8d2ea5dd987936b79ba454.zip |
1.) Removed xsl file for property generation (no longer used, due to
Finn's work.) Removed build.xml entry.
2.) Disconnected the FOUserAgent from the SVGUserAgent. This will make
the SVGUserAgent more portable although at the cost of a more complex
constructor.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197467 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/svg')
-rw-r--r-- | src/java/org/apache/fop/svg/SVGUserAgent.java | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/svg/SVGUserAgent.java b/src/java/org/apache/fop/svg/SVGUserAgent.java index 7d5e80f83..06aaee0f6 100644 --- a/src/java/org/apache/fop/svg/SVGUserAgent.java +++ b/src/java/org/apache/fop/svg/SVGUserAgent.java @@ -18,7 +18,7 @@ package org.apache.fop.svg; -import org.apache.fop.apps.FOUserAgent; +import org.apache.fop.apps.FOFileHandler; import org.apache.batik.bridge.UserAgentAdapter; import org.apache.avalon.framework.logger.Logger; @@ -34,16 +34,20 @@ import java.awt.Dimension; */ public class SVGUserAgent extends UserAgentAdapter { private AffineTransform currentTransform = null; - private FOUserAgent userAgent; + private Logger logger; + private float pixelUnitToMillimeter = 0.0f; /** * Creates a new SVGUserAgent. - * @param ua the FO user agent + * @param log an Avalon logging instance + * @param pixelUnitToMM The pixel to millimeter conversion factor + * currently in effect * @param at the current transform */ - public SVGUserAgent(FOUserAgent ua, AffineTransform at) { + public SVGUserAgent(Logger log, float pixelUnitToMM, AffineTransform at) { + logger = log; + pixelUnitToMillimeter = pixelUnitToMM; currentTransform = at; - userAgent = ua; } /** @@ -51,7 +55,7 @@ public class SVGUserAgent extends UserAgentAdapter { * @return Logger the logger */ protected final Logger getLogger() { - return this.userAgent.getLogger(); + return logger; } /** @@ -59,7 +63,7 @@ public class SVGUserAgent extends UserAgentAdapter { * @param message the message to display */ public void displayError(String message) { - getLogger().error(message); + logger.error(message); } /** @@ -67,7 +71,7 @@ public class SVGUserAgent extends UserAgentAdapter { * @param ex the exception to display */ public void displayError(Exception ex) { - getLogger().error("SVG Error" + ex.getMessage(), ex); + logger.error("SVG Error" + ex.getMessage(), ex); } /** @@ -76,7 +80,7 @@ public class SVGUserAgent extends UserAgentAdapter { * @param message the message to display */ public void displayMessage(String message) { - getLogger().info(message); + logger.info(message); } /** @@ -84,7 +88,7 @@ public class SVGUserAgent extends UserAgentAdapter { * @param message the message to display */ public void showAlert(String message) { - getLogger().warn(message); + logger.warn(message); } /** @@ -92,7 +96,7 @@ public class SVGUserAgent extends UserAgentAdapter { * @return the pixel unit to millimeter conversion factor */ public float getPixelUnitToMillimeter() { - return userAgent.getPixelUnitToMillimeter(); + return pixelUnitToMillimeter; } /** @@ -124,7 +128,7 @@ public class SVGUserAgent extends UserAgentAdapter { * @return the XML parser class name */ public String getXMLParserClassName() { - return org.apache.fop.apps.FOFileHandler.getParserClassName(); + return FOFileHandler.getParserClassName(); } /** |