cvs commit: xml-fop/src/java/org/apache/fop/render AbstractRenderer.java
pbwest 2004/04/15 00:45:08 Modified:src/java/org/apache/fop/render Tag: FOP_0-20-0_Alt-Design AbstractRenderer.java Log: Generate and return a GraphicsEnvironment Revision ChangesPath No revision No revision 1.24.2.4 +5 -507xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java Index: AbstractRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v retrieving revision 1.24.2.3 retrieving revision 1.24.2.4 diff -u -r1.24.2.3 -r1.24.2.4 --- AbstractRenderer.java 16 Mar 2004 12:17:53 - 1.24.2.3 +++ AbstractRenderer.java 15 Apr 2004 07:45:08 - 1.24.2.4 @@ -18,6 +18,7 @@ package org.apache.fop.render; +import java.awt.GraphicsEnvironment; import java.io.OutputStream; import java.util.HashMap; import java.util.Map; @@ -47,27 +48,6 @@ /** renderer configuration */ protected Map options = new HashMap(); -///** block progression position */ -//protected int currentBPPosition = 0; -// -///** inline progression position */ -//protected int currentIPPosition = 0; -// -///** current inline progression position in block */ -//protected int currentBlockIPPosition = 0; -// -///** -// * the block progression position of the containing block used for -// * absolutely positioned blocks -// */ -//protected int containingBPPosition = 0; -// -///** -// * the inline progression position of the containing block used for -// * absolutely positioned blocks -// */ -//protected int containingIPPosition = 0; - protected Logger log = Logger.getLogger(Fop.fopPackage); @@ -80,15 +60,14 @@ public void run() { } +public GraphicsEnvironment getGraphicsEnvironment() { +return null; +} + public synchronized void setOutputStream(OutputStream output) { this.output = output; } -///** -// * @see org.apache.fop.render.Renderer -// */ -//public abstract void setupFontInfo(FOTreeControl foTreeControl); - /** @see org.apache.fop.render.Renderer */ public synchronized void setUserAgent(FOUserAgent agent) { userAgent = agent; @@ -110,12 +89,6 @@ return false; } -///** -// * @param ext (todo) Description of the Parameter -// * @seeorg.apache.fop.render.Renderer -// */ -//public void renderExtension(TreeExt ext) { } - /** * Prepare a page for rendering. This is called if the renderer supports * out of order rendering. The renderer should prepare the page so that a @@ -127,110 +100,6 @@ */ public void preparePage(PageViewport page) { } -///** -// * Utility method to convert a page sequence title to a string. Some -// * renderers may only be able to use a string title. A title is a sequence -// * of inline areas that this method attempts to convert to an equivalent -// * string. -// * -// * @param title The Title to convert -// * @return An expanded string representing the title -// */ -//protected String convertTitleToString(Title title) { -//List children = title.getInlineAreas(); -//String str = convertToString(children); -//return str.trim(); -//} -// -//private String convertToString(List children) { -//StringBuffer sb = new StringBuffer(); -//for (int count = 0; count children.size(); count++) { -//InlineArea inline = (InlineArea) children.get(count); -//if (inline instanceof Character) { -//sb.append(((Character) inline).getChar()); -//} else if (inline instanceof TextArea) { -//sb.append(((TextArea) inline).getTextArea()); -//} else if (inline instanceof InlineParent) { -//sb.append(convertToString( -//((InlineParent) inline).getChildAreas())); -//} else { -//sb.append( ); -//} -//} -//return sb.toString(); -//} -// -///** @see org.apache.fop.render.Renderer */ -//public void startPageSequence(Title seqTitle) { -////do nothing -//} - -// normally this would be overriden to create a page in the -// output -///** @see org.apache.fop.render.Renderer */ -//public void renderPage(PageViewport page) -//throws IOException, FOPException { -// -//Page p = page.getPage(); -//renderPageAreas(p); -//} - -///** -// * Renders page areas. -// * -// * @param page The
cvs commit: xml-fop/src/java/org/apache/fop/render AbstractRenderer.java Renderer.java
pbwest 2004/03/16 04:17:54 Modified:src/java/org/apache/fop/render Tag: FOP_0-20-0_Alt-Design AbstractRenderer.java Renderer.java Log: startRenderer and stopRenderer methods removed. Many fields and their setter removed - use general options setter. Commented out many fields until design of rendering in alt-design is finalised. Revision ChangesPath No revision No revision 1.24.2.3 +38 -88xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java Index: AbstractRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v retrieving revision 1.24.2.2 retrieving revision 1.24.2.3 diff -u -r1.24.2.2 -r1.24.2.3 --- AbstractRenderer.java 13 Mar 2004 08:46:05 - 1.24.2.2 +++ AbstractRenderer.java 16 Mar 2004 12:17:53 - 1.24.2.3 @@ -18,9 +18,8 @@ package org.apache.fop.render; -import java.io.IOException; import java.io.OutputStream; -import java.util.Date; +import java.util.HashMap; import java.util.Map; import java.util.logging.Logger; // XML @@ -33,87 +32,56 @@ import org.apache.fop.apps.Fop; import org.apache.fop.configuration.FOUserAgent; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; - /** * Abstract base class for all renderers. The Abstract renderer does all the * top level processing of the area tree and adds some abstract methods to * handle viewports. This keeps track of the current block and inline position. */ public abstract class AbstractRenderer - implements Renderer, Configurable { + implements Renderer { -/** - * user agent - */ +protected OutputStream output; +/** user agent */ protected FOUserAgent userAgent; -/** - * producer (usually FOP) - */ -protected String producer = FOP; - -/** - * creator of document - */ -protected String creator = null; - -/** - * creation time - */ -protected Date creationDate = null; - -/** - * renderer configuration - */ -protected Map options; - -/** - * block progression position - */ -protected int currentBPPosition = 0; - -/** - * inline progression position - */ -protected int currentIPPosition = 0; - -/** - * current inline progression position in block - */ -protected int currentBlockIPPosition = 0; - -/** - * the block progression position of the containing block used for - * absolutely positioned blocks - */ -protected int containingBPPosition = 0; +/** renderer configuration */ +protected Map options = new HashMap(); -/** - * the inline progression position of the containing block used for - * absolutely positioned blocks - */ -protected int containingIPPosition = 0; +///** block progression position */ +//protected int currentBPPosition = 0; +// +///** inline progression position */ +//protected int currentIPPosition = 0; +// +///** current inline progression position in block */ +//protected int currentBlockIPPosition = 0; +// +///** +// * the block progression position of the containing block used for +// * absolutely positioned blocks +// */ +//protected int containingBPPosition = 0; +// +///** +// * the inline progression position of the containing block used for +// * absolutely positioned blocks +// */ +//protected int containingIPPosition = 0; protected Logger log = Logger.getLogger(Fop.fopPackage); - + /** - * @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration) + * Implements Runnable.run() so that this thread can be started. + * Set up the fonts and perform other initialization. + * Respond to requests from layout thread for information + * Wait for requests from layout thread for layout. */ -public void configure(Configuration conf) throws ConfigurationException { -} - -/** @see org.apache.fop.render.Renderer */ -public void setProducer(String inProducer) { -producer = inProducer; +public void run() { } -/** @see org.apache.fop.render.Renderer */ -public void setCreator(String inCreator) { -creator = inCreator; +public synchronized void setOutputStream(OutputStream output) { +this.output = output; } ///** @@ -121,32 +89,14 @@ // */
cvs commit: xml-fop/src/java/org/apache/fop/render AbstractRenderer.java PrintRenderer.java Renderer.java RendererContext.java XMLHandler.java
jeremias2004/02/27 09:55:24 Modified:src/java/org/apache/fop/render AbstractRenderer.java PrintRenderer.java Renderer.java RendererContext.java XMLHandler.java Log: Applied Apache License Version 2.0 by following the instructions at http://www.apache.org/dev/apply-license.html. Revision ChangesPath 1.24 +16 -48xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java Index: AbstractRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- AbstractRenderer.java 25 Feb 2004 11:52:32 - 1.23 +++ AbstractRenderer.java 27 Feb 2004 17:55:23 - 1.24 @@ -1,53 +1,21 @@ /* - * $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 - *[EMAIL PROTECTED] - * - * 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 [EMAIL PROTECTED]. For more information on the Apache - * Software Foundation, please see http://www.apache.org/. + * Copyright 1999-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + +/* $Id$ */ + package org.apache.fop.render; // Java 1.7 +16 -48xml-fop/src/java/org/apache/fop/render/PrintRenderer.java Index: PrintRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/PrintRenderer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- PrintRenderer.java12 Dec 2003 22:37:39 - 1.6 +++ PrintRenderer.java27 Feb 2004
cvs commit: xml-fop/src/java/org/apache/fop/render AbstractRenderer.java
gmazza 2003/09/14 12:32:44 Modified:src/java/org/apache/fop/render AbstractRenderer.java Log: Change to have the fo:region-body display on top in cases of overlap with the other fo:regions. Revision ChangesPath 1.14 +6 -2 xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java Index: AbstractRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- AbstractRenderer.java 10 Sep 2003 18:42:22 - 1.13 +++ AbstractRenderer.java 14 Sep 2003 19:32:44 - 1.14 @@ -276,16 +276,20 @@ * @param page The page whos page areas are to be rendered */ protected void renderPageAreas(Page page) { +/* Spec does not appear to specify whether fo:region-body should +appear above or below side regions in cases of overlap. FOP +decision is to have fo:region-body on top, hence it is rendered +last here. */ RegionViewport viewport; viewport = page.getRegion(Region.BEFORE_CODE); renderRegionViewport(viewport); viewport = page.getRegion(Region.START_CODE); renderRegionViewport(viewport); -viewport = page.getRegion(Region.BODY_CODE); -renderRegionViewport(viewport); viewport = page.getRegion(Region.END_CODE); renderRegionViewport(viewport); viewport = page.getRegion(Region.AFTER_CODE); +renderRegionViewport(viewport); +viewport = page.getRegion(Region.BODY_CODE); renderRegionViewport(viewport); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]