From charles17@example.com Wed Mar 1 11:34:46 2000 Return-Path: <charles17@example.com> Mailing-List: contact charles17@example.com; run by ezmlm Delivered-To: mailing list charles17@example.com Received: (qmail 44835 invoked by uid 1061); 1 Mar 2000 11:34:46 -0000 Date: 1 Mar 2000 11:34:46 -0000 Message-ID: <charles17@example.com> From: charles17@example.com To: charles17@example.com Subject: cvs commit: xml-fop/src/org/apache/fop/apps Version.java fotis 00/03/01 03:34:45 Modified: src/org/apache/fop/apps Version.java Log: signals developer version Revision Changes Path 1.9 +2 -2 xml-fop/src/org/apache/fop/apps/Version.java Index: Version.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Version.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Version.java 1999/11/30 02:15:21 1.8 +++ Version.java 2000/03/01 11:34:45 1.9 @@ -1,4 +1,4 @@ -/*-- $Id: Version.java,v 1.8 1999/11/30 02:15:21 jtauber Exp $ -- +/*-- $Id: Version.java,v 1.9 2000/03/01 11:34:45 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -62,6 +62,6 @@ * @return the version string */ public static String getVersion() { - return "FOP 0.12.1[dev]"; + return "FOP 0.12.2 [dev]"; } } From charles17@example.com Sun Mar 5 02:53:54 2000 Return-Path: <charles17@example.com> Mailing-List: contact charles17@example.com; run by ezmlm Delivered-To: mailing list charles17@example.com Delivered-To: moderator for charles17@example.com Received: (qmail 20865 invoked by uid 1114); 5 Mar 2000 02:53:54 -0000 Date: 5 Mar 2000 02:53:54 -0000 Message-ID: <charles17@example.com> From: charles17@example.com To: charles17@example.com Subject: cvs commit: xml-fop/src/org/apache/fop/render/pdf PDFRenderer.java arved 00/03/04 18:53:53 Modified: src/org/apache/fop/render/pdf PDFRenderer.java Log: Update: Links added to AnnotList Revision Changes Path 1.10 +18 -7 xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java Index: PDFRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- PDFRenderer.java 1999/12/02 09:37:50 1.9 +++ PDFRenderer.java 2000/03/05 02:53:53 1.10 @@ -1,4 +1,4 @@ -/*-- $Id: PDFRenderer.java,v 1.9 1999/12/02 09:37:50 jtauber Exp $ -- +/*-- $Id: PDFRenderer.java,v 1.10 2000/03/05 02:53:53 arved Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -81,6 +81,9 @@ /** the current stream to add PDF commands to */ PDFStream currentStream; + /** the current annotation list to add annotations to */ + PDFAnnotList currentAnnotList; + /** the current (internal) font name */ protected String currentFontName; @@ -458,11 +461,9 @@ currentStream.add("ET\n"); - this.pdfDoc.makePage(this.pdfResources, currentStream, - page.getWidth()/1000, - page.getHeight()/1000); - if (page.hasLinks()) { + currentAnnotList = this.pdfDoc.makeAnnotList(); + Enumeration e = page.getLinkSets().elements(); while (e.hasMoreElements()) { LinkSet linkSet = (LinkSet) e.nextElement(); @@ -470,10 +471,20 @@ Enumeration f = linkSet.getRects().elements(); while (f.hasMoreElements()) { Rectangle rect = (Rectangle) f.nextElement(); - this.pdfDoc.makeLink(rect, dest); + currentAnnotList.addLink( + this.pdfDoc.makeLink(rect, dest) + ); } } - } + } else { + currentAnnotList = null; + } + + this.pdfDoc.makePage(this.pdfResources, currentStream, + currentAnnotList, + page.getWidth()/1000, + page.getHeight()/1000); + } /** From charles17@example.com Mon Mar 6 21:26:50 2000 Return-Path: <charles17@example.com> Mailing-List: contact charles17@example.com; run by ezmlm Delivered-To: mailing list charles17@example.com Received: (qmail 14753 invoked by uid 1061); 6 Mar 2000 21:26:50 -0000 Date: 6 Mar 2000 21:26:50 -0000 Message-ID: <charles17@example.com> From: charles17@example.com To: charles17@example.com Subject: cvs commit: xml-fop/lib - New directory fotis 00/03/06 13:26:50 xml-fop/lib - New directory From charles17@example.com Mon Mar 6 21:28:02 2000 Return-Path: <charles17@example.com> Mailing-List: contact charles17@example.com; run by ezmlm Delivered-To: mailing list charles17@example.com Received: (qmail 15360 invoked by uid 1061); 6 Mar 2000 21:28:02 -0000 Date: 6 Mar 2000 21:28:02 -0000 Message-ID: <charles17@example.com> From: charles17@example.com To: charles17@example.com Subject: cvs commit: xml-fop/lib/bin - New directory fotis 00/03/06 13:28:02 xml-fop/lib/bin - New directory From charles17@example.com Mon Mar 6 21:30:04 2000 Return-Path: <charles17@example.com> Mailing-List: contact charles17@example.com; run by ezmlm Delivered-To: mailing list charles17@example.com Received: (qmail 16335 invoked by uid 1061); 6 Mar 2000 21:30:04 -0000 Date: 6 Mar 2000 21:30:04 -0000 Message-ID: <charles17@example.com> From: charles17@example.com To: charles17@example.com Subject: cvs commit: xml-fop/lib/bin antRun fotis 00/03/06 13:30:04 Added: lib Xslt.class Xslt.java ant.jar xml.jar lib/bin antRun Log: Switching from make to Ant Revision Changes Path 1.1 xml-fop/lib/Xslt.class <<Binary file>> 1.1 xml-fop/lib/Xslt.java Index: Xslt.java =================================================================== /* * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, 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 acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", 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 charles17@example.com. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * 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 (INCLUDING, 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. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ //package org.apache.tools.ant.taskdefs; import org.apache.tools.ant.Task; import java.net.*; import java.io.*; import org.apache.xalan.xslt.*; /** * Task to call the XSLT processor Xalan (part of xml.apache.org), which converts xml files * from a source to an output using a stylesheet file * * <p> * This task can take the following arguments: * <ul> * <li>infile * <li>xsltfile * <li>outfile * <li>smart * </ul> * <p> * Of these arguments, <b>infile, outfile</b> and <b>xsltfile</b> are required. * smart defaults to 'no'. The other allowed value is 'yes'. If smart is set to 'yes' * xalan is only called if either the outfile is older than the infile or the stylesheet * or the outfile doesn't exist. * <p> * @author Fotis Jannidis <a href="mailto:charles17@example.com">charles17@example.com</a> */ public class Xslt extends Task { private String infile, outfile, xsltfile; private String smart = "no"; //defaults to do conversion everytime task is called /** * Calls Xalan and does the transformation * */ private void transform(String xmlSourceURL, String xslURL, String outputURL) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException { // Use XSLTProcessor to instantiate an XSLTProcessor. org.apache.xalan.xslt.XSLTProcessor processor = org.apache.xalan.xslt.XSLTProcessorFactory.getProcessor(); // Create the 3 objects the XSLTProcessor needs to perform the transformation. org.apache.xalan.xslt.XSLTInputSource xmlSource = new org.apache.xalan.xslt.XSLTInputSource (infile); org.apache.xalan.xslt.XSLTInputSource xslSheet = new org.apache.xalan.xslt.XSLTInputSource (xsltfile); org.apache.xalan.xslt.XSLTResultTarget xmlResult = new org.apache.xalan.xslt.XSLTResultTarget (outfile); // Perform the transformation. System.out.println("============================"); System.out.println("xslt \nin: " + infile + "\nstyle: " + xsltfile + "\nout: " + outfile); System.out.println("============================"); processor.process(xmlSource, xslSheet, xmlResult); } /** * Sets the input file * */ public void setInfile (String infile) { this.infile = infile; } /** * Sets the stylesheet file * */ public void setXsltfile (String xsltfile) { this.xsltfile = xsltfile; } /** * Sets the output file * */ public void setOutfile (String outfile) { this.outfile = outfile; } /** * Sets the value for smart * * @param option valid values: * <ul> * <li>yes: check whether output file is older than input or stylesheet * <li>no: (default) do conversion everytime task is called * </ul> */ public void setSmart (String smart) { this.smart = smart; } /** * Catches the errors transform() can throw and * returns meaningfull error messages */ private void startTransform () { try { transform (infile,xsltfile,outfile); } catch (org.xml.sax.SAXException saxerror) { System.out.println("SAX Error: " + saxerror); } catch (MalformedURLException urlerror) { System.out.println("URL Error: " + urlerror); } catch (IOException ioerror) { System.out.println("IO Error: " + ioerror); } } /** * Main method, which is called by ant. * Checks for the value of smart and calls startTransform accordingly */ public void execute () throws org.apache.tools.ant.BuildException { if (smart.equals("no")) { startTransform(); } else if (smart.equals("yes")) { File outfileF = new File (outfile); //checks for existence of output file if (outfileF.exists()) { //checks whether output file is older than input file or xslt stylesheet file if ((outfileF.lastModified() < new File(infile).lastModified()) | (outfileF.lastModified() < new File(xsltfile).lastModified())) { startTransform(); } } else { startTransform(); } //returns error message, if smart has another value as 'yes' or 'no' } else { System.err.println("Error: Allowed values for the attribute smart are 'yes' or 'no'"); } } //quick access for debugging //usage XSLT infile xsltfile outfile (smart is 'yes') /* public static void main (String args[]) { Xslt xslt = new Xslt(); xslt.setInfile(args[0]); xslt.setXsltfile(args[1]); xslt.setOutfile(args[2]); xslt.setSmart("yes"); xslt.execute(); } */ } 1.1 xml-fop/lib/ant.jar <<Binary file>> 1.1 xml-fop/lib/xml.jar <<Binary file>> 1.1 xml-fop/lib/bin/antRun Index: antRun =================================================================== #! /bin/sh # Args: DIR command cd $1 CMD=$2 shift shift if test -f $CMD.sh; then CMD="sh $CMD.sh" fi echo $CMD $@ | sh From charles17@example.com Mon Mar 6 21:31:00 2000 Return-Path: <charles17@example.com> Mailing-List: contact charles17@example.com; run by ezmlm Delivered-To: mailing list charles17@example.com Received: (qmail 16856 invoked by uid 1061); 6 Mar 2000 21:31:00 -0000 Date: 6 Mar 2000 21:31:00 -0000 Message-ID: <charles17@example.com> From: charles17@example.com To: charles17@example.com Subject: cvs commit: xml-fop build.bat build.sh build.xml fotis 00/03/06 13:31:00 Added: . build.bat build.sh build.xml Log: Switching from make to Ant Revision Changes Path 1.1 xml-fop/build.bat Index: build.bat =================================================================== echo on echo Fop Build System echo ---------------- if "%JAVA_HOME%" == "" goto error set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip;lib\ant.jar;lib\xml.jar;lib set ANT_HOME=.\lib echo Building with classpath %LOCALCLASSPATH% echo Starting Ant... %JAVA_HOME%\bin\java.exe -Dant.home=%ANT_HOME% -classpath %LOCALCLASSPATH% org.apache.tools.ant.Main %1 %2 %3 %4 %5 goto end :error echo ERROR: JAVA_HOME not found in your environment. echo Please, set the JAVA_HOME variable in your environment to match the echo location of the Java Virtual Machine you want to use. :end rem set LOCALCLASSPATH= 1.1 xml-fop/build.sh Index: build.sh =================================================================== #!/bin/sh echo echo "Fop Build System" echo "----------------" echo if [ "$JAVA_HOME" = "" ] ; then echo "ERROR: JAVA_HOME not found in your environment." echo echo "Please, set the JAVA_HOME variable in your environment to match the" echo "location of the Java Virtual Machine you want to use." exit 1 fi LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip:./lib/ant.jar:./lib/xml.jar:./lib ANT_HOME=./lib echo Building with classpath $CLASSPATH:$LOCALCLASSPATH echo echo Starting Ant... echo $JAVA_HOME/bin/java -Dant.home=$ANT_HOME -classpath "$LOCALCLASSPATH:$CLASSPATH" org.apache.tools.ant.Main $* 1.1 xml-fop/build.xml Index: build.xml =================================================================== <?xml version="1.0"?> <!-- =========================================================================== * ================= * | How to build Fop | * ================= * Adaption from the Cocoon build.xml written by Stefano Mazzocchi by Giacomo Pati with some addition by Fotis Jannidis Introduction ============ FOP is the world's first print formatter driven by XSL formatting objects. It is a Java 1.1 application that reads a formatting object tree and then turns it into a PDF document. The formatting object tree, can be in the form of an XML document (output by an XSLT engine like XT or Xalan) or can be passed in memory as a DOM Document or (in the case of XT) SAX events. FOP is part of Apache's XML project. The homepage of FOP is http:/xml.apache.org/fop HTML-Documentation can be found in the subdirectory ./docs. Installing the build tools ========================== The Fop build system is based on Jakarta Ant, which is a Java building tool originally developed for the Jakarta Tomcat project but now used in many other Apache projects and extended by many developers. Ant is a little but very handy tool that uses a build file written in XML (this file) as building instructions. For more information refer to "http://jakarta.apache.org/ant/". To make things easier for you, the Fop distribution contains a precompiled version of Ant and the build scripts take care of all the classpath issues except the following: You need to have xerces.jar, xalan.jar and bsf.jar (comes with xalan) in your classpath. You can get those from http://xml.apache.org/xerces and http://xml.apache.org/xalan respectively. Additionaly you have to make sure, that the "JAVA_HOME" environment property should be set to match the JVM you want to use. That's it. Building instructions ===================== First, make sure your current working directory is where this very file is located. Then type ./build.sh (unix) .\build.bat (win32) if everything is right and all the required packages are visible, this action will generate a file called "fop.jar" in the "./build" directory. Note, that if you do further development, compilation time is reduced since Ant is able to detect which files have changed an to recompile charles17@example.com. If something went wrong, go to the FAQ section below. Also, you'll note that reusing a single JVM instance for each task, increases tremendously the performance of the whole build system, compared to other tools (i.e. make or shell scripts) where a new JVM is started for each task. Build targets ============= The build system is not only responsible of compiling Fop into a jar file, but is also responsible for creating the HTML documentation, javadocs, distributions and web site. In fact, the file you have here is _exactly_ what is used by fop maintainers to take care of everything in the Fop project, no less and no more. (only partially implemented) These are the meaningful targets for this build file: - package [default] -> creates ./build/fop.jar - usage -> shows a help screen - codegen -> generates needed java sources from xml resources - docs -> generates the HTML documentation in ./build/docs - javadocs -> generates the API documentation in ./build/javadocs - dist -> generates the Fop distribution - clean -> restores the distribution to its original and clean state (excepting dist files) - distclean -> restores the distribution to its original and clean state - site -> generates the web site in ../xml-site/targets/fop (not yet impl.) ====================================== FAQ ===================================== 1) Why some of the classes present in the original jar are not built anymore? The fop build system is very flexible: if a module requires a package that is not present in the classpath at build time, the module is skipped but the built process is not stopped. Here is a list of such modules and what you have to download to build them: org.apache.fop.apps.XTCommandLine ===> James Clark's XT (http://www.jclark.com/) 2) I see a lot of warnings starting like this: "Warning: file modified in the future:" Sometimes ant gives out this warnings, but the build is finished without any problems ============================================================================ --> <project default="package" basedir="."> <!-- =================================================================== --> <!-- Initialization target --> <!-- =================================================================== --> <target name="init"> <tstamp/> <property name="Name" value="Fop"/> <property name="name" value="fop"/> <property name="version" value="0.19.2"/> <property name="year" value="1999-2000"/> <echo message="------------------- ${Name} ${version} [${year}] ----------------"/> <property name="build.compiler" value="classic"/> <property name="debug" value="off"/> <property name="optimize" value="on"/> <property name="deprecation" value="off"/> <property name="src.dir" value="./src"/> <property name="src.codegen" value="./src/codegen"/> <property name="docs.dir" value="./docs"/> <property name="lib.dir" value="./lib"/> <property name="packages" value="org.apache.fop.*"/> <property name="doc.generator" value="org.apache.stylebook.StyleBook"/> <property name="doc.generator.package" value="${lib.dir}/stylebook-1.0-b2.jar"/> <property name="build.dir" value="./build"/> <property name="build.src" value="./build/src"/> <property name="build.codegen" value="./build/src/codegen"/> <property name="build.dest" value="./build/classes"/> <property name="build.docs" value="./build/docs"/> <property name="build.javadocs" value="./build/javadocs"/> <property name="dist.dir" value="./dist"/> <property name="properties.dir" value="org/apache/fop/fo/properties"/> <property name="fonts.dir" value="org/apache/fop/render/pdf/fonts"/> <property name="replacestring" value="org/apache/fop"/> <property name="ignore_this" value="ignore_this.java"/> <property name="xslt" value="org.apache.xalan.xslt.Process"/> <property name="src.properties.xsl" value="${src.codegen}/properties.xsl"/> <property name="properties.xml" value="${build.codegen}/properties.xml"/> <property name="properties.xsl" value="${build.codegen}/properties.xsl"/> <property name="src.charlist.xsl" value="${src.codegen}/code-point-mapping.xsl"/> <property name="charlist.xml" value="${build.codegen}/charlist.xml"/> <property name="charlist.xsl" value="${build.codegen}/code-point-mapping.xsl"/> <property name="fontfile.xsl" value="${build.codegen}/font-file.xsl"/> <property name="Courier.xml" value="${build.codegen}/Courier.xml"/> <property name="Courier-Oblique.xml" value="${build.codegen}/Courier-Oblique.xml"/> <property name="Courier-Bold.xml" value="${build.codegen}/Courier-Bold.xml"/> <property name="Courier-BoldOblique.xml" value="${build.codegen}/Courier-BoldOblique.xml"/> <property name="Helvetica.xml" value="${build.codegen}/Helvetica.xml"/> <property name="Helvetica-Oblique.xml" value="${build.codegen}/Helvetica-Oblique.xml"/> <property name="Helvetica-Bold.xml" value="${build.codegen}/Helvetica-Bold.xml"/> <property name="Helvetica-BoldOblique.xml" value="${build.codegen}/Helvetica-BoldOblique.xml"/> <property name="Times-Roman.xml" value="${build.codegen}/Times-Roman.xml"/> <property name="Times-Italic.xml" value="${build.codegen}/Times-Italic.xml"/> <property name="Times-Bold.xml" value="${build.codegen}/Times-Bold.xml"/> <property name="Times-BoldItalic.xml" value="${build.codegen}/Times-BoldItalic.xml"/> <taskdef name="xslt" classname="Xslt"/> <available property="xt.present" classname="com.jclark.xsl.sax.XSLProcessor"/> <filter token="${replacestring}" value="${build.src}/${replacestring}"/> </target> <!-- =================================================================== --> <!-- Help on usage --> <!-- =================================================================== --> <target name="usage"> <echo message=""/> <echo message=""/> <echo message="${Name} Build file"/> <echo message="-------------------------------------------------------------"/> <echo message=""/> <echo message=" available targets are:"/> <echo message=""/> <echo message=" package --> generates the ${name}.jar file (default)"/> <echo message=" codegen --> generates the java files from the xml resources"/> <echo message=" compile --> compiles the source code"/> <echo message=" docs --> generates the HTML documentation"/> <echo message=" javadocs --> generates the API documentation (java 1.2 only)"/> <echo message=" dist --> generates the ${Name} distribution as .tar.gz and .zip"/> <echo message=" clean --> cleans up the directory (except for the dist files)"/> <echo message=" distclean --> cleans up the directory"/> <echo message=" site --> generates the ${Name} web site (not yet implemented)"/> <echo message=""/> <echo message=" See the comments inside the build.xml file for more details."/> <echo message="-------------------------------------------------------------"/> <echo message=""/> <echo message=""/> </target> <!-- =================================================================== --> <!-- Prepares the build directory --> <!-- =================================================================== --> <target name="prepare" depends="init"> <!-- create directories --> <echo message="Preparing the build directories"/> <mkdir dir="${build.dir}"/> <mkdir dir="${build.src}"/> <mkdir dir="${build.src}/${properties.dir}"/> <mkdir dir="${build.src}/${fonts.dir}"/> </target> <!-- =================================================================== --> <!-- Prepares the build directory --> <!-- =================================================================== --> <target name="prepare-xt" depends="prepare" if="xt.present"> <copydir src="${src.dir}" dest="${build.src}" includes="**/XT*"/> </target> <!-- =================================================================== --> <!-- Prepares the source code --> <!-- =================================================================== --> <target name="prepare-src" depends="prepare, prepare-xt"> <!-- copy src files --> <copydir src="${src.dir}" dest="${build.src}" excludes="**/Makefile*, **/package.html, **/XT*"/> </target> <!-- =================================================================== --> <!-- Generate the source code --> <!-- =================================================================== --> <target name="codegen" depends="prepare"> <!-- resetting codegen directory --> <echo message="Resetting codegen directory"/> <!-- copy codegen directory --> <copydir src="${src.codegen}" dest="${build.codegen}" filtering="on"/> <!-- generate the java files from xml resources --> <echo message="Generating the java files from xml resources"/> <xslt infile="${properties.xml}" xsltfile="${properties.xsl}" outfile="${build.src}/${replacestring}/fo/properties/${ignore_this}" smart="yes"/> <xslt infile="${charlist.xml}" xsltfile="${charlist.xsl}" outfile="${build.src}/${replacestring}/render/pdf/CodePointMapping.java" smart="yes"/> <xslt infile="${Courier.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/Courier.java" smart="yes"/> <xslt infile="${Courier-Oblique.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/CourierOblique.java" smart="yes"/> <xslt infile="${Courier-Bold.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/CourierBold.java" smart="yes"/> <xslt infile="${Courier-BoldOblique.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/CourierBoldOblique.java" smart="yes"/> <xslt infile="${Helvetica.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/Helvetica.java" smart="yes"/> <xslt infile="${Helvetica-Oblique.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/HelveticaOblique.java" smart="yes"/> <xslt infile="${Helvetica-Bold.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/HelveticaBold.java" smart="yes"/> <xslt infile="${Helvetica-BoldOblique.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/HelveticaBoldOblique.java" smart="yes"/> <xslt infile="${Times-Roman.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/TimesRoman.java" smart="yes"/> <xslt infile="${Times-Italic.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/TimesItalic.java" smart="yes"/> <xslt infile="${Times-Bold.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/TimesBold.java" smart="yes"/> <xslt infile="${Times-BoldItalic.xml}" xsltfile="${fontfile.xsl}" outfile="${build.src}/${replacestring}/render/pdf/fonts/TimesBoldItalic.java" smart="yes"/> </target> <!-- =================================================================== --> <!-- Compiles the source directory --> <!-- =================================================================== --> <target name="compile" depends="codegen, prepare-src"> <echo message="Compiling the sources "/> <!-- create directories --> <mkdir dir="${build.dest}"/> <javac srcdir="${build.src}" destdir="${build.dest}" debug="${debug}" deprecation="${deprecation}" optimize="${optimize}" excludes="**/${ignore_this}"/> </target> <!-- =================================================================== --> <!-- Creates the class package --> <!-- =================================================================== --> <target name="package" depends="compile"> <echo message="Creating the jar file ${build.dir}/${name}.jar"/> <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}" includes="org/**"/> </target> <!-- =================================================================== --> <!-- Prepares the docs --> <!-- =================================================================== --> <target name="prepare-docs" depends="init"> <mkdir dir="${build.docs}"/> </target> <!-- =================================================================== --> <!-- Copying the documentation files --> <!-- =================================================================== --> <target name="docs" depends="prepare-docs"> <echo message="Copying doc files "/> <copydir src="${docs.dir}" dest="${build.docs}" /> <copydir src="${lib.dir}" dest="${build.dir}/${lib.dir}" /> <copyfile src="build.xml" dest="${build.dir}/build.xml" /> --> <copyfile src="${basedir}/README" dest="${build.dir}/README" /> <copyfile src="${basedir}/STATUS" dest="${build.dir}/STATUS" /> <copyfile src="${basedir}/LICENSE" dest="${build.dir}/LICENSE" /> <copyfile src="${basedir}/FAQ" dest="${build.dir}/FAQ" /> </target> <!-- =================================================================== --> <!-- Creates the API documentation --> <!-- =================================================================== --> <target name="javadocs" depends="prepare-src"> <echo message="Producing the javadoc files "/> <mkdir dir="${build.javadocs}"/> <javadoc packagenames="${packages}" sourcepath="${build.src}" destdir="${build.javadocs}" author="true" version="true" windowtitle="${Name} API" doctitle="${Name}" bottom="Copyright &#169; ${year} Apache Software Foundation. All Rights Reserved." /> </target> <!-- =================================================================== --> <!-- Creates the distribution --> <!-- =================================================================== --> <target name="dist" depends="package, docs, javadocs"> <echo message="Building the distribution files (zip,tar)"/> <mkdir dir="${dist.dir}"/> <copyfile src="${basedir}/build.sh" dest="${dist.dir}/build.sh" /> <chmod src="${dist.dir}/build.sh" perm="ugo+rx" /> <copyfile src="${basedir}/build.bat" dest="${dist.dir}/build.bat" /> <copydir src="${build.dir}" dest="${dist.dir}" excludes="**/classes/**, **/${ignore_this}"/> <zip zipfile="${Name}-${version}.zip" basedir="${dist.dir}" includes="**"/> <tar tarfile="${Name}-${version}.tar" basedir="${dist.dir}" includes="**"/> <gzip zipfile="${Name}-${version}.tar.gz" src="${Name}-${version}.tar" /> <delete file="${Name}-${version}.tar"/> <deltree dir="${dist.dir}"/> </target> <!-- =================================================================== --> <!-- Clean targets --> <!-- =================================================================== --> <target name="clean" depends="init"> <deltree dir="${build.dir}"/> </target> <target name="distclean" depends="clean"> <deltree dir="${dist.dir}"/> <delete file="${Name}-${version}.tar.gz"/> <delete file="${Name}-${version}.tar"/> <delete file="${Name}-${version}.zip"/> </target> </project> <!-- End of file --> From charles17@example.com Mon Mar 6 21:34:41 2000 Return-Path: <charles17@example.com> Mailing-List: contact charles17@example.com; run by ezmlm Delivered-To: mailing list charles17@example.com Received: (qmail 19036 invoked by uid 1061); 6 Mar 2000 21:34:41 -0000 Date: 6 Mar 2000 21:34:41 -0000 Message-ID: <charles17@example.com> From: charles17@example.com To: charles17@example.com Subject: cvs commit: xml-fop/src/codegen code-point-mapping.xsl font-file.xsl properties.xsl fotis 00/03/06 13:34:41 Modified: src/codegen code-point-mapping.xsl font-file.xsl properties.xsl Log: Switching from make to Ant Revision Changes Path 1.6 +2 -2 xml-fop/src/codegen/code-point-mapping.xsl Index: code-point-mapping.xsl =================================================================== RCS file: /home/cvs/xml-fop/src/codegen/code-point-mapping.xsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- code-point-mapping.xsl 2000/02/29 09:41:19 1.5 +++ code-point-mapping.xsl 2000/03/06 21:34:40 1.6 @@ -6,7 +6,7 @@ <xsl:output method="text" /> <xsl:template match="font-mappings"> -<redirect:write file="org/apache/fop/render/pdf/CodePointMapping.java"> +<!-- <redirect:write file="org/apache/fop/render/pdf/CodePointMapping.java"> --> package org.apache.fop.render.pdf; public class CodePointMapping { @@ -18,7 +18,7 @@ </xsl:for-each> } } -</redirect:write> +<!-- </redirect:write>--> </xsl:template> </xsl:stylesheet> 1.4 +2 -2 xml-fop/src/codegen/font-file.xsl Index: font-file.xsl =================================================================== RCS file: /home/cvs/xml-fop/src/codegen/font-file.xsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- font-file.xsl 2000/02/29 09:41:19 1.3 +++ font-file.xsl 2000/03/06 21:34:40 1.4 @@ -7,7 +7,7 @@ <xsl:template match="font-metrics"> <xsl:variable name="class-name" select="class-name"/> -<redirect:write select="concat('org/apache/fop/render/pdf/fonts/', $class-name, '.java')"> +<!--<redirect:write select="concat('org/apache/fop/render/pdf/fonts/', $class-name, '.java')">--> package org.apache.fop.render.pdf.fonts; import org.apache.fop.render.pdf.Font; @@ -55,7 +55,7 @@ return width[i]; } } -</redirect:write> +<!--</redirect:write>--> </xsl:template> </xsl:stylesheet> 1.5 +3 -2 xml-fop/src/codegen/properties.xsl Index: properties.xsl =================================================================== RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- properties.xsl 2000/02/29 09:41:19 1.4 +++ properties.xsl 2000/03/06 21:34:41 1.5 @@ -7,7 +7,7 @@ <xsl:template match="property" priority="-1"> <xsl:variable name="classname" select="class-name"/> -<redirect:write select="concat('org/apache/fop/fo/properties/', $classname, '.java')"> +<redirect:write select="concat('@org/apache/fop@/fo/properties/', $classname, '.java')"> package org.apache.fop.fo.properties; import org.apache.fop.datatypes.*; @@ -74,7 +74,7 @@ <xsl:template match="property[datatype/enumeration]"> <xsl:variable name="classname" select="class-name"/> -<redirect:write select="concat('org/apache/fop/fo/properties/', $classname, '.java')"> +<redirect:write select="concat('@org/apache/fop@/fo/properties/', $classname, '.java')"> package org.apache.fop.fo.properties; import org.apache.fop.datatypes.*; @@ -139,4 +139,5 @@ </redirect:write> </xsl:template> </xsl:stylesheet> + From charles17@example.com Tue Mar 7 09:47:35 2000 Return-Path: <charles17@example.com> Mailing-List: contact charles17@example.com; run by ezmlm Delivered-To: mailing list charles17@example.com Received: (qmail 2766 invoked by uid 1061); 7 Mar 2000 09:47:35 -0000 Date: 7 Mar 2000 09:47:35 -0000 Message-ID: <charles17@example.com> From: charles17@example.com To: charles17@example.com Subject: cvs commit: xml-fop/src/org/apache/fop/render/pdf PDFRenderer.java fotis 00/03/07 01:47:35 Modified: src/codegen properties.xml src/org/apache/fop/apps Version.java src/org/apache/fop/datatypes Length.java src/org/apache/fop/fo PropertyListBuilder.java StandardElementMapping.java src/org/apache/fop/fo/flow Block.java Table.java TableBody.java TableCell.java TableColumn.java TableRow.java src/org/apache/fop/layout Area.java AreaContainer.java BlockArea.java LineArea.java Region.java src/org/apache/fop/render/pdf PDFRenderer.java Log: Support for absolute positioning and borders (contributed by Jon Smirl) Revision Changes Path 1.7 +428 -0 xml-fop/src/codegen/properties.xml Index: properties.xml =================================================================== RCS file: /home/cvs/xml-fop/src/codegen/properties.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- properties.xml 1999/12/03 08:12:57 1.6 +++ properties.xml 2000/03/07 09:47:31 1.7 @@ -1,3 +1,4 @@ +<?xml version="1.0" ?> <property-list> <property> <name>font-size</name> @@ -331,6 +332,41 @@ <default>transparent</default> </property> <property> + <name>padding</name> + <class-name>Padding</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>padding-before</name> + <class-name>PaddingBefore</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>padding-after</name> + <class-name>PaddingAfter</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>padding-start</name> + <class-name>PaddingStart</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>padding-end</name> + <class-name>PaddingEnd</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> <name>padding-top</name> <class-name>PaddingTop</class-name> <inherited>false</inherited> @@ -365,5 +401,397 @@ <datatype>String</datatype> <default></default> </property> + <property> + <name>border-before-color</name> + <class-name>BorderBeforeColor</class-name> + <inherited>false</inherited> + <datatype>ColorType</datatype> + <default>black</default> + </property> + <property> + <name>border-before-style</name> + <class-name>BorderBeforeStyle</class-name> + <inherited>false</inherited> + <datatype> + <enumeration> + <value const="NONE">none</value> + <value const="HIDDEN">hidden</value> + <value const="DOTTED">dotted</value> + <value const="DASHED">dashed</value> + <value const="SOLID">solid</value> + <value const="DOUBLE">double</value> + <value const="GROOVE">groove</value> + <value const="RIDGE">ridge</value> + <value const="INSET">inset</value> + <value const="OUTSET">outset</value> + </enumeration> + </datatype> + <default>none</default> + </property> + <property> + <name>border-before-width</name> + <class-name>BorderBeforeWidth</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>border-after-color</name> + <class-name>BorderAfterColor</class-name> + <inherited>false</inherited> + <datatype>ColorType</datatype> + <default>black</default> + </property> + <property> + <name>border-after-style</name> + <class-name>BorderAfterStyle</class-name> + <inherited>false</inherited> + <datatype> + <enumeration> + <value const="NONE">none</value> + <value const="HIDDEN">hidden</value> + <value const="DOTTED">dotted</value> + <value const="DASHED">dashed</value> + <value const="SOLID">solid</value> + <value const="DOUBLE">double</value> + <value const="GROOVE">groove</value> + <value const="RIDGE">ridge</value> + <value const="INSET">inset</value> + <value const="OUTSET">outset</value> + </enumeration> + </datatype> + <default>none</default> + </property> + <property> + <name>border-after-width</name> + <class-name>BorderAfterWidth</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>border-start-color</name> + <class-name>BorderStartColor</class-name> + <inherited>false</inherited> + <datatype>ColorType</datatype> + <default>black</default> + </property> + <property> + <name>border-start-style</name> + <class-name>BorderStartStyle</class-name> + <inherited>false</inherited> + <datatype> + <enumeration> + <value const="NONE">none</value> + <value const="HIDDEN">hidden</value> + <value const="DOTTED">dotted</value> + <value const="DASHED">dashed</value> + <value const="SOLID">solid</value> + <value const="DOUBLE">double</value> + <value const="GROOVE">groove</value> + <value const="RIDGE">ridge</value> + <value const="INSET">inset</value> + <value const="OUTSET">outset</value> + </enumeration> + </datatype> + <default>none</default> + </property> + <property> + <name>border-start-width</name> + <class-name>BorderStartWidth</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>border-end-color</name> + <class-name>BorderEndColor</class-name> + <inherited>false</inherited> + <datatype>ColorType</datatype> + <default>black</default> + </property> + <property> + <name>border-end-style</name> + <class-name>BorderEndStyle</class-name> + <inherited>false</inherited> + <datatype> + <enumeration> + <value const="NONE">none</value> + <value const="HIDDEN">hidden</value> + <value const="DOTTED">dotted</value> + <value const="DASHED">dashed</value> + <value const="SOLID">solid</value> + <value const="DOUBLE">double</value> + <value const="GROOVE">groove</value> + <value const="RIDGE">ridge</value> + <value const="INSET">inset</value> + <value const="OUTSET">outset</value> + </enumeration> + </datatype> + <default>none</default> + </property> + <property> + <name>border-end-width</name> + <class-name>BorderEndWidth</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>border-top-color</name> + <class-name>BorderTopColor</class-name> + <inherited>false</inherited> + <datatype>ColorType</datatype> + <default>black</default> + </property> + <property> + <name>border-top-style</name> + <class-name>BorderTopStyle</class-name> + <inherited>false</inherited> + <datatype> + <enumeration> + <value const="NONE">none</value> + <value const="HIDDEN">hidden</value> + <value const="DOTTED">dotted</value> + <value const="DASHED">dashed</value> + <value const="SOLID">solid</value> + <value const="DOUBLE">double</value> + <value const="GROOVE">groove</value> + <value const="RIDGE">ridge</value> + <value const="INSET">inset</value> + <value const="OUTSET">outset</value> + </enumeration> + </datatype> + <default>none</default> + </property> + <property> + <name>border-top-width</name> + <class-name>BorderTopWidth</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>border-bottom-color</name> + <class-name>BorderBottomColor</class-name> + <inherited>false</inherited> + <datatype>ColorType</datatype> + <default>black</default> + </property> + <property> + <name>border-bottom-style</name> + <class-name>BorderBottomStyle</class-name> + <inherited>false</inherited> + <datatype> + <enumeration> + <value const="NONE">none</value> + <value const="HIDDEN">hidden</value> + <value const="DOTTED">dotted</value> + <value const="DASHED">dashed</value> + <value const="SOLID">solid</value> + <value const="DOUBLE">double</value> + <value const="GROOVE">groove</value> + <value const="RIDGE">ridge</value> + <value const="INSET">inset</value> + <value const="OUTSET">outset</value> + </enumeration> + </datatype> + <default>none</default> + </property> + <property> + <name>border-bottom-width</name> + <class-name>BorderBottomWidth</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>border-left-color</name> + <class-name>BorderLeftColor</class-name> + <inherited>false</inherited> + <datatype>ColorType</datatype> + <default>black</default> + </property> + <property> + <name>border-left-style</name> + <class-name>BorderLeftStyle</class-name> + <inherited>false</inherited> + <datatype> + <enumeration> + <value const="NONE">none</value> + <value const="HIDDEN">hidden</value> + <value const="DOTTED">dotted</value> + <value const="DASHED">dashed</value> + <value const="SOLID">solid</value> + <value const="DOUBLE">double</value> + <value const="GROOVE">groove</value> + <value const="RIDGE">ridge</value> + <value const="INSET">inset</value> + <value const="OUTSET">outset</value> + </enumeration> + </datatype> + <default>none</default> + </property> + <property> + <name>border-left-width</name> + <class-name>BorderLeftWidth</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>border-right-color</name> + <class-name>BorderRightColor</class-name> + <inherited>false</inherited> + <datatype>ColorType</datatype> + <default>black</default> + </property> + <property> + <name>border-right-style</name> + <class-name>BorderRightStyle</class-name> + <inherited>false</inherited> + <datatype> + <enumeration> + <value const="NONE">none</value> + <value const="HIDDEN">hidden</value> + <value const="DOTTED">dotted</value> + <value const="DASHED">dashed</value> + <value const="SOLID">solid</value> + <value const="DOUBLE">double</value> + <value const="GROOVE">groove</value> + <value const="RIDGE">ridge</value> + <value const="INSET">inset</value> + <value const="OUTSET">outset</value> + </enumeration> + </datatype> + <default>none</default> + </property> + <property> + <name>border-right-width</name> + <class-name>BorderRightWidth</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>border-color</name> + <class-name>BorderColor</class-name> + <inherited>false</inherited> + <datatype>ColorType</datatype> + <default>black</default> + </property> + <property> + <name>border-style</name> + <class-name>BorderStyle</class-name> + <inherited>false</inherited> + <datatype> + <enumeration> + <value const="NONE">none</value> + <value const="HIDDEN">hidden</value> + <value const="DOTTED">dotted</value> + <value const="DASHED">dashed</value> + <value const="SOLID">solid</value> + <value const="DOUBLE">double</value> + <value const="GROOVE">groove</value> + <value const="RIDGE">ridge</value> + <value const="INSET">inset</value> + <value const="OUTSET">outset</value> + <value const="TRANSPARENT">transparent</value> + </enumeration> + </datatype> + <default>none</default> + </property> + <property> + <name>border-width</name> + <class-name>BorderWidth</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>0pt</default> + </property> + <property> + <name>border-top</name> + <class-name>BorderTop</class-name> + <inherited>false</inherited> + <datatype>String</datatype> + <default>normal</default> + </property> + <property> + <name>border-bottom</name> + <class-name>BorderBottom</class-name> + <inherited>false</inherited> + <datatype>String</datatype> + <default>normal</default> + </property> + <property> + <name>border-left</name> + <class-name>BorderLeft</class-name> + <inherited>false</inherited> + <datatype>String</datatype> + <default>normal</default> + </property> + <property> + <name>border-right</name> + <class-name>BorderRight</class-name> + <inherited>false</inherited> + <datatype>String</datatype> + <default>normal</default> + </property> + <property> + <name>position</name> + <class-name>Position</class-name> + <inherited>false</inherited> + <datatype> + <enumeration> + <value const="STATIC">static</value> + <value const="RELATIVE">relative</value> + <value const="ABSOLUTE">absolute</value> + <value const="FIXED">fixed</value> + </enumeration> + </datatype> + <default>static</default> + </property> + <property> + <name>top</name> + <class-name>Top</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>auto</default> + </property> + <property> + <name>right</name> + <class-name>Right</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>auto</default> + </property> + <property> + <name>bottom</name> + <class-name>Bottom</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>auto</default> + </property> + <property> + <name>left</name> + <class-name>Left</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>auto</default> + </property> + <property> + <name>width</name> + <class-name>Width</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>auto</default> + </property> + <property> + <name>height</name> + <class-name>Height</class-name> + <inherited>false</inherited> + <datatype>Length</datatype> + <default>auto</default> + </property> </property-list> + 1.10 +2 -2 xml-fop/src/org/apache/fop/apps/Version.java Index: Version.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Version.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Version.java 2000/03/01 11:34:45 1.9 +++ Version.java 2000/03/07 09:47:31 1.10 @@ -1,4 +1,4 @@ -/*-- $Id: Version.java,v 1.9 2000/03/01 11:34:45 fotis Exp $ -- +/*-- $Id: Version.java,v 1.10 2000/03/07 09:47:31 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -51,7 +51,7 @@ package org.apache.fop.apps; -/** +/** * class representing the version of FOP. */ public class Version { 1.6 +5 -1 xml-fop/src/org/apache/fop/datatypes/Length.java Index: Length.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/Length.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Length.java 1999/11/22 02:31:21 1.5 +++ Length.java 2000/03/07 09:47:31 1.6 @@ -1,4 +1,4 @@ -/*-- $Id: Length.java,v 1.5 1999/11/22 02:31:21 jtauber Exp $ -- +/*-- $Id: Length.java,v 1.6 2000/03/07 09:47:31 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -60,6 +60,8 @@ protected int millipoints = 0; protected double fontsize = 12; + + boolean auto = false; /** * set the length given a particular String specifying length and units @@ -95,6 +97,8 @@ if (l == 0) { System.err.println("WARNING: empty length"); this.millipoints = 0; + } else if (len.equals("auto")) { + this.auto = true; } else { String unit = len.substring(l-2); double dvalue = 1.10 +47 -3 xml-fop/src/org/apache/fop/fo/PropertyListBuilder.java Index: PropertyListBuilder.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/PropertyListBuilder.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- PropertyListBuilder.java 1999/12/03 08:12:57 1.9 +++ PropertyListBuilder.java 2000/03/07 09:47:32 1.10 @@ -1,4 +1,4 @@ -/*-- $Id: PropertyListBuilder.java,v 1.9 1999/12/03 08:12:57 jtauber Exp $ -- +/*-- $Id: PropertyListBuilder.java,v 1.10 2000/03/07 09:47:32 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -118,6 +118,50 @@ propertyTable.put("x2",SVGLength.maker()); propertyTable.put("y1",SVGLength.maker()); propertyTable.put("y2",SVGLength.maker()); + + propertyTable.put("border-after-color",BorderAfterColor.maker()); + propertyTable.put("border-after-style",BorderAfterStyle.maker()); + propertyTable.put("border-after-width",BorderAfterWidth.maker()); + propertyTable.put("border-before-color",BorderBeforeColor.maker()); + propertyTable.put("border-before-style",BorderBeforeStyle.maker()); + propertyTable.put("border-before-width",BorderBeforeWidth.maker()); + propertyTable.put("border-bottom",BorderBottom.maker()); + propertyTable.put("border-bottom-color",BorderBottomColor.maker()); + propertyTable.put("border-bottom-style",BorderBottomStyle.maker()); + propertyTable.put("border-bottom-width",BorderBottomWidth.maker()); + propertyTable.put("border-color",BorderColor.maker()); + propertyTable.put("border-end-color",BorderEndColor.maker()); + propertyTable.put("border-end-style",BorderEndStyle.maker()); + propertyTable.put("border-end-width",BorderEndWidth.maker()); + propertyTable.put("border-left",BorderLeft.maker()); + propertyTable.put("border-left-color",BorderLeftColor.maker()); + propertyTable.put("border-left-style",BorderLeftStyle.maker()); + propertyTable.put("border-left-width",BorderLeftWidth.maker()); + propertyTable.put("border-right",BorderRight.maker()); + propertyTable.put("border-right-color",BorderRightColor.maker()); + propertyTable.put("border-right-style",BorderRightStyle.maker()); + propertyTable.put("border-right-width",BorderRightWidth.maker()); + propertyTable.put("border-start-color",BorderStartColor.maker()); + propertyTable.put("border-start-color",BorderStartColor.maker()); + propertyTable.put("border-start-width",BorderStartWidth.maker()); + propertyTable.put("border-style",BorderStyle.maker()); + propertyTable.put("border-top",BorderTop.maker()); + propertyTable.put("border-top-color",BorderTopColor.maker()); + propertyTable.put("border-top-style",BorderTopStyle.maker()); + propertyTable.put("border-top-style",BorderTopStyle.maker()); + propertyTable.put("border-width",BorderWidth.maker()); + propertyTable.put("bottom",Bottom.maker()); + propertyTable.put("height",Height.maker()); + propertyTable.put("left",Left.maker()); + propertyTable.put("padding",Padding.maker()); + propertyTable.put("padding-after",PaddingAfter.maker()); + propertyTable.put("padding-before",PaddingBefore.maker()); + propertyTable.put("padding-end",PaddingEnd.maker()); + propertyTable.put("padding-start",PaddingStart.maker()); + propertyTable.put("position",Position.maker()); + propertyTable.put("right",Right.maker()); + propertyTable.put("top",Top.maker()); + propertyTable.put("width",Width.maker()); } public Property computeProperty(PropertyList propertyList, String propertyName) { @@ -128,7 +172,7 @@ if (propertyMaker != null) { p = propertyMaker.compute(propertyList); } else { - //System.err.println("WARNING: property " + propertyName + " ignored"); + System.err.println("WARNING: property " + propertyName + " ignored"); } return p; } @@ -172,7 +216,7 @@ if (propertyMaker != null) { p = propertyMaker.make(propertyList); } else { - //System.err.println("WARNING: property " + propertyName + " ignored"); + System.err.println("WARNING: property " + propertyName + " ignored"); } return p; } 1.7 +2 -1 xml-fop/src/org/apache/fop/fo/StandardElementMapping.java Index: StandardElementMapping.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/StandardElementMapping.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- StandardElementMapping.java 1999/12/03 08:12:57 1.6 +++ StandardElementMapping.java 2000/03/07 09:47:32 1.7 @@ -1,4 +1,4 @@ -/*-- $Id: StandardElementMapping.java,v 1.6 1999/12/03 08:12:57 jtauber Exp $ -- +/*-- $Id: StandardElementMapping.java,v 1.7 2000/03/07 09:47:32 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -81,6 +81,7 @@ builder.addMapping(uri, "static-content", StaticContent.maker()); builder.addMapping(uri, "block", Block.maker()); + builder.addMapping(uri, "block-container", BlockContainer.maker()); builder.addMapping(uri, "list-block", ListBlock.maker()); builder.addMapping(uri, "list-item", ListItem.maker()); builder.addMapping(uri, "list-item-label", 1.9 +33 -17 xml-fop/src/org/apache/fop/fo/flow/Block.java Index: Block.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Block.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Block.java 1999/11/30 02:15:22 1.8 +++ Block.java 2000/03/07 09:47:32 1.9 @@ -1,4 +1,4 @@ -/*-- $Id: Block.java,v 1.8 1999/11/30 02:15:22 jtauber Exp $ -- +/*-- $Id: Block.java,v 1.9 2000/03/07 09:47:32 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -88,7 +88,11 @@ int paddingBottom; int paddingLeft; int paddingRight; - + + ColorType borderColor; + int borderWidth; + int borderStyle; + BlockArea blockArea; // this may be helpful on other FOs too @@ -142,14 +146,27 @@ this.backgroundColor = this.properties.get("background-color").getColorType(); this.paddingTop = - this.properties.get("padding-top").getLength().mvalue(); - this.paddingLeft = - this.properties.get("padding-left").getLength().mvalue(); - this.paddingBottom = - this.properties.get("padding-bottom").getLength().mvalue(); - this.paddingRight = - this.properties.get("padding-right").getLength().mvalue(); - + this.properties.get("padding").getLength().mvalue(); + this.paddingLeft = this.paddingTop; + this.paddingRight = this.paddingTop; + this.paddingBottom = this.paddingTop; + if (this.paddingTop == 0) { + this.paddingTop = + this.properties.get("padding-top").getLength().mvalue(); + this.paddingLeft = + this.properties.get("padding-left").getLength().mvalue(); + this.paddingBottom = + this.properties.get("padding-bottom").getLength().mvalue(); + this.paddingRight = + this.properties.get("padding-right").getLength().mvalue(); + } + this.borderColor = + this.properties.get("border-color").getColorType(); + this.borderWidth = + this.properties.get("border-width").getLength().mvalue(); + this.borderStyle = + this.properties.get("border-style").getEnum(); + if (area instanceof BlockArea) { area.end(); } @@ -164,12 +181,6 @@ startIndent += bodyIndent + distanceBetweenStarts; } - if (this.isInTableCell) { - startIndent += forcedStartOffset; - endIndent = area.getAllocationWidth() - forcedWidth - - forcedStartOffset; - } - this.marker = 0; if (breakBefore == BreakBefore.PAGE) { @@ -195,12 +206,17 @@ this.blockArea = new BlockArea(fs, area.getAllocationWidth(), - area.spaceLeft(), startIndent, endIndent, + area.spaceLeft(), + startIndent, + endIndent, textIndent, align, alignLast, lineHeight); blockArea.setPage(area.getPage()); blockArea.setBackgroundColor(backgroundColor); blockArea.setPadding(paddingTop, paddingLeft, paddingBottom, paddingRight); + blockArea.setBorderStyle(borderStyle, borderStyle, borderStyle, borderStyle); + blockArea.setBorderWidth(borderWidth, borderWidth, borderWidth, borderWidth); + blockArea.setBorderColor(borderColor, borderColor, borderColor, borderColor); blockArea.start(); int numChildren = this.children.size(); 1.10 +49 -33 xml-fop/src/org/apache/fop/fo/flow/Table.java Index: Table.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Table.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Table.java 1999/11/27 10:11:38 1.9 +++ Table.java 2000/03/07 09:47:32 1.10 @@ -1,4 +1,4 @@ -/*-- $Id: Table.java,v 1.9 1999/11/27 10:11:38 jtauber Exp $ -- +/*-- $Id: Table.java,v 1.10 2000/03/07 09:47:32 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -77,16 +77,20 @@ FontState fs; int breakBefore; int breakAfter; - int startIndent; - int endIndent; int spaceBefore; int spaceAfter; ColorType backgroundColor; + int width; + int height; + ColorType borderColor; + int borderWidth; + int borderStyle; + Vector columns = new Vector(); int currentColumnNumber = 0; - BlockArea blockArea; + AreaContainer areaContainer; public Table(FObj parent, PropertyList propertyList) { super(parent, propertyList); @@ -114,25 +118,28 @@ this.properties.get("break-before").getEnum(); this.breakAfter = this.properties.get("break-after").getEnum(); - this.startIndent = - this.properties.get("start-indent").getLength().mvalue(); - this.endIndent = - this.properties.get("end-indent").getLength().mvalue(); this.spaceBefore = this.properties.get("space-before.optimum").getLength().mvalue(); this.spaceAfter = this.properties.get("space-after.optimum").getLength().mvalue(); this.backgroundColor = this.properties.get("background-color").getColorType(); + this.width = + this.properties.get("width").getLength().mvalue(); + this.height = + this.properties.get("height").getLength().mvalue(); + + this.borderColor = + this.properties.get("border-color").getColorType(); + this.borderWidth = + this.properties.get("border-width").getLength().mvalue(); + this.borderStyle = + this.properties.get("border-style").getEnum(); if (area instanceof BlockArea) { area.end(); } - if (this.isInListBody) { - startIndent += bodyIndent + distanceBetweenStarts; - } - this.marker = 0; if (breakBefore == BreakBefore.PAGE) { @@ -152,16 +159,19 @@ area.addDisplaySpace(spaceBefore); } - this.blockArea = - new BlockArea(fs, area.getAllocationWidth(), - area.spaceLeft(), startIndent, endIndent, 0, - 0, 0, 0); - blockArea.setPage(area.getPage()); - blockArea.setBackgroundColor(backgroundColor); - blockArea.start(); + this.areaContainer = + new AreaContainer(fs, 0, 0, area.getAllocationWidth(), + area.spaceLeft(), Position.STATIC); + areaContainer.setPage(area.getPage()); + areaContainer.setBackgroundColor(backgroundColor); + areaContainer.setBorderStyle(borderStyle, borderStyle, borderStyle, borderStyle); + areaContainer.setBorderWidth(borderWidth, borderWidth, borderWidth, borderWidth); + areaContainer.setBorderColor(borderColor, borderColor, borderColor, borderColor); + areaContainer.start(); // added by Eric Schaeffer currentColumnNumber = 0; + int offset = 0; int numChildren = this.children.size(); for (int i = this.marker; i < numChildren; i++) { @@ -177,39 +187,45 @@ columns.setSize(num); } columns.setElementAt(c, num-1); + c.setColumnOffset(offset); + fo.layout(areaContainer); + offset += c.getColumnWidth(); } else if (fo instanceof TableBody) { if (columns.size() == 0) { System.err.println("WARNING: current implementation of tables requires a table-column for each column, indicating column-width"); return new Status(Status.OK); } - //if (this.isInListBody) { - //fo.setIsInListBody(); - //fo.setDistanceBetweenStarts(this.distanceBetweenStarts); - //fo.setBodyIndent(this.bodyIndent); - //} - ((TableBody) fo).setColumns(columns); Status status; - if ((status = fo.layout(blockArea)).isIncomplete()) { + if ((status = fo.layout(areaContainer)).isIncomplete()) { this.marker = i; if ((i != 0) && (status.getCode() == Status.AREA_FULL_NONE)) { status = new Status(Status.AREA_FULL_SOME); } - //blockArea.end(); - area.addChild(blockArea); - area.increaseHeight(blockArea.getHeight()); + //areaContainer.end(); + area.addChild(areaContainer); + area.increaseHeight(areaContainer.getHeight()); return status; } } } + if (height != 0) + areaContainer.setHeight(height); + + for (int i = 0; i < numChildren; i++) { + FONode fo = (FONode) children.elementAt(i); + if (fo instanceof TableColumn) { + ((TableColumn)fo).setHeight(areaContainer.getHeight()); + } + } - blockArea.end(); - area.addChild(blockArea); + areaContainer.end(); + area.addChild(areaContainer); /* should this be combined into above? */ - area.increaseHeight(blockArea.getHeight()); + area.increaseHeight(areaContainer.getHeight()); if (spaceAfter != 0) { area.addDisplaySpace(spaceAfter); @@ -238,6 +254,6 @@ } public int getAreaHeight() { - return blockArea.getHeight(); + return areaContainer.getHeight(); } } 1.8 +16 -30 xml-fop/src/org/apache/fop/fo/flow/TableBody.java Index: TableBody.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableBody.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- TableBody.java 1999/11/27 10:11:38 1.7 +++ TableBody.java 2000/03/07 09:47:32 1.8 @@ -1,4 +1,4 @@ -/*-- $Id: TableBody.java,v 1.7 1999/11/27 10:11:38 jtauber Exp $ -- +/*-- $Id: TableBody.java,v 1.8 2000/03/07 09:47:32 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -75,15 +75,13 @@ } FontState fs; - int startIndent; - int endIndent; int spaceBefore; int spaceAfter; ColorType backgroundColor; Vector columns; - BlockArea blockArea; + AreaContainer areaContainer; public TableBody(FObj parent, PropertyList propertyList) { super(parent, propertyList); @@ -111,10 +109,6 @@ this.fs = new FontState(area.getFontInfo(), fontFamily, fontStyle, fontWeight, fontSize); - this.startIndent = - this.properties.get("start-indent").getLength().mvalue(); - this.endIndent = - this.properties.get("end-indent").getLength().mvalue(); this.spaceBefore = this.properties.get("space-before.optimum").getLength().mvalue(); this.spaceAfter = @@ -138,44 +132,36 @@ area.addDisplaySpace(spaceBefore); } - this.blockArea = - new BlockArea(fs, area.getAllocationWidth(), - area.spaceLeft(), startIndent, endIndent, 0, - 0, 0, 0); - blockArea.setPage(area.getPage()); - blockArea.setBackgroundColor(backgroundColor); - blockArea.start(); + this.areaContainer = + new AreaContainer(fs, -area.borderWidthLeft, -area.borderWidthTop, area.getAllocationWidth(), + area.spaceLeft(), Position.RELATIVE); + areaContainer.setPage(area.getPage()); + areaContainer.setBackgroundColor(backgroundColor); + areaContainer.start(); int numChildren = this.children.size(); for (int i = this.marker; i < numChildren; i++) { TableRow row = (TableRow) children.elementAt(i); - //if (this.isInListBody) { - //fo.setIsInListBody(); - //fo.setDistanceBetweenStarts(this.distanceBetweenStarts); - //fo.setBodyIndent(this.bodyIndent); - //} - row.setColumns(columns); Status status; - if ((status = row.layout(blockArea)).isIncomplete()) { + if ((status = row.layout(areaContainer)).isIncomplete()) { this.marker = i; if ((i != 0) && (status.getCode() == Status.AREA_FULL_NONE)) { status = new Status(Status.AREA_FULL_SOME); } - //blockArea.end(); - area.addChild(blockArea); - area.increaseHeight(blockArea.getHeight()); + area.addChild(areaContainer); + //areaContainer.end(); + area.increaseHeight(areaContainer.getHeight()); return status; } } - - blockArea.end(); - area.addChild(blockArea); + area.addChild(areaContainer); + areaContainer.end(); /* should this be combined into above? */ - area.increaseHeight(blockArea.getHeight()); + area.increaseHeight(areaContainer.getHeight()); if (spaceAfter != 0) { area.addDisplaySpace(spaceAfter); @@ -189,6 +175,6 @@ } public int getAreaHeight() { - return blockArea.getHeight(); + return areaContainer.getHeight(); } } 1.11 +55 -28 xml-fop/src/org/apache/fop/fo/flow/TableCell.java Index: TableCell.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableCell.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- TableCell.java 1999/11/27 10:11:38 1.10 +++ TableCell.java 2000/03/07 09:47:33 1.11 @@ -1,4 +1,4 @@ -/*-- $Id: TableCell.java,v 1.10 1999/11/27 10:11:38 jtauber Exp $ -- +/*-- $Id: TableCell.java,v 1.11 2000/03/07 09:47:33 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -70,18 +70,25 @@ return new TableCell.Maker(); } - FontState fs; - int startIndent; - int endIndent; int spaceBefore; int spaceAfter; ColorType backgroundColor; + FontState fs; + ColorType borderColor; + int borderWidth; + int borderStyle; + int paddingTop; + int paddingBottom; + int paddingLeft; + int paddingRight; + int position; + protected int startOffset; protected int width; protected int height = 0; - BlockArea blockArea; + AreaContainer areaContainer; public TableCell(FObj parent, PropertyList propertyList) { super(parent, propertyList); @@ -113,10 +120,28 @@ this.fs = new FontState(area.getFontInfo(), fontFamily, fontStyle, fontWeight, fontSize); - this.startIndent = - this.properties.get("start-indent").getLength().mvalue(); - this.endIndent = - this.properties.get("end-indent").getLength().mvalue(); + this.borderColor = + this.properties.get("border-color").getColorType(); + this.borderWidth = + this.properties.get("border-width").getLength().mvalue(); + this.borderStyle = + this.properties.get("border-style").getEnum(); + this.paddingTop = + this.properties.get("padding").getLength().mvalue(); + this.paddingLeft = this.paddingTop; + this.paddingRight = this.paddingTop; + this.paddingBottom = this.paddingTop; + if (this.paddingTop == 0) { + this.paddingTop = + this.properties.get("padding-top").getLength().mvalue(); + this.paddingLeft = + this.properties.get("padding-left").getLength().mvalue(); + this.paddingBottom = + this.properties.get("padding-bottom").getLength().mvalue(); + this.paddingRight = + this.properties.get("padding-right").getLength().mvalue(); + } + this.spaceBefore = this.properties.get("space-before.optimum").getLength().mvalue(); this.spaceAfter = @@ -140,25 +165,26 @@ area.addDisplaySpace(spaceBefore); } - this.blockArea = - new BlockArea(fs, area.getAllocationWidth(), - area.spaceLeft(), startIndent, endIndent, 0, - 0, 0, 0); - blockArea.setPage(area.getPage()); - blockArea.setBackgroundColor(backgroundColor); - blockArea.start(); + this.areaContainer = + new AreaContainer(fs, startOffset - area.borderWidthLeft, + - area.borderWidthTop, + width, area.spaceLeft(), Position.RELATIVE); + areaContainer.setPage(area.getPage()); + areaContainer.setPadding(paddingTop, paddingLeft, paddingBottom, + paddingRight); + areaContainer.setBackgroundColor(backgroundColor); + areaContainer.setBorderStyle(borderStyle, borderStyle, borderStyle, borderStyle); + areaContainer.setBorderWidth(borderWidth, borderWidth, borderWidth, borderWidth); + areaContainer.setBorderColor(borderColor, borderColor, borderColor, borderColor); + areaContainer.start(); - // added by Eric Schaeffer - height = 0; - int numChildren = this.children.size(); for (int i = this.marker; i < numChildren; i++) { FObj fo = (FObj) children.elementAt(i); fo.setIsInTableCell(); - fo.forceStartOffset(startOffset); fo.forceWidth(width); Status status; - if ((status = fo.layout(blockArea)).isIncomplete()) { + if ((status = fo.layout(areaContainer)).isIncomplete()) { this.marker = i; if ((i == 0) && (status.getCode() == Status.AREA_FULL_NONE)) { return new Status(Status.AREA_FULL_NONE); @@ -166,18 +192,19 @@ return new Status(Status.AREA_FULL_SOME); } } - // bug fix from Eric Schaeffer - // height += blockArea.getHeight(); - height = blockArea.getHeight(); - } - blockArea.end(); - area.addChild(blockArea); + areaContainer.end(); + area.addChild(areaContainer); return new Status(Status.OK); } public int getHeight() { - return height; + return areaContainer.getHeight();; + } + + public void setHeight(int height) { + areaContainer.setMaxHeight(height); + areaContainer.setHeight(height); } } 1.7 +66 -2 xml-fop/src/org/apache/fop/fo/flow/TableColumn.java Index: TableColumn.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableColumn.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TableColumn.java 1999/11/25 17:33:13 1.6 +++ TableColumn.java 2000/03/07 09:47:33 1.7 @@ -1,4 +1,4 @@ -/*-- $Id: TableColumn.java,v 1.6 1999/11/25 17:33:13 jtauber Exp $ -- +/*-- $Id: TableColumn.java,v 1.7 2000/03/07 09:47:33 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -56,9 +56,20 @@ import org.apache.fop.fo.properties.*; import org.apache.fop.layout.*; import org.apache.fop.apps.FOPException; +import org.apache.fop.datatypes.*; public class TableColumn extends FObj { + FontState fs; + ColorType backgroundColor; + ColorType borderColor; + int borderWidth; + int borderStyle; + int columnWidth; + int columnOffset; + + AreaContainer areaContainer; + public static class Maker extends FObj.Maker { public FObj make(FObj parent, PropertyList propertyList) throws FOPException { @@ -76,10 +87,63 @@ } public int getColumnWidth() { - return this.properties.get("column-width").getLength().mvalue(); + return columnWidth; } public int getColumnNumber() { return 0; // not implemented yet } + + public Status layout(Area area) throws FOPException { + if (this.marker == BREAK_AFTER) { + return new Status(Status.OK); + } + + if (this.marker == START) { + String fontFamily = + this.properties.get("font-family").getString(); + String fontStyle = + this.properties.get("font-style").getString(); + String fontWeight = + this.properties.get("font-weight").getString(); + int fontSize = + this.properties.get("font-size").getLength().mvalue(); + + this.fs = new FontState(area.getFontInfo(), fontFamily, + fontStyle, fontWeight, fontSize); + this.backgroundColor = + this.properties.get("background-color").getColorType(); + this.borderColor = + this.properties.get("border-color").getColorType(); + this.borderWidth = + this.properties.get("border-width").getLength().mvalue(); + this.borderStyle = + this.properties.get("border-style").getEnum(); + this.columnWidth = + this.properties.get("column-width").getLength().mvalue(); + } + + this.areaContainer = + new AreaContainer(fs, columnOffset - area.borderWidthLeft, -area.borderWidthTop, columnWidth, + area.getHeight(), Position.RELATIVE); + areaContainer.setPage(area.getPage()); + areaContainer.setBackgroundColor(backgroundColor); + areaContainer.setBorderStyle(borderStyle, borderStyle, borderStyle, borderStyle); + areaContainer.setBorderWidth(borderWidth, borderWidth, borderWidth, borderWidth); + areaContainer.setBorderColor(borderColor, borderColor, borderColor, borderColor); + areaContainer.setHeight(area.getHeight()); + area.addChild(areaContainer); + + return new Status(Status.OK); + } + + public void setColumnOffset(int columnOffset) { + this.columnOffset = columnOffset; + } + + public void setHeight(int height) { + areaContainer.setMaxHeight(height); + areaContainer.setHeight(height); + } + } 1.10 +34 -28 xml-fop/src/org/apache/fop/fo/flow/TableRow.java Index: TableRow.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableRow.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- TableRow.java 1999/11/27 10:11:38 1.9 +++ TableRow.java 2000/03/07 09:47:33 1.10 @@ -1,4 +1,4 @@ -/*-- $Id: TableRow.java,v 1.9 1999/11/27 10:11:38 jtauber Exp $ -- +/*-- $Id: TableRow.java,v 1.10 2000/03/07 09:47:33 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -75,18 +75,20 @@ } FontState fs; - int startIndent; - int endIndent; int spaceBefore; int spaceAfter; ColorType backgroundColor; + + ColorType borderColor; + int borderWidth; + int borderStyle; int widthOfCellsSoFar = 0; int largestCellHeight = 0; Vector columns; - BlockArea blockArea; + AreaContainer areaContainer; public TableRow(FObj parent, PropertyList propertyList) { super(parent, propertyList); @@ -114,25 +116,23 @@ this.fs = new FontState(area.getFontInfo(), fontFamily, fontStyle, fontWeight, fontSize); - this.startIndent = - this.properties.get("start-indent").getLength().mvalue(); - this.endIndent = - this.properties.get("end-indent").getLength().mvalue(); this.spaceBefore = this.properties.get("space-before.optimum").getLength().mvalue(); this.spaceAfter = this.properties.get("space-after.optimum").getLength().mvalue(); this.backgroundColor = this.properties.get("background-color").getColorType(); + this.borderColor = + this.properties.get("border-color").getColorType(); + this.borderWidth = + this.properties.get("border-width").getLength().mvalue(); + this.borderStyle = + this.properties.get("border-style").getEnum(); if (area instanceof BlockArea) { area.end(); } - //if (this.isInListBody) { - //startIndent += bodyIndent + distanceBetweenStarts; - //} - this.marker = 0; } @@ -141,13 +141,16 @@ area.addDisplaySpace(spaceBefore); } - this.blockArea = - new BlockArea(fs, area.getAllocationWidth(), - area.spaceLeft(), startIndent, endIndent, 0, - 0, 0, 0); - blockArea.setPage(area.getPage()); - blockArea.setBackgroundColor(backgroundColor); - blockArea.start(); + this.areaContainer = + new AreaContainer(fs, -area.borderWidthLeft, -area.borderWidthTop, + area.getAllocationWidth(), + area.spaceLeft(), Position.RELATIVE); + areaContainer.setPage(area.getPage()); + areaContainer.setBackgroundColor(backgroundColor); + areaContainer.setBorderStyle(borderStyle, borderStyle, borderStyle, borderStyle); + areaContainer.setBorderWidth(borderWidth, borderWidth, borderWidth, borderWidth); + areaContainer.setBorderColor(borderColor, borderColor, borderColor, borderColor); + areaContainer.start(); int numChildren = this.children.size(); if (numChildren != columns.size()) { @@ -175,27 +178,30 @@ widthOfCellsSoFar += width; Status status; - if ((status = cell.layout(blockArea)).isIncomplete()) { + if ((status = cell.layout(areaContainer)).isIncomplete()) { this.marker = i; if ((i != 0) && (status.getCode() == Status.AREA_FULL_NONE)) { status = new Status(Status.AREA_FULL_SOME); } - //blockArea.end(); - area.addChild(blockArea); - area.increaseHeight(blockArea.getHeight()); + area.addChild(areaContainer); + //areaContainer.end(); + area.increaseHeight(areaContainer.getHeight()); return status; } int h = cell.getHeight(); - blockArea.addDisplaySpace(-h); if (h > largestCellHeight) { largestCellHeight = h; } - + } + for (int i = 0; i < numChildren; i++) { + TableCell cell = (TableCell)children.elementAt(i); + cell.setHeight(largestCellHeight); } - blockArea.end(); - area.addChild(blockArea); + area.addChild(areaContainer); + areaContainer.end(); + area.setHeight(largestCellHeight); area.addDisplaySpace(largestCellHeight); // bug fix from Eric Schaeffer //area.increaseHeight(largestCellHeight); @@ -212,6 +218,6 @@ } public int getAreaHeight() { - return blockArea.getHeight(); + return areaContainer.getHeight(); } } 1.9 +59 -8 xml-fop/src/org/apache/fop/layout/Area.java Index: Area.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Area.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Area.java 1999/11/30 02:15:22 1.8 +++ Area.java 2000/03/07 09:47:34 1.9 @@ -1,4 +1,4 @@ -/*-- $Id: Area.java,v 1.8 1999/11/30 02:15:22 jtauber Exp $ -- +/*-- $Id: Area.java,v 1.9 2000/03/07 09:47:34 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -74,9 +74,6 @@ protected int allocationWidth; - /* the inner-most area container the area is in */ - protected AreaContainer areaContainer; - /* the page this area is on */ protected Page page; @@ -86,6 +83,19 @@ protected int paddingLeft; protected int paddingBottom; protected int paddingRight; + + public int borderWidthTop; + public int borderWidthLeft; + public int borderWidthRight; + public int borderWidthBottom; + public int borderStyleTop; + public int borderStyleLeft; + public int borderStyleRight; + public int borderStyleBottom; + public ColorType borderColorTop; + public ColorType borderColorLeft; + public ColorType borderColorRight; + public ColorType borderColorBottom; public Area (FontState fontState) { this.fontState = fontState; @@ -94,6 +104,7 @@ public Area (FontState fontState, int allocationWidth, int maxHeight) { this.fontState = fontState; this.allocationWidth = allocationWidth; + this.contentRectangleWidth = allocationWidth; this.maxHeight = maxHeight; } @@ -120,7 +131,7 @@ } public int getAllocationWidth() { - return this.allocationWidth; + return this.allocationWidth - paddingLeft - paddingRight - borderWidthLeft - borderWidthRight; } public Vector getChildren() { @@ -128,19 +139,23 @@ } public int getContentWidth() { - return this.contentRectangleWidth; + return contentRectangleWidth - paddingLeft - paddingRight - borderWidthLeft - borderWidthRight; } public FontState getFontState() { return this.fontState; } - public int getHeight() { + public int getContentHeight() { return this.currentHeight; } + public int getHeight() { + return this.currentHeight + paddingTop + paddingBottom + borderWidthTop + borderWidthBottom; + } + public int getMaxHeight() { - return this.maxHeight; + return this.maxHeight - paddingTop - paddingBottom - borderWidthTop - borderWidthBottom; } public Page getPage() { @@ -195,10 +210,46 @@ this.paddingRight = right; } + public void setBorderWidth(int top, int left, int bottom, int right) { + this.borderWidthTop = top; + this.borderWidthLeft = left; + this.borderWidthBottom = bottom; + this.borderWidthRight = right; + } + + public void setBorderStyle(int top, int left, int bottom, int right) { + this.borderStyleTop = top; + this.borderStyleLeft = left; + this.borderStyleBottom = bottom; + this.borderStyleRight = right; + } + + public void setBorderColor(ColorType top, ColorType left, ColorType bottom, ColorType right) { + this.borderColorTop = top; + this.borderColorLeft = left; + this.borderColorBottom = bottom; + this.borderColorRight = right; + } + public int spaceLeft() { return maxHeight - currentHeight; } public void start() { + } + + public void setHeight(int height) { + if (height > currentHeight) + currentHeight = height; + if (currentHeight > getMaxHeight()) + currentHeight = getMaxHeight(); + } + + public void setMaxHeight(int height) { + this.maxHeight = height; + } + + public Area getParent() { + return this.parent; } } 1.6 +12 -5 xml-fop/src/org/apache/fop/layout/AreaContainer.java Index: AreaContainer.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/AreaContainer.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AreaContainer.java 1999/11/22 02:31:49 1.5 +++ AreaContainer.java 2000/03/07 09:47:34 1.6 @@ -1,4 +1,4 @@ -/*-- $Id: AreaContainer.java,v 1.5 1999/11/22 02:31:49 jtauber Exp $ -- +/*-- $Id: AreaContainer.java,v 1.6 2000/03/07 09:47:34 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -52,6 +52,7 @@ // FOP import org.apache.fop.render.Renderer; +import org.apache.fop.fo.properties.*; // Java import java.util.Vector; @@ -61,22 +62,28 @@ private int xPosition; // should be able to take value 'left' and 'right' too private int yPosition; // should be able to take value 'top' and 'bottom' too + private int position; - AreaContainer(int xPosition, int yPosition, int allocationWidth, int maxHeight) { - super(null, allocationWidth, maxHeight); + public AreaContainer(FontState fontState, int xPosition, int yPosition, int allocationWidth, int maxHeight, int position) { + super(fontState, allocationWidth, maxHeight); this.xPosition = xPosition; this.yPosition = yPosition; + this.position = position; } public void render(Renderer renderer) { renderer.renderAreaContainer(this); } + public int getPosition() { + return position; + } + public int getXPosition() { - return xPosition; + return xPosition + this.paddingLeft + this.borderWidthLeft; } public int getYPosition() { - return yPosition; + return yPosition + this.paddingTop + this.borderWidthTop; } } 1.7 +10 -3 xml-fop/src/org/apache/fop/layout/BlockArea.java Index: BlockArea.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/BlockArea.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- BlockArea.java 1999/12/03 08:12:58 1.6 +++ BlockArea.java 2000/03/07 09:47:34 1.7 @@ -1,4 +1,4 @@ -/*-- $Id: BlockArea.java,v 1.6 1999/12/03 08:12:58 jtauber Exp $ -- +/*-- $Id: BlockArea.java,v 1.7 2000/03/07 09:47:34 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -95,7 +95,8 @@ this.alignLastLine = alignLastLine; this.lineHeight = lineHeight; - this.halfLeading = (lineHeight - fontState.getFontSize())/2; + if (fontState != null) + this.halfLeading = (lineHeight - fontState.getFontSize())/2; } public void render(Renderer renderer) { @@ -182,9 +183,15 @@ } public int getStartIndent() { - return startIndent; + return startIndent + paddingLeft + borderWidthLeft; } + public void setIndents(int startIndent, int endIndent) { + this.startIndent = startIndent; + this.endIndent = endIndent; + this.contentRectangleWidth = allocationWidth - startIndent - endIndent; + } + public int spaceLeft() { return maxHeight - currentHeight; } 1.8 +7 -7 xml-fop/src/org/apache/fop/layout/LineArea.java Index: LineArea.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/LineArea.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- LineArea.java 1999/12/03 08:12:59 1.7 +++ LineArea.java 2000/03/07 09:47:34 1.8 @@ -1,4 +1,4 @@ -/*-- $Id: LineArea.java,v 1.7 1999/12/03 08:12:59 jtauber Exp $ -- +/*-- $Id: LineArea.java,v 1.8 2000/03/07 09:47:34 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -300,7 +300,7 @@ wordWidth = charWidth; if ((finalWidth + spaceWidth + wordWidth) > - this.contentRectangleWidth) { + this.getContentWidth()) { if (overrun) System.err.print(">"); if (this.wrapOption == WrapOption.WRAP) @@
{'source': 'Apache Software Foundation Public Mail Archives'}