From 04f2cc10bbd34c282e91dfde8df99bbc8b80c1ac Mon Sep 17 00:00:00 2001 From: William Victor Mote Date: Tue, 29 Jul 2003 19:08:23 +0000 Subject: [PATCH] move layoutmgr/LayoutHandler to fo/FOTreeHandler: 1. It has nothing to do with layout (its name was presumably chosen to reflect that it is used for formats where layout will be needed). 2. It is used for building FO trees. Part of the purpose here is to make the FO tree building process as self-contained as possible within the fo package. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196758 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/apps/Driver.java | 4 ++-- src/java/org/apache/fop/extensions/Bookmarks.java | 6 +++--- .../{layoutmgr/LayoutHandler.java => fo/FOTreeHandler.java} | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) rename src/java/org/apache/fop/{layoutmgr/LayoutHandler.java => fo/FOTreeHandler.java} (99%) diff --git a/src/java/org/apache/fop/apps/Driver.java b/src/java/org/apache/fop/apps/Driver.java index 431d4b24b..f45f50f46 100644 --- a/src/java/org/apache/fop/apps/Driver.java +++ b/src/java/org/apache/fop/apps/Driver.java @@ -58,7 +58,7 @@ import org.apache.fop.fo.ElementMapping; import org.apache.fop.fo.FOTreeBuilder; import org.apache.fop.fo.FOUserAgent; import org.apache.fop.fo.FOInputHandler; -import org.apache.fop.layoutmgr.LayoutHandler; +import org.apache.fop.fo.FOTreeHandler; import org.apache.fop.mif.MIFHandler; import org.apache.fop.render.Renderer; import org.apache.fop.render.awt.AWTPrintRenderer; @@ -559,7 +559,7 @@ public class Driver implements LogEnabled { throw new IllegalStateException( "Renderer not set when using standard foInputHandler"); } - foInputHandler = new LayoutHandler(stream, renderer, true); + foInputHandler = new FOTreeHandler(stream, renderer, true); } foInputHandler.enableLogging(getLogger()); diff --git a/src/java/org/apache/fop/extensions/Bookmarks.java b/src/java/org/apache/fop/extensions/Bookmarks.java index ce56d0544..4fb6a6b86 100644 --- a/src/java/org/apache/fop/extensions/Bookmarks.java +++ b/src/java/org/apache/fop/extensions/Bookmarks.java @@ -50,7 +50,7 @@ */ package org.apache.fop.extensions; -import org.apache.fop.layoutmgr.LayoutHandler; +import org.apache.fop.fo.FOTreeHandler; import org.apache.fop.fo.FONode; import org.apache.fop.area.AreaTree; @@ -108,8 +108,8 @@ public class Bookmarks extends ExtensionObj { data.addSubData(out.getData()); } // add data to area tree for resolving and handling - if (foInputHandler instanceof LayoutHandler) { - AreaTree at = ((LayoutHandler)foInputHandler).getAreaTree(); + if (foInputHandler instanceof FOTreeHandler) { + AreaTree at = ((FOTreeHandler)foInputHandler).getAreaTree(); at.addTreeExtension(data); data.setAreaTree(at); } diff --git a/src/java/org/apache/fop/layoutmgr/LayoutHandler.java b/src/java/org/apache/fop/fo/FOTreeHandler.java similarity index 99% rename from src/java/org/apache/fop/layoutmgr/LayoutHandler.java rename to src/java/org/apache/fop/fo/FOTreeHandler.java index b3e379fc2..e9d88ceed 100644 --- a/src/java/org/apache/fop/layoutmgr/LayoutHandler.java +++ b/src/java/org/apache/fop/fo/FOTreeHandler.java @@ -48,7 +48,7 @@ * James Tauber . For more information on the Apache * Software Foundation, please see . */ -package org.apache.fop.layoutmgr; +package org.apache.fop.fo; // Java import java.io.IOException; @@ -86,7 +86,7 @@ import org.apache.fop.render.Renderer; * This initiates layout processes and corresponding * rendering processes such as start/end. */ -public class LayoutHandler extends FOInputHandler { +public class FOTreeHandler extends FOInputHandler { // TODO: Collecting of statistics should be configurable private final boolean collectStatistics = true; @@ -144,7 +144,7 @@ public class LayoutHandler extends FOInputHandler { * @param store if true then use the store pages model and keep the * area tree in memory */ - public LayoutHandler(OutputStream outputStream, Renderer renderer, + public FOTreeHandler(OutputStream outputStream, Renderer renderer, boolean store) { if (collectStatistics) { runtime = Runtime.getRuntime(); -- 2.39.5