From: Peter Bernard West Date: Tue, 25 May 2004 15:20:15 +0000 (+0000) Subject: Removed unnecessary fields and accessors. X-Git-Tag: Defoe_export~146 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6f155bea974188340d252472d62c40103d6a52ed;p=xmlgraphics-fop.git Removed unnecessary fields and accessors. Changed signature to include FontData. Provided FontData accessor. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197623 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/FOTree.java b/src/java/org/apache/fop/fo/FOTree.java index 058cab5df..b7c7fcd86 100644 --- a/src/java/org/apache/fop/fo/FOTree.java +++ b/src/java/org/apache/fop/fo/FOTree.java @@ -18,9 +18,9 @@ */ package org.apache.fop.fo; -import java.awt.Graphics2D; -import java.awt.GraphicsEnvironment; -import java.awt.font.FontRenderContext; +//import java.awt.Graphics2D; +//import java.awt.GraphicsEnvironment; +//import java.awt.font.FontRenderContext; import java.util.logging.Level; import java.util.logging.Logger; @@ -30,6 +30,7 @@ import org.apache.fop.datatypes.Numeric; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.expr.PropertyParser; +import org.apache.fop.render.FontData; import org.apache.fop.xml.XmlEvent; import org.apache.fop.xml.XmlEventReader; @@ -71,12 +72,23 @@ public class FOTree extends Tree implements Runnable { */ protected PropertyParser exprParser; + /** The FOP logger */ protected Logger log = Logger.getLogger(Fop.fopPackage); + /** The font database from the renderer */ + protected FontData fontData; + /** + * Gets the renderer's font database + * @return the renderer's font database + */ + public FontData getFontData() { + return fontData; + } /** * @param xmlevents the buffer from which XmlEvents from the * parser are read. + * @param fontData the font database from the renderer */ - public FOTree(XmlEventReader xmlevents) + public FOTree(XmlEventReader xmlevents, FontData fontData) throws PropertyException { super(); @@ -85,6 +97,7 @@ public class FOTree extends Tree implements Runnable { errorDump = true; } this.xmlevents = xmlevents; + this.fontData = fontData; exprParser = new PropertyParser(this); // Initialize the FontSize first. Any lengths defined in ems must @@ -98,39 +111,6 @@ public class FOTree extends Tree implements Runnable { // Set up the rendering context } - /** The graphics environment in which FOP is operating */ - private GraphicsEnvironment gEnv = null; - /** - * Gets the FOP GraphicsEnvironment - * @return the environment - */ - protected GraphicsEnvironment getGraphicsEnvironment() { - return gEnv; - } - /** The object which controls drawing and text rendering in the page spread - */ - private Graphics2D g2D = null; - /** - * Gets the Graphics2D rendering and drawing control object - * for area layout - * @return - */ - public Graphics2D getGraphics2D() { - return g2D; - } - /** The FontRenderContext object garnered from the - * Graphics2D control object for area layout - */ - private FontRenderContext frcontext = null; - /** - * Gets the FontRenderContext derived from the graphics - * control object - * @return - */ - public FontRenderContext getFontRenderContext() { - return frcontext; - } - /** * Parser thread notifies itself to FO tree builder by this call. The * purpose of this notification is to allow the FO tree builder thread