From: William Victor Mote Date: Tue, 29 Jul 2003 18:42:32 +0000 (+0000) Subject: rename StructureHandler to FOInputHandler to clarify that its subclasses are handling... X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1244 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ba6a64c2bc491b5037fd88eaa5a460953d165060;p=xmlgraphics-fop.git rename StructureHandler to FOInputHandler to clarify that its subclasses are handling data for output that is either structured or laid out git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196756 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/apps/Driver.java b/src/java/org/apache/fop/apps/Driver.java index 6fa34c588..431d4b24b 100644 --- a/src/java/org/apache/fop/apps/Driver.java +++ b/src/java/org/apache/fop/apps/Driver.java @@ -57,7 +57,7 @@ import java.awt.print.PrinterJob; import org.apache.fop.fo.ElementMapping; import org.apache.fop.fo.FOTreeBuilder; import org.apache.fop.fo.FOUserAgent; -import org.apache.fop.fo.StructureHandler; +import org.apache.fop.fo.FOInputHandler; import org.apache.fop.layoutmgr.LayoutHandler; import org.apache.fop.mif.MIFHandler; import org.apache.fop.render.Renderer; @@ -203,7 +203,7 @@ public class Driver implements LogEnabled { /** * the structure handler */ - private StructureHandler structHandler; + private FOInputHandler foInputHandler; /** * the source of the FO file @@ -432,7 +432,7 @@ public class Driver implements LogEnabled { setRenderer("org.apache.fop.render.txt.TXTRenderer()"); break; case RENDER_MIF: - //structHandler will be set later + //foInputHandler will be set later break; case RENDER_XML: setRenderer("org.apache.fop.render.xml.XMLRenderer"); @@ -441,7 +441,7 @@ public class Driver implements LogEnabled { setRenderer("org.apache.fop.render.svg.SVGRenderer"); break; case RENDER_RTF: - //structHandler will be set later + //foInputHandler will be set later break; default: throw new IllegalArgumentException("Unknown renderer type"); @@ -543,29 +543,29 @@ public class Driver implements LogEnabled { if (!isInitialized()) { initialize(); } - + if (rendererType != RENDER_PRINT && rendererType != RENDER_AWT) { validateOutputStream(); } - + // TODO: - do this stuff in a better way // PIJ: I guess the structure handler should be created by the renderer. if (rendererType == RENDER_MIF) { - structHandler = new MIFHandler(stream); + foInputHandler = new MIFHandler(stream); } else if (rendererType == RENDER_RTF) { - structHandler = new RTFHandler(stream); + foInputHandler = new RTFHandler(stream); } else { if (renderer == null) { throw new IllegalStateException( - "Renderer not set when using standard structHandler"); + "Renderer not set when using standard foInputHandler"); } - structHandler = new LayoutHandler(stream, renderer, true); + foInputHandler = new LayoutHandler(stream, renderer, true); } - structHandler.enableLogging(getLogger()); + foInputHandler.enableLogging(getLogger()); treeBuilder.setUserAgent(getUserAgent()); - treeBuilder.setStructHandler(structHandler); + treeBuilder.setFOInputHandler(foInputHandler); return treeBuilder; } diff --git a/src/java/org/apache/fop/extensions/Bookmarks.java b/src/java/org/apache/fop/extensions/Bookmarks.java index 6189c469a..ce56d0544 100644 --- a/src/java/org/apache/fop/extensions/Bookmarks.java +++ b/src/java/org/apache/fop/extensions/Bookmarks.java @@ -3,34 +3,34 @@ * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ - * + * * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: "This product includes software * developed by the Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "FOP" and "Apache Software Foundation" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * apache@apache.org. - * + * * 5. Products derived from this software may not be called "Apache", nor may * "Apache" appear in their name, without prior written permission of the * Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -42,12 +42,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ============================================================================ - * + * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by * James Tauber . For more information on the Apache * Software Foundation, please see . - */ + */ package org.apache.fop.extensions; import org.apache.fop.layoutmgr.LayoutHandler; @@ -108,8 +108,8 @@ public class Bookmarks extends ExtensionObj { data.addSubData(out.getData()); } // add data to area tree for resolving and handling - if (structHandler instanceof LayoutHandler) { - AreaTree at = ((LayoutHandler)structHandler).getAreaTree(); + if (foInputHandler instanceof LayoutHandler) { + AreaTree at = ((LayoutHandler)foInputHandler).getAreaTree(); at.addTreeExtension(data); data.setAreaTree(at); } diff --git a/src/java/org/apache/fop/fo/FOInputHandler.java b/src/java/org/apache/fop/fo/FOInputHandler.java new file mode 100644 index 000000000..a91ea10d6 --- /dev/null +++ b/src/java/org/apache/fop/fo/FOInputHandler.java @@ -0,0 +1,349 @@ +/* + * $Id$ + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "FOP" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * ============================================================================ + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation and was originally created by + * James Tauber . For more information on the Apache + * Software Foundation, please see . + */ +package org.apache.fop.fo; + +// Java +import java.util.Set; +import java.util.HashSet; + +// Avalon +import org.apache.avalon.framework.logger.AbstractLogEnabled; + +// FOP +import org.apache.fop.apps.FOPException; +import org.apache.fop.fo.flow.Block; +import org.apache.fop.fo.flow.ExternalGraphic; +import org.apache.fop.fo.flow.InstreamForeignObject; +import org.apache.fop.fo.flow.Leader; +import org.apache.fop.fo.flow.ListBlock; +import org.apache.fop.fo.flow.ListItem; +import org.apache.fop.fo.flow.Table; +import org.apache.fop.fo.flow.TableBody; +import org.apache.fop.fo.flow.TableCell; +import org.apache.fop.fo.flow.TableRow; +import org.apache.fop.fo.pagination.Flow; +import org.apache.fop.fo.pagination.PageSequence; +import org.apache.fop.layout.FontInfo; + +import org.xml.sax.SAXException; + +/** + * This class receives structure events from the FO Tree. + * Sub-classes can then implement various methods to handle + * the FO Tree when the SAX events occur. + */ +public abstract class FOInputHandler extends AbstractLogEnabled { + /** + * The current set of id's in the FO tree. + * This is used so we know if the FO tree contains duplicates. + */ + private Set idReferences = new HashSet(); + + /** + * Main constructor + */ + public FOInputHandler() { + } + + /** + * Retuns the set of ID references. + * @return the ID references + */ + public Set getIDReferences() { + return idReferences; + } + + /** + * Returns the FontInfo object associated with this FOInputHandler. + * @return the FontInof object + */ + public FontInfo getFontInfo() { + return null; + } + + /** + * This method is called to indicate the start of a new document run. + * @throws SAXException In case of a problem + */ + public abstract void startDocument() throws SAXException; + + /** + * This method is called to indicate the end of a document run. + * @throws SAXException In case of a problem + */ + public abstract void endDocument() throws SAXException; + + /** + * + * @param pageSeq PageSequence that is starting. + */ + public abstract void startPageSequence(PageSequence pageSeq); + + /** + * + * @param pageSeq PageSequence that is ending. + * @throws FOPException For errors encountered. + */ + public abstract void endPageSequence(PageSequence pageSeq) throws FOPException; + + /** + * + * @param fl Flow that is starting. + */ + public abstract void startFlow(Flow fl); + + /** + * + * @param fl Flow that is ending. + */ + public abstract void endFlow(Flow fl); + + /** + * + * @param bl Block that is starting. + */ + public abstract void startBlock(Block bl); + + /** + * + * @param bl Block that is ending. + */ + public abstract void endBlock(Block bl); + + + // Tables + /** + * + * @param tbl Table that is starting. + */ + public abstract void startTable(Table tbl); + + /** + * + * @param tbl Table that is ending. + */ + public abstract void endTable(Table tbl); + + /** + * + * @param th TableBody that is starting; + */ + public abstract void startHeader(TableBody th); + + /** + * + * @param th TableBody that is ending. + */ + public abstract void endHeader(TableBody th); + + /** + * + * @param tf TableFooter that is starting. + */ + public abstract void startFooter(TableBody tf); + + /** + * + * @param tf TableFooter that is ending. + */ + public abstract void endFooter(TableBody tf); + + /** + * + * @param tb TableBody that is starting. + */ + public abstract void startBody(TableBody tb); + + /** + * + * @param tb TableBody that is ending. + */ + public abstract void endBody(TableBody tb); + + /** + * + * @param tr TableRow that is starting. + */ + public abstract void startRow(TableRow tr); + + /** + * + * @param tr TableRow that is ending. + */ + public abstract void endRow(TableRow tr); + + /** + * + * @param tc TableCell that is starting. + */ + public abstract void startCell(TableCell tc); + + /** + * + * @param tc TableCell that is ending. + */ + public abstract void endCell(TableCell tc); + + + // Lists + /** + * + * @param lb ListBlock that is starting. + */ + public abstract void startList(ListBlock lb); + + /** + * + * @param lb ListBlock that is ending. + */ + public abstract void endList(ListBlock lb); + + /** + * + * @param li ListItem that is starting. + */ + public abstract void startListItem(ListItem li); + + /** + * + * @param li ListItem that is ending. + */ + public abstract void endListItem(ListItem li); + + /** + * Process start of a ListLabel. + */ + public abstract void startListLabel(); + + /** + * Process end of a ListLabel. + */ + public abstract void endListLabel(); + + /** + * Process start of a ListBody. + */ + public abstract void startListBody(); + + /** + * Process end of a ListBody. + */ + public abstract void endListBody(); + + // Static Regions + /** + * Process start of a Static. + */ + public abstract void startStatic(); + + /** + * Process end of a Static. + */ + public abstract void endStatic(); + + /** + * Process start of a Markup. + */ + public abstract void startMarkup(); + + /** + * Process end of a Markup. + */ + public abstract void endMarkup(); + + /** + * Process start of a Link. + */ + public abstract void startLink(); + + /** + * Process end of a Link. + */ + public abstract void endLink(); + + /** + * Process an ExternalGraphic. + * @param eg ExternalGraphic to process. + */ + public abstract void image(ExternalGraphic eg); + + /** + * Process a pageRef. + */ + public abstract void pageRef(); + + /** + * Process an InstreamForeignObject. + * @param ifo InstreamForeignObject to process. + */ + public abstract void foreignObject(InstreamForeignObject ifo); + + /** + * Process a footnote. + */ + public abstract void footnote(); + + /** + * Process a Leader. + * @param l Leader to process. + */ + public abstract void leader(Leader l); + + /** + * Process character data. + * @param data Array of characters to process. + * @param start Offset for characters to process. + * @param length Portion of array to process. + */ + public abstract void characters(char data[], int start, int length); + +} + diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java index 9f035eb55..60969030c 100644 --- a/src/java/org/apache/fop/fo/FONode.java +++ b/src/java/org/apache/fop/fo/FONode.java @@ -118,9 +118,9 @@ public abstract class FONode { /** * Sets the structure handler to send events to. - * @param st StructureHandler instance + * @param foih FOInputHandler instance */ - public void setStructHandler(StructureHandler st) { + public void setFOInputHandler(FOInputHandler foih) { } /** diff --git a/src/java/org/apache/fop/fo/FOText.java b/src/java/org/apache/fop/fo/FOText.java index c2d535961..da91da0b6 100644 --- a/src/java/org/apache/fop/fo/FOText.java +++ b/src/java/org/apache/fop/fo/FOText.java @@ -133,9 +133,9 @@ public class FOText extends FObj { textTransform(); } - public void setStructHandler(StructureHandler st) { - super.setStructHandler(st); - structHandler.characters(ca, start, length); + public void setFOInputHandler(FOInputHandler foih) { + super.setFOInputHandler(foih); + foInputHandler.characters(ca, start, length); } /** diff --git a/src/java/org/apache/fop/fo/FOTreeBuilder.java b/src/java/org/apache/fop/fo/FOTreeBuilder.java index d5a3c79ae..32dafaecf 100644 --- a/src/java/org/apache/fop/fo/FOTreeBuilder.java +++ b/src/java/org/apache/fop/fo/FOTreeBuilder.java @@ -111,7 +111,7 @@ public class FOTreeBuilder extends DefaultHandler { * The class that handles formatting and rendering to a stream * (mark-fop@inomial.com) */ - private StructureHandler structHandler; + private FOInputHandler foInputHandler; private FOUserAgent userAgent; @@ -140,10 +140,10 @@ public class FOTreeBuilder extends DefaultHandler { /** * Sets the structure handler to receive events. - * @param sh StructureHandler instance + * @param foih FOInputHandler instance */ - public void setStructHandler(StructureHandler sh) { - this.structHandler = sh; + public void setFOInputHandler(FOInputHandler foih) { + this.foInputHandler = foih; } /** @@ -237,7 +237,7 @@ public class FOTreeBuilder extends DefaultHandler { if (getLogger().isDebugEnabled()) { getLogger().debug("Building formatting object tree"); } - structHandler.startDocument(); + foInputHandler.startDocument(); } /** @@ -250,7 +250,7 @@ public class FOTreeBuilder extends DefaultHandler { if (getLogger().isDebugEnabled()) { getLogger().debug("Parsing of document complete"); } - structHandler.endDocument(); + foInputHandler.endDocument(); } /** @@ -272,7 +272,7 @@ public class FOTreeBuilder extends DefaultHandler { fobj.setUserAgent(userAgent); // set the structure handler so that appropriate // elements can signal structure events - fobj.setStructHandler(structHandler); + fobj.setFOInputHandler(foInputHandler); fobj.handleAttrs(attlist); } catch (FOPException e) { @@ -330,7 +330,7 @@ public class FOTreeBuilder extends DefaultHandler { public void reset() { currentFObj = null; rootFObj = null; - structHandler = null; + foInputHandler = null; } /** diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java index 5e54f782e..6f5199591 100644 --- a/src/java/org/apache/fop/fo/FObj.java +++ b/src/java/org/apache/fop/fo/FObj.java @@ -82,7 +82,7 @@ public class FObj extends FONode { * Structure handler used to notify structure events * such as start end element. */ - protected StructureHandler structHandler; + protected FOInputHandler foInputHandler; /** * Formatting properties for this fo element. @@ -256,8 +256,8 @@ public class FObj extends FONode { * * @param st the structure handler */ - public void setStructHandler(StructureHandler st) { - structHandler = st; + public void setFOInputHandler(FOInputHandler foih) { + foInputHandler = foih; } /** @@ -281,7 +281,7 @@ public class FObj extends FONode { if (prop != null) { String str = prop.getString(); if (str != null && !str.equals("")) { - Set idrefs = structHandler.getIDReferences(); + Set idrefs = foInputHandler.getIDReferences(); if (!idrefs.contains(str)) { id = str; idrefs.add(id); diff --git a/src/java/org/apache/fop/fo/FObjMixed.java b/src/java/org/apache/fop/fo/FObjMixed.java index 435207508..fc791d439 100644 --- a/src/java/org/apache/fop/fo/FObjMixed.java +++ b/src/java/org/apache/fop/fo/FObjMixed.java @@ -74,11 +74,11 @@ public class FObjMixed extends FObj { } /** - * @param st StructureHandler to set + * @param foih FOInputHandler to set */ - public void setStructHandler(StructureHandler st) { - super.setStructHandler(st); - fontInfo = st.getFontInfo(); + public void setFOInputHandler(FOInputHandler foih) { + super.setFOInputHandler(foih); + fontInfo = foih.getFontInfo(); } /** @@ -110,7 +110,7 @@ public class FObjMixed extends FObj { FOText ft = new FOText(data, start, length, textInfo, this); ft.setUserAgent(userAgent); - ft.setStructHandler(structHandler); + ft.setFOInputHandler(foInputHandler); addChild(ft); } diff --git a/src/java/org/apache/fop/fo/StructureHandler.java b/src/java/org/apache/fop/fo/StructureHandler.java deleted file mode 100644 index 1d5f5711d..000000000 --- a/src/java/org/apache/fop/fo/StructureHandler.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * $Id$ - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "FOP" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ============================================================================ - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation and was originally created by - * James Tauber . For more information on the Apache - * Software Foundation, please see . - */ -package org.apache.fop.fo; - -// Java -import java.util.Set; -import java.util.HashSet; - -// Avalon -import org.apache.avalon.framework.logger.AbstractLogEnabled; - -// FOP -import org.apache.fop.apps.FOPException; -import org.apache.fop.fo.flow.Block; -import org.apache.fop.fo.flow.ExternalGraphic; -import org.apache.fop.fo.flow.InstreamForeignObject; -import org.apache.fop.fo.flow.Leader; -import org.apache.fop.fo.flow.ListBlock; -import org.apache.fop.fo.flow.ListItem; -import org.apache.fop.fo.flow.Table; -import org.apache.fop.fo.flow.TableBody; -import org.apache.fop.fo.flow.TableCell; -import org.apache.fop.fo.flow.TableRow; -import org.apache.fop.fo.pagination.Flow; -import org.apache.fop.fo.pagination.PageSequence; -import org.apache.fop.layout.FontInfo; - -import org.xml.sax.SAXException; - -/** - * This class receives structure events from the FO Tree. - * Sub-classes can then implement various methods to handle - * the FO Tree when the SAX events occur. - */ -public abstract class StructureHandler extends AbstractLogEnabled { - /** - * The current set of id's in the FO tree. - * This is used so we know if the FO tree contains duplicates. - */ - private Set idReferences = new HashSet(); - - /** - * Main constructor - */ - public StructureHandler() { - } - - /** - * Retuns the set of ID references. - * @return the ID references - */ - public Set getIDReferences() { - return idReferences; - } - - /** - * Returns the FontInfo object associated with this StructureHandler. - * @return the FontInof object - */ - public FontInfo getFontInfo() { - return null; - } - - /** - * This method is called to indicate the start of a new document run. - * @throws SAXException In case of a problem - */ - public abstract void startDocument() throws SAXException; - - /** - * This method is called to indicate the end of a document run. - * @throws SAXException In case of a problem - */ - public abstract void endDocument() throws SAXException; - - /** - * - * @param pageSeq PageSequence that is starting. - */ - public abstract void startPageSequence(PageSequence pageSeq); - - /** - * - * @param pageSeq PageSequence that is ending. - * @throws FOPException For errors encountered. - */ - public abstract void endPageSequence(PageSequence pageSeq) throws FOPException; - - /** - * - * @param fl Flow that is starting. - */ - public abstract void startFlow(Flow fl); - - /** - * - * @param fl Flow that is ending. - */ - public abstract void endFlow(Flow fl); - - /** - * - * @param bl Block that is starting. - */ - public abstract void startBlock(Block bl); - - /** - * - * @param bl Block that is ending. - */ - public abstract void endBlock(Block bl); - - - // Tables - /** - * - * @param tbl Table that is starting. - */ - public abstract void startTable(Table tbl); - - /** - * - * @param tbl Table that is ending. - */ - public abstract void endTable(Table tbl); - - /** - * - * @param th TableBody that is starting; - */ - public abstract void startHeader(TableBody th); - - /** - * - * @param th TableBody that is ending. - */ - public abstract void endHeader(TableBody th); - - /** - * - * @param tf TableFooter that is starting. - */ - public abstract void startFooter(TableBody tf); - - /** - * - * @param tf TableFooter that is ending. - */ - public abstract void endFooter(TableBody tf); - - /** - * - * @param tb TableBody that is starting. - */ - public abstract void startBody(TableBody tb); - - /** - * - * @param tb TableBody that is ending. - */ - public abstract void endBody(TableBody tb); - - /** - * - * @param tr TableRow that is starting. - */ - public abstract void startRow(TableRow tr); - - /** - * - * @param tr TableRow that is ending. - */ - public abstract void endRow(TableRow tr); - - /** - * - * @param tc TableCell that is starting. - */ - public abstract void startCell(TableCell tc); - - /** - * - * @param tc TableCell that is ending. - */ - public abstract void endCell(TableCell tc); - - - // Lists - /** - * - * @param lb ListBlock that is starting. - */ - public abstract void startList(ListBlock lb); - - /** - * - * @param lb ListBlock that is ending. - */ - public abstract void endList(ListBlock lb); - - /** - * - * @param li ListItem that is starting. - */ - public abstract void startListItem(ListItem li); - - /** - * - * @param li ListItem that is ending. - */ - public abstract void endListItem(ListItem li); - - /** - * Process start of a ListLabel. - */ - public abstract void startListLabel(); - - /** - * Process end of a ListLabel. - */ - public abstract void endListLabel(); - - /** - * Process start of a ListBody. - */ - public abstract void startListBody(); - - /** - * Process end of a ListBody. - */ - public abstract void endListBody(); - - // Static Regions - /** - * Process start of a Static. - */ - public abstract void startStatic(); - - /** - * Process end of a Static. - */ - public abstract void endStatic(); - - /** - * Process start of a Markup. - */ - public abstract void startMarkup(); - - /** - * Process end of a Markup. - */ - public abstract void endMarkup(); - - /** - * Process start of a Link. - */ - public abstract void startLink(); - - /** - * Process end of a Link. - */ - public abstract void endLink(); - - /** - * Process an ExternalGraphic. - * @param eg ExternalGraphic to process. - */ - public abstract void image(ExternalGraphic eg); - - /** - * Process a pageRef. - */ - public abstract void pageRef(); - - /** - * Process an InstreamForeignObject. - * @param ifo InstreamForeignObject to process. - */ - public abstract void foreignObject(InstreamForeignObject ifo); - - /** - * Process a footnote. - */ - public abstract void footnote(); - - /** - * Process a Leader. - * @param l Leader to process. - */ - public abstract void leader(Leader l); - - /** - * Process character data. - * @param data Array of characters to process. - * @param start Offset for characters to process. - * @param length Portion of array to process. - */ - public abstract void characters(char data[], int start, int length); - -} - diff --git a/src/java/org/apache/fop/fo/flow/Block.java b/src/java/org/apache/fop/fo/flow/Block.java index 69b7ac413..563398c90 100644 --- a/src/java/org/apache/fop/fo/flow/Block.java +++ b/src/java/org/apache/fop/fo/flow/Block.java @@ -147,7 +147,7 @@ public class Block extends FObjMixed { setupID(); - structHandler.startBlock(this); + foInputHandler.startBlock(this); } private void setup() { @@ -286,7 +286,7 @@ public class Block extends FObjMixed { */ public void end() { handleWhiteSpace(); - structHandler.endBlock(this); + foInputHandler.endBlock(this); } private void handleWhiteSpace() { diff --git a/src/java/org/apache/fop/fo/flow/Leader.java b/src/java/org/apache/fop/fo/flow/Leader.java index bfce80be3..596ef299e 100644 --- a/src/java/org/apache/fop/fo/flow/Leader.java +++ b/src/java/org/apache/fop/fo/flow/Leader.java @@ -64,7 +64,7 @@ import org.apache.fop.datatypes.Length; import org.apache.fop.datatypes.PercentLength; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObjMixed; -import org.apache.fop.fo.StructureHandler; +import org.apache.fop.fo.FOInputHandler; import org.apache.fop.fo.properties.LeaderPattern; import org.apache.fop.layout.AccessibilityProps; import org.apache.fop.layout.AuralProps; @@ -213,11 +213,11 @@ public class Leader extends FObjMixed { } /** - * @param st StructureHandler to set + * @param foih FOInputHandler to set */ - public void setStructHandler(StructureHandler st) { - super.setStructHandler(st); - fontInfo = st.getFontInfo(); + public void setFOInputHandler(FOInputHandler foih) { + super.setFOInputHandler(foih); + fontInfo = foih.getFontInfo(); } private void setup() { diff --git a/src/java/org/apache/fop/fo/flow/PageNumber.java b/src/java/org/apache/fop/fo/flow/PageNumber.java index 3a5aaf085..fd56c5f58 100644 --- a/src/java/org/apache/fop/fo/flow/PageNumber.java +++ b/src/java/org/apache/fop/fo/flow/PageNumber.java @@ -73,7 +73,7 @@ import org.apache.fop.area.inline.Word; import org.apache.fop.datatypes.ColorType; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; -import org.apache.fop.fo.StructureHandler; +import org.apache.fop.fo.FOInputHandler; import org.apache.fop.area.Trait; /** @@ -100,11 +100,11 @@ public class PageNumber extends FObj { } /** - * @param st StructureHandler to be set + * @param foih FOInputHandler to be set */ - public void setStructHandler(StructureHandler st) { - super.setStructHandler(st); - fontInfo = st.getFontInfo(); + public void setFOInputHandler(FOInputHandler foih) { + super.setFOInputHandler(foih); + fontInfo = foih.getFontInfo(); } /** diff --git a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java index f2f213871..04b3844a5 100644 --- a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java +++ b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java @@ -63,7 +63,7 @@ import org.apache.fop.area.inline.Word; import org.apache.fop.datatypes.ColorType; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; -import org.apache.fop.fo.StructureHandler; +import org.apache.fop.fo.FOInputHandler; import org.apache.fop.layout.AccessibilityProps; import org.apache.fop.layout.AuralProps; import org.apache.fop.layout.BackgroundProps; @@ -113,9 +113,9 @@ public class PageNumberCitation extends FObj { /** * @param st StuctureHandler object to set */ - public void setStructHandler(StructureHandler st) { - super.setStructHandler(st); - fontInfo = st.getFontInfo(); + public void setFOInputHandler(FOInputHandler foih) { + super.setFOInputHandler(foih); + fontInfo = foih.getFontInfo(); } /** diff --git a/src/java/org/apache/fop/fo/pagination/Flow.java b/src/java/org/apache/fop/fo/pagination/Flow.java index 3bcaf5d35..7ad6637a7 100644 --- a/src/java/org/apache/fop/fo/pagination/Flow.java +++ b/src/java/org/apache/fop/fo/pagination/Flow.java @@ -127,14 +127,14 @@ public class Flow extends FObj { // Now done in addChild of page-sequence //pageSequence.addFlow(this); - structHandler.startFlow(this); + foInputHandler.startFlow(this); } /** * Tell the StructureRenderer that we are at the end of the flow. */ public void end() { - structHandler.endFlow(this); + foInputHandler.endFlow(this); } /** diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java index 892a67c8b..3014426c4 100644 --- a/src/java/org/apache/fop/fo/pagination/PageSequence.java +++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java @@ -337,7 +337,7 @@ public class PageSequence extends FObj { */ private void startStructuredPageSequence() { if (!sequenceStarted) { - structHandler.startPageSequence(this); + foInputHandler.startPageSequence(this); sequenceStarted = true; } } @@ -349,7 +349,7 @@ public class PageSequence extends FObj { */ public void end() { try { - this.structHandler.endPageSequence(this); + this.foInputHandler.endPageSequence(this); } catch (FOPException fopex) { getLogger().error("Error in PageSequence.end(): " + fopex.getMessage(), fopex); diff --git a/src/java/org/apache/fop/fo/pagination/Title.java b/src/java/org/apache/fop/fo/pagination/Title.java index 7389e0fce..85c39b993 100644 --- a/src/java/org/apache/fop/fo/pagination/Title.java +++ b/src/java/org/apache/fop/fo/pagination/Title.java @@ -120,7 +120,7 @@ public class Title extends FObjMixed { BackgroundProps bProps = propMgr.getBackgroundProps(); // Common Font Properties - FontState fontState = propMgr.getFontState(structHandler.getFontInfo()); + FontState fontState = propMgr.getFontState(foInputHandler.getFontInfo()); // Common Margin Properties-Inline MarginInlineProps mProps = propMgr.getMarginInlineProps(); diff --git a/src/java/org/apache/fop/layoutmgr/LayoutHandler.java b/src/java/org/apache/fop/layoutmgr/LayoutHandler.java index 4a2a89fec..b3e379fc2 100644 --- a/src/java/org/apache/fop/layoutmgr/LayoutHandler.java +++ b/src/java/org/apache/fop/layoutmgr/LayoutHandler.java @@ -65,7 +65,7 @@ import org.apache.fop.area.AreaTreeModel; import org.apache.fop.area.StorePagesModel; import org.apache.fop.area.Title; import org.apache.fop.area.TreeExt; -import org.apache.fop.fo.StructureHandler; +import org.apache.fop.fo.FOInputHandler; import org.apache.fop.fo.flow.Block; import org.apache.fop.fo.flow.ExternalGraphic; import org.apache.fop.fo.flow.InstreamForeignObject; @@ -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 StructureHandler { +public class LayoutHandler extends FOInputHandler { // TODO: Collecting of statistics should be configurable private final boolean collectStatistics = true; @@ -277,219 +277,219 @@ public class LayoutHandler extends StructureHandler { } /** - * @see org.apache.fop.fo.StructureHandler#startFlow(Flow) + * @see org.apache.fop.fo.FOInputHandler#startFlow(Flow) */ public void startFlow(Flow fl) { } /** - * @see org.apache.fop.fo.StructureHandler#endFlow(Flow) + * @see org.apache.fop.fo.FOInputHandler#endFlow(Flow) */ public void endFlow(Flow fl) { } /** - * @see org.apache.fop.fo.StructureHandler#startBlock(Block) + * @see org.apache.fop.fo.FOInputHandler#startBlock(Block) */ public void startBlock(Block bl) { } /** - * @see org.apache.fop.fo.StructureHandler#endBlock(Block) + * @see org.apache.fop.fo.FOInputHandler#endBlock(Block) */ public void endBlock(Block bl) { } /** - * @see org.apache.fop.fo.StructureHandler#startTable(Table) + * @see org.apache.fop.fo.FOInputHandler#startTable(Table) */ public void startTable(Table tbl) { } /** - * @see org.apache.fop.fo.StructureHandler#endTable(Table) + * @see org.apache.fop.fo.FOInputHandler#endTable(Table) */ public void endTable(Table tbl) { } /** - * @see org.apache.fop.fo.StructureHandler#startHeader(TableBody) + * @see org.apache.fop.fo.FOInputHandler#startHeader(TableBody) */ public void startHeader(TableBody th) { } /** - * @see org.apache.fop.fo.StructureHandler#endHeader(TableBody) + * @see org.apache.fop.fo.FOInputHandler#endHeader(TableBody) */ public void endHeader(TableBody th) { } /** - * @see org.apache.fop.fo.StructureHandler#startFooter(TableBody) + * @see org.apache.fop.fo.FOInputHandler#startFooter(TableBody) */ public void startFooter(TableBody tf) { } /** - * @see org.apache.fop.fo.StructureHandler#endFooter(TableBody) + * @see org.apache.fop.fo.FOInputHandler#endFooter(TableBody) */ public void endFooter(TableBody tf) { } /** - * @see org.apache.fop.fo.StructureHandler#startBody(TableBody) + * @see org.apache.fop.fo.FOInputHandler#startBody(TableBody) */ public void startBody(TableBody tb) { } /** - * @see org.apache.fop.fo.StructureHandler#endBody(TableBody) + * @see org.apache.fop.fo.FOInputHandler#endBody(TableBody) */ public void endBody(TableBody tb) { } /** - * @see org.apache.fop.fo.StructureHandler#startRow(TableRow) + * @see org.apache.fop.fo.FOInputHandler#startRow(TableRow) */ public void startRow(TableRow tr) { } /** - * @see org.apache.fop.fo.StructureHandler#endRow(TableRow) + * @see org.apache.fop.fo.FOInputHandler#endRow(TableRow) */ public void endRow(TableRow tr) { } /** - * @see org.apache.fop.fo.StructureHandler#startCell(TableCell) + * @see org.apache.fop.fo.FOInputHandler#startCell(TableCell) */ public void startCell(TableCell tc) { } /** - * @see org.apache.fop.fo.StructureHandler#endCell(TableCell) + * @see org.apache.fop.fo.FOInputHandler#endCell(TableCell) */ public void endCell(TableCell tc) { } // Lists /** - * @see org.apache.fop.fo.StructureHandler#startList(ListBlock) + * @see org.apache.fop.fo.FOInputHandler#startList(ListBlock) */ public void startList(ListBlock lb) { } /** - * @see org.apache.fop.fo.StructureHandler#endList(ListBlock) + * @see org.apache.fop.fo.FOInputHandler#endList(ListBlock) */ public void endList(ListBlock lb) { } /** - * @see org.apache.fop.fo.StructureHandler#startListItem(ListItem) + * @see org.apache.fop.fo.FOInputHandler#startListItem(ListItem) */ public void startListItem(ListItem li) { } /** - * @see org.apache.fop.fo.StructureHandler#endListItem(ListItem) + * @see org.apache.fop.fo.FOInputHandler#endListItem(ListItem) */ public void endListItem(ListItem li) { } /** - * @see org.apache.fop.fo.StructureHandler#startListLabel() + * @see org.apache.fop.fo.FOInputHandler#startListLabel() */ public void startListLabel() { } /** - * @see org.apache.fop.fo.StructureHandler#endListLabel() + * @see org.apache.fop.fo.FOInputHandler#endListLabel() */ public void endListLabel() { } /** - * @see org.apache.fop.fo.StructureHandler#startListBody() + * @see org.apache.fop.fo.FOInputHandler#startListBody() */ public void startListBody() { } /** - * @see org.apache.fop.fo.StructureHandler#endListBody() + * @see org.apache.fop.fo.FOInputHandler#endListBody() */ public void endListBody() { } // Static Regions /** - * @see org.apache.fop.fo.StructureHandler#startStatic() + * @see org.apache.fop.fo.FOInputHandler#startStatic() */ public void startStatic() { } /** - * @see org.apache.fop.fo.StructureHandler#endStatic() + * @see org.apache.fop.fo.FOInputHandler#endStatic() */ public void endStatic() { } /** - * @see org.apache.fop.fo.StructureHandler#startMarkup() + * @see org.apache.fop.fo.FOInputHandler#startMarkup() */ public void startMarkup() { } /** - * @see org.apache.fop.fo.StructureHandler#endMarkup() + * @see org.apache.fop.fo.FOInputHandler#endMarkup() */ public void endMarkup() { } /** - * @see org.apache.fop.fo.StructureHandler#startLink() + * @see org.apache.fop.fo.FOInputHandler#startLink() */ public void startLink() { } /** - * @see org.apache.fop.fo.StructureHandler#endLink() + * @see org.apache.fop.fo.FOInputHandler#endLink() */ public void endLink() { } /** - * @see org.apache.fop.fo.StructureHandler#image(ExternalGraphic) + * @see org.apache.fop.fo.FOInputHandler#image(ExternalGraphic) */ public void image(ExternalGraphic eg) { } /** - * @see org.apache.fop.fo.StructureHandler#pageRef() + * @see org.apache.fop.fo.FOInputHandler#pageRef() */ public void pageRef() { } /** - * @see org.apache.fop.fo.StructureHandler#foreignObject(InstreamForeignObject) + * @see org.apache.fop.fo.FOInputHandler#foreignObject(InstreamForeignObject) */ public void foreignObject(InstreamForeignObject ifo) { } /** - * @see org.apache.fop.fo.StructureHandler#footnote() + * @see org.apache.fop.fo.FOInputHandler#footnote() */ public void footnote() { } /** - * @see org.apache.fop.fo.StructureHandler#leader(Leader) + * @see org.apache.fop.fo.FOInputHandler#leader(Leader) */ public void leader(Leader l) { } /** - * @see org.apache.fop.fo.StructureHandler#characters(char[], int, int) + * @see org.apache.fop.fo.FOInputHandler#characters(char[], int, int) */ public void characters(char[] data, int start, int length) { } diff --git a/src/java/org/apache/fop/mif/MIFHandler.java b/src/java/org/apache/fop/mif/MIFHandler.java index c8f2132a9..fe5989c4d 100644 --- a/src/java/org/apache/fop/mif/MIFHandler.java +++ b/src/java/org/apache/fop/mif/MIFHandler.java @@ -58,7 +58,7 @@ import java.io.OutputStream; import org.xml.sax.SAXException; // FOP -import org.apache.fop.fo.StructureHandler; +import org.apache.fop.fo.FOInputHandler; import org.apache.fop.fo.flow.Block; import org.apache.fop.fo.pagination.Flow; import org.apache.fop.fo.pagination.PageSequence; @@ -84,7 +84,7 @@ import org.apache.fop.fo.flow.TableRow; * the FO Tree sent to this structure handler. * This builds an MIF file and writes it to the output. */ -public class MIFHandler extends StructureHandler { +public class MIFHandler extends FOInputHandler { /** the MIFFile instance */ protected MIFFile mifFile; @@ -107,14 +107,14 @@ public class MIFHandler extends StructureHandler { } /** - * @see org.apache.fop.fo.StructureHandler#getFontInfo() + * @see org.apache.fop.fo.FOInputHandler#getFontInfo() */ public FontInfo getFontInfo() { return fontInfo; } /** - * @see org.apache.fop.fo.StructureHandler#startDocument() + * @see org.apache.fop.fo.FOInputHandler#startDocument() */ public void startDocument() throws SAXException { mifFile = new MIFFile(); @@ -126,7 +126,7 @@ public class MIFHandler extends StructureHandler { } /** - * @see org.apache.fop.fo.StructureHandler#endDocument() + * @see org.apache.fop.fo.FOInputHandler#endDocument() */ public void endDocument() throws SAXException { // finish all open elements @@ -143,7 +143,7 @@ public class MIFHandler extends StructureHandler { * Start the page sequence. * This creates the pages in the MIF document that will be used * by the following flows and static areas. - * @see org.apache.fop.fo.StructureHandler + * @see org.apache.fop.fo.FOInputHandler */ public void startPageSequence(PageSequence pageSeq) { // get the layout master set @@ -190,14 +190,14 @@ public class MIFHandler extends StructureHandler { } /** - * @see org.apache.fop.fo.StructureHandler#endPageSequence(PageSequence) + * @see org.apache.fop.fo.FOInputHandler#endPageSequence(PageSequence) */ public void endPageSequence(PageSequence pageSeq) throws FOPException { } /** - * @see org.apache.fop.fo.StructureHandler#startFlow(Flow) + * @see org.apache.fop.fo.FOInputHandler#startFlow(Flow) */ public void startFlow(Flow fl) { // start text flow in body region @@ -205,7 +205,7 @@ public class MIFHandler extends StructureHandler { } /** - * @see org.apache.fop.fo.StructureHandler#endFlow(Flow) + * @see org.apache.fop.fo.FOInputHandler#endFlow(Flow) */ public void endFlow(Flow fl) { textFlow.finish(true); @@ -214,7 +214,7 @@ public class MIFHandler extends StructureHandler { } /** - * @see org.apache.fop.fo.StructureHandler#startBlock(Block) + * @see org.apache.fop.fo.FOInputHandler#startBlock(Block) */ public void startBlock(Block bl) { para = new MIFElement("Para"); @@ -223,7 +223,7 @@ public class MIFHandler extends StructureHandler { } /** - * @see org.apache.fop.fo.StructureHandler#endBlock(Block) + * @see org.apache.fop.fo.FOInputHandler#endBlock(Block) */ public void endBlock(Block bl) { para.finish(true); @@ -231,195 +231,195 @@ public class MIFHandler extends StructureHandler { } /** - * @see org.apache.fop.fo.StructureHandler#startTable(Table) + * @see org.apache.fop.fo.FOInputHandler#startTable(Table) */ public void startTable(Table tbl) { } /** - * @see org.apache.fop.fo.StructureHandler#endTable(Table) + * @see org.apache.fop.fo.FOInputHandler#endTable(Table) */ public void endTable(Table tbl) { } /** - * @see org.apache.fop.fo.StructureHandler#startHeader(TableBody) + * @see org.apache.fop.fo.FOInputHandler#startHeader(TableBody) */ public void startHeader(TableBody th) { } /** - * @see org.apache.fop.fo.StructureHandler#endHeader(TableBody) + * @see org.apache.fop.fo.FOInputHandler#endHeader(TableBody) */ public void endHeader(TableBody th) { } /** - * @see org.apache.fop.fo.StructureHandler#startFooter(TableBody) + * @see org.apache.fop.fo.FOInputHandler#startFooter(TableBody) */ public void startFooter(TableBody tf) { } /** - * @see org.apache.fop.fo.StructureHandler#endFooter(TableBody) + * @see org.apache.fop.fo.FOInputHandler#endFooter(TableBody) */ public void endFooter(TableBody tf) { } /** - * @see org.apache.fop.fo.StructureHandler#startBody(TableBody) + * @see org.apache.fop.fo.FOInputHandler#startBody(TableBody) */ public void startBody(TableBody tb) { } /** - * @see org.apache.fop.fo.StructureHandler#endBody(TableBody) + * @see org.apache.fop.fo.FOInputHandler#endBody(TableBody) */ public void endBody(TableBody tb) { } /** - * @see org.apache.fop.fo.StructureHandler#startRow(TableRow) + * @see org.apache.fop.fo.FOInputHandler#startRow(TableRow) */ public void startRow(TableRow tr) { } /** - * @see org.apache.fop.fo.StructureHandler#endRow(TableRow) + * @see org.apache.fop.fo.FOInputHandler#endRow(TableRow) */ public void endRow(TableRow tr) { } /** - * @see org.apache.fop.fo.StructureHandler#startCell(TableCell) + * @see org.apache.fop.fo.FOInputHandler#startCell(TableCell) */ public void startCell(TableCell tc) { } /** - * @see org.apache.fop.fo.StructureHandler#endCell(TableCell) + * @see org.apache.fop.fo.FOInputHandler#endCell(TableCell) */ public void endCell(TableCell tc) { } // Lists /** - * @see org.apache.fop.fo.StructureHandler#startList(ListBlock) + * @see org.apache.fop.fo.FOInputHandler#startList(ListBlock) */ public void startList(ListBlock lb) { } /** - * @see org.apache.fop.fo.StructureHandler#endList(ListBlock) + * @see org.apache.fop.fo.FOInputHandler#endList(ListBlock) */ public void endList(ListBlock lb) { } /** - * @see org.apache.fop.fo.StructureHandler#startListItem(ListItem) + * @see org.apache.fop.fo.FOInputHandler#startListItem(ListItem) */ public void startListItem(ListItem li) { } /** - * @see org.apache.fop.fo.StructureHandler#endListItem(ListItem) + * @see org.apache.fop.fo.FOInputHandler#endListItem(ListItem) */ public void endListItem(ListItem li) { } /** - * @see org.apache.fop.fo.StructureHandler#startListLabel() + * @see org.apache.fop.fo.FOInputHandler#startListLabel() */ public void startListLabel() { } /** - * @see org.apache.fop.fo.StructureHandler#endListLabel() + * @see org.apache.fop.fo.FOInputHandler#endListLabel() */ public void endListLabel() { } /** - * @see org.apache.fop.fo.StructureHandler#startListBody() + * @see org.apache.fop.fo.FOInputHandler#startListBody() */ public void startListBody() { } /** - * @see org.apache.fop.fo.StructureHandler#endListBody() + * @see org.apache.fop.fo.FOInputHandler#endListBody() */ public void endListBody() { } // Static Regions /** - * @see org.apache.fop.fo.StructureHandler#startStatic() + * @see org.apache.fop.fo.FOInputHandler#startStatic() */ public void startStatic() { } /** - * @see org.apache.fop.fo.StructureHandler#endStatic() + * @see org.apache.fop.fo.FOInputHandler#endStatic() */ public void endStatic() { } /** - * @see org.apache.fop.fo.StructureHandler#startMarkup() + * @see org.apache.fop.fo.FOInputHandler#startMarkup() */ public void startMarkup() { } /** - * @see org.apache.fop.fo.StructureHandler#endMarkup() + * @see org.apache.fop.fo.FOInputHandler#endMarkup() */ public void endMarkup() { } /** - * @see org.apache.fop.fo.StructureHandler#startLink() + * @see org.apache.fop.fo.FOInputHandler#startLink() */ public void startLink() { } /** - * @see org.apache.fop.fo.StructureHandler#endLink() + * @see org.apache.fop.fo.FOInputHandler#endLink() */ public void endLink() { } /** - * @see org.apache.fop.fo.StructureHandler#image(ExternalGraphic) + * @see org.apache.fop.fo.FOInputHandler#image(ExternalGraphic) */ public void image(ExternalGraphic eg) { } /** - * @see org.apache.fop.fo.StructureHandler#pageRef() + * @see org.apache.fop.fo.FOInputHandler#pageRef() */ public void pageRef() { } /** - * @see org.apache.fop.fo.StructureHandler#foreignObject(InstreamForeignObject) + * @see org.apache.fop.fo.FOInputHandler#foreignObject(InstreamForeignObject) */ public void foreignObject(InstreamForeignObject ifo) { } /** - * @see org.apache.fop.fo.StructureHandler#footnote() + * @see org.apache.fop.fo.FOInputHandler#footnote() */ public void footnote() { } /** - * @see org.apache.fop.fo.StructureHandler#leader(Leader) + * @see org.apache.fop.fo.FOInputHandler#leader(Leader) */ public void leader(Leader l) { } /** - * @see org.apache.fop.fo.StructureHandler#characters(char[], int, int) + * @see org.apache.fop.fo.FOInputHandler#characters(char[], int, int) */ public void characters(char data[], int start, int length) { if (para != null) { diff --git a/src/java/org/apache/fop/rtf/renderer/RTFHandler.java b/src/java/org/apache/fop/rtf/renderer/RTFHandler.java index 03b5346fb..2f8c7309e 100644 --- a/src/java/org/apache/fop/rtf/renderer/RTFHandler.java +++ b/src/java/org/apache/fop/rtf/renderer/RTFHandler.java @@ -57,7 +57,7 @@ import java.io.OutputStreamWriter; import org.apache.fop.apps.FOPException; import org.apache.fop.datatypes.ColorType; -import org.apache.fop.fo.StructureHandler; +import org.apache.fop.fo.FOInputHandler; import org.apache.fop.fo.flow.Block; import org.apache.fop.fo.flow.ExternalGraphic; import org.apache.fop.fo.flow.InstreamForeignObject; @@ -87,7 +87,7 @@ import org.xml.sax.SAXException; * * @author bdelacretaz@apache.org */ -public class RTFHandler extends StructureHandler { +public class RTFHandler extends FOInputHandler { private FontInfo fontInfo = new FontInfo(); private RtfFile rtfFile; @@ -118,14 +118,14 @@ public class RTFHandler extends StructureHandler { } /** - * @see org.apache.fop.fo.StructureHandler#getFontInfo() + * @see org.apache.fop.fo.FOInputHandler#getFontInfo() */ public FontInfo getFontInfo() { return this.fontInfo; } /** - * @see org.apache.fop.fo.StructureHandler#startDocument() + * @see org.apache.fop.fo.FOInputHandler#startDocument() */ public void startDocument() throws SAXException { // FIXME sections should be created @@ -133,25 +133,25 @@ public class RTFHandler extends StructureHandler { rtfFile = new RtfFile(new OutputStreamWriter(os)); docArea = rtfFile.startDocumentArea(); } catch (IOException ioe) { - // FIXME could we throw Exception in all StructureHandler events? + // FIXME could we throw Exception in all FOInputHandler events? throw new SAXException("IOException: " + ioe); } } /** - * @see org.apache.fop.fo.StructureHandler#endDocument() + * @see org.apache.fop.fo.FOInputHandler#endDocument() */ public void endDocument() throws SAXException { try { rtfFile.flush(); } catch (IOException ioe) { - // FIXME could we throw Exception in all StructureHandler events? + // FIXME could we throw Exception in all FOInputHandler events? throw new SAXException("IOException: " + ioe); } } /** - * @see org.apache.fop.fo.StructureHandler + * @see org.apache.fop.fo.FOInputHandler */ public void startPageSequence(PageSequence pageSeq) { try { @@ -161,31 +161,31 @@ public class RTFHandler extends StructureHandler { warned = true; } } catch (IOException ioe) { - // FIXME could we throw Exception in all StructureHandler events? + // FIXME could we throw Exception in all FOInputHandler events? throw new Error("IOException: " + ioe); } } /** - * @see org.apache.fop.fo.StructureHandler#endPageSequence(PageSequence) + * @see org.apache.fop.fo.FOInputHandler#endPageSequence(PageSequence) */ public void endPageSequence(PageSequence pageSeq) throws FOPException { } /** - * @see org.apache.fop.fo.StructureHandler#startFlow(Flow) + * @see org.apache.fop.fo.FOInputHandler#startFlow(Flow) */ public void startFlow(Flow fl) { } /** - * @see org.apache.fop.fo.StructureHandler#endFlow(Flow) + * @see org.apache.fop.fo.FOInputHandler#endFlow(Flow) */ public void endFlow(Flow fl) { } /** - * @see org.apache.fop.fo.StructureHandler#startBlock(Block) + * @see org.apache.fop.fo.FOInputHandler#startBlock(Block) */ public void startBlock(Block bl) { try { @@ -194,214 +194,214 @@ public class RTFHandler extends StructureHandler { attrBlockBackgroundColor(bl, rtfAttr); para = sect.newParagraph(rtfAttr); } catch (IOException ioe) { - // FIXME could we throw Exception in all StructureHandler events? + // FIXME could we throw Exception in all FOInputHandler events? throw new Error("IOException: " + ioe); } } /** - * @see org.apache.fop.fo.StructureHandler#endBlock(Block) + * @see org.apache.fop.fo.FOInputHandler#endBlock(Block) */ public void endBlock(Block bl) { } /** - * @see org.apache.fop.fo.StructureHandler#startTable(Table) + * @see org.apache.fop.fo.FOInputHandler#startTable(Table) */ public void startTable(Table tbl) { } /** - * @see org.apache.fop.fo.StructureHandler#endTable(Table) + * @see org.apache.fop.fo.FOInputHandler#endTable(Table) */ public void endTable(Table tbl) { } /** - * @see org.apache.fop.fo.StructureHandler#startHeader(TableBody) + * @see org.apache.fop.fo.FOInputHandler#startHeader(TableBody) */ public void startHeader(TableBody th) { } /** - * @see org.apache.fop.fo.StructureHandler#endHeader(TableBody) + * @see org.apache.fop.fo.FOInputHandler#endHeader(TableBody) */ public void endHeader(TableBody th) { } /** - * @see org.apache.fop.fo.StructureHandler#startFooter(TableBody) + * @see org.apache.fop.fo.FOInputHandler#startFooter(TableBody) */ public void startFooter(TableBody tf) { } /** - * @see org.apache.fop.fo.StructureHandler#endFooter(TableBody) + * @see org.apache.fop.fo.FOInputHandler#endFooter(TableBody) */ public void endFooter(TableBody tf) { } /** - * @see org.apache.fop.fo.StructureHandler#startBody(TableBody) + * @see org.apache.fop.fo.FOInputHandler#startBody(TableBody) */ public void startBody(TableBody tb) { } /** - * @see org.apache.fop.fo.StructureHandler#endBody(TableBody) + * @see org.apache.fop.fo.FOInputHandler#endBody(TableBody) */ public void endBody(TableBody tb) { } /** - * @see org.apache.fop.fo.StructureHandler#startRow(TableRow) + * @see org.apache.fop.fo.FOInputHandler#startRow(TableRow) */ public void startRow(TableRow tr) { } /** - * @see org.apache.fop.fo.StructureHandler#endRow(TableRow) + * @see org.apache.fop.fo.FOInputHandler#endRow(TableRow) */ public void endRow(TableRow tr) { } /** - * @see org.apache.fop.fo.StructureHandler#startCell(TableCell) + * @see org.apache.fop.fo.FOInputHandler#startCell(TableCell) */ public void startCell(TableCell tc) { } /** - * @see org.apache.fop.fo.StructureHandler#endCell(TableCell) + * @see org.apache.fop.fo.FOInputHandler#endCell(TableCell) */ public void endCell(TableCell tc) { } // Lists /** - * @see org.apache.fop.fo.StructureHandler#startList(ListBlock) + * @see org.apache.fop.fo.FOInputHandler#startList(ListBlock) */ public void startList(ListBlock lb) { } /** - * @see org.apache.fop.fo.StructureHandler#endList(ListBlock) + * @see org.apache.fop.fo.FOInputHandler#endList(ListBlock) */ public void endList(ListBlock lb) { } /** - * @see org.apache.fop.fo.StructureHandler#startListItem(ListItem) + * @see org.apache.fop.fo.FOInputHandler#startListItem(ListItem) */ public void startListItem(ListItem li) { } /** - * @see org.apache.fop.fo.StructureHandler#endListItem(ListItem) + * @see org.apache.fop.fo.FOInputHandler#endListItem(ListItem) */ public void endListItem(ListItem li) { } /** - * @see org.apache.fop.fo.StructureHandler#startListLabel() + * @see org.apache.fop.fo.FOInputHandler#startListLabel() */ public void startListLabel() { } /** - * @see org.apache.fop.fo.StructureHandler#endListLabel() + * @see org.apache.fop.fo.FOInputHandler#endListLabel() */ public void endListLabel() { } /** - * @see org.apache.fop.fo.StructureHandler#startListBody() + * @see org.apache.fop.fo.FOInputHandler#startListBody() */ public void startListBody() { } /** - * @see org.apache.fop.fo.StructureHandler#endListBody() + * @see org.apache.fop.fo.FOInputHandler#endListBody() */ public void endListBody() { } // Static Regions /** - * @see org.apache.fop.fo.StructureHandler#startStatic() + * @see org.apache.fop.fo.FOInputHandler#startStatic() */ public void startStatic() { } /** - * @see org.apache.fop.fo.StructureHandler#endStatic() + * @see org.apache.fop.fo.FOInputHandler#endStatic() */ public void endStatic() { } /** - * @see org.apache.fop.fo.StructureHandler#startMarkup() + * @see org.apache.fop.fo.FOInputHandler#startMarkup() */ public void startMarkup() { } /** - * @see org.apache.fop.fo.StructureHandler#endMarkup() + * @see org.apache.fop.fo.FOInputHandler#endMarkup() */ public void endMarkup() { } /** - * @see org.apache.fop.fo.StructureHandler#startLink() + * @see org.apache.fop.fo.FOInputHandler#startLink() */ public void startLink() { } /** - * @see org.apache.fop.fo.StructureHandler#endLink() + * @see org.apache.fop.fo.FOInputHandler#endLink() */ public void endLink() { } /** - * @see org.apache.fop.fo.StructureHandler#image(ExternalGraphic) + * @see org.apache.fop.fo.FOInputHandler#image(ExternalGraphic) */ public void image(ExternalGraphic eg) { } /** - * @see org.apache.fop.fo.StructureHandler#pageRef() + * @see org.apache.fop.fo.FOInputHandler#pageRef() */ public void pageRef() { } /** - * @see org.apache.fop.fo.StructureHandler#foreignObject(InstreamForeignObject) + * @see org.apache.fop.fo.FOInputHandler#foreignObject(InstreamForeignObject) */ public void foreignObject(InstreamForeignObject ifo) { } /** - * @see org.apache.fop.fo.StructureHandler#footnote() + * @see org.apache.fop.fo.FOInputHandler#footnote() */ public void footnote() { } /** - * @see org.apache.fop.fo.StructureHandler#leader(Leader) + * @see org.apache.fop.fo.FOInputHandler#leader(Leader) */ public void leader(Leader l) { } /** - * @see org.apache.fop.fo.StructureHandler#characters(char[], int, int) + * @see org.apache.fop.fo.FOInputHandler#characters(char[], int, int) */ public void characters(char data[], int start, int length) { try { para.newText(new String(data, start, length)); } catch (IOException ioe) { - // FIXME could we throw Exception in all StructureHandler events? + // FIXME could we throw Exception in all FOInputHandler events? throw new Error("IOException: " + ioe); } }