Thread: [FOray-commit] SF.net SVN: foray: [8643] trunk/foray (Page 6)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-02-10 16:04:42
|
Revision: 8643
http://svn.sourceforge.net/foray/?rev=8643&view=rev
Author: victormote
Date: 2007-02-10 08:04:40 -0800 (Sat, 10 Feb 2007)
Log Message:
-----------
Add doc for the build environment.
Modified Paths:
--------------
trunk/foray/doc/web/00-rsrc/include/leftmenu-dev.html
trunk/foray/scripts/foray-build.properties
Added Paths:
-----------
trunk/foray/doc/web/dev/env.html
Modified: trunk/foray/doc/web/00-rsrc/include/leftmenu-dev.html
===================================================================
--- trunk/foray/doc/web/00-rsrc/include/leftmenu-dev.html 2007-02-10 15:47:06 UTC (rev 8642)
+++ trunk/foray/doc/web/00-rsrc/include/leftmenu-dev.html 2007-02-10 16:04:40 UTC (rev 8643)
@@ -52,6 +52,12 @@
<tr>
<td class="Bullet1"> </td>
<td class="Menu1">
+ <a class="Menu" href="/dev/env.html">Environment</a>
+ </td>
+ </tr>
+ <tr>
+ <td class="Bullet1"> </td>
+ <td class="Menu1">
<a class="Menu" href="/dev/extensions.html">Extensions</a>
</td>
</tr>
Added: trunk/foray/doc/web/dev/env.html
===================================================================
--- trunk/foray/doc/web/dev/env.html (rev 0)
+++ trunk/foray/doc/web/dev/env.html 2007-02-10 16:04:40 UTC (rev 8643)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+
+<head>
+ <title>FOray: Testing</title>
+ <meta name="content-revised"
+ content="$Date$"/>
+ <!--#include virtual="/00-rsrc/include/standard-head.html" -->
+</head>
+
+<body>
+<!--#include virtual="/00-rsrc/include/leftmenu-dev.html" -->
+
+<h1>FOray: Development Environment</h1>
+
+<h2>Contents</h2>
+<ul>
+ <li><a href="#tools">Tools</a></li>
+ <li><a href="#config">Configuration</a></li>
+ <li><a href="#eclipse">Eclipse IDE Quick-Start</a></li>
+</ul>
+
+<h2><a name="tools"/>Tools</h2>
+<p>The following tools are needed for FOray development:</p>
+<ul>
+ <li>A Java Integrated Development Environment (IDE) running JDK 1.5 or
+ higher.
+ Although it is theoretically possible to develop without an IDE, it is not
+ practical.
+ If you do not have a Java IDE, consider Eclipse, which is free, and suitable
+ for FOray development (see below for details).</li>
+ <li>A Subversion client. Most IDEs have one built-in.</li>
+ <li>Ant</li>
+ <li>Checkstyle</li>
+ <li>JUnit</li>
+</ul>
+
+<h2><a name="config"/>Configuration</h2>
+<p>The problem with configuring development environments for a team of
+developers is that there are differences in the local environments that must be
+handled flexibly.
+And yet, we wish to hard-code as much information as possible, to prevent each
+developer from needing to deal with the details of setting up the various
+projects, finding the libraries, configuring checkstyle, etc.
+To achieve these contradictory goals, FOray uses a centralized build
+configuration properties file and makes that file available through the local
+environment.
+This file is always named "foray-build.properties" and should be placed in a
+directory whose location can be found by java at FORAY_CONFIG.
+The FORAY_CONFIG variable can be set either in your local environment or by
+using the -D switch when starting up your various Java processes, including your
+IDE.
+It is usually easier to set it in your local environment.</p>
+
+<p>A documented, pro-forma example of "foray-build.properties" is located in
+the "scripts" directory.
+Please be sure to set up the various properties noted there.</p>
+
+<h2><a name="eclipse"/>Eclipse IDE Quick-Start</h2>
+<p>Install <a href="http://www.eclipse.org">Eclipse</a>.</p>
+<p>The following Eclipse plugins should be installed:</p>
+<ul>
+ <li><a href="http://eclipse-cs.sourceforge.net/">Eclipse-CS</a>, a checkstyle
+ plugin.
+ After plugin installation, create the Check configuration for FOray.
+ Open the Window/Preferences menu.
+ Select the "Checkstyle" page.
+ Click the "New" button.
+ Select Type "External Configuration".
+ Enter the name "FOray Checkstyle". (Enter this exactly so that the FOray
+ modules will automatically attach to it).
+ Enter the location that corresponds to your
+ ${foray.sandbox}/scripts/checkstyle-config.xml.
+ Click the "Additional Properties" button, and create a property
+ "foray.sandbox" which points to your ${foray.sandbox}.
+ (This is necessary because there is no way to tell Eclipse-CS to read your
+ foray-build.properties file.)</li>
+</ul>
+
+
+<!--#include virtual="/00-rsrc/include/leftmenu-end.html" -->
+</body>
+</html>
Property changes on: trunk/foray/doc/web/dev/env.html
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Modified: trunk/foray/scripts/foray-build.properties
===================================================================
--- trunk/foray/scripts/foray-build.properties 2007-02-10 15:47:06 UTC (rev 8642)
+++ trunk/foray/scripts/foray-build.properties 2007-02-10 16:04:40 UTC (rev 8643)
@@ -1,8 +1,9 @@
# This is a default Java properties file for the FOray build.
# 1. It is accessed from FOray build.xml files to obtain property values that
# are customized to a particular environment.
-# 2. It can be modified in place or it can be copied to another location and
-# modified there.
+# 2. It should be copied to another location and modified there.
+# Please do not modify it in-place, as it may then be accidentally checked
+# in to the repository.
# 3. For the build scripts to find it in another location, the file name must
# remain "foray-build.properties" and the FORAY_CONFIG environment
# variable must be set to the directory in which the properties file is
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-10 17:04:34
|
Revision: 8645
http://svn.sourceforge.net/foray/?rev=8645&view=rev
Author: victormote
Date: 2007-02-10 09:04:30 -0800 (Sat, 10 Feb 2007)
Log Message:
-----------
Remove some more JAI references.
Modified Paths:
--------------
trunk/foray/resource/fo-examples/basic/images.fo
trunk/foray/resource/fo-examples/runtests.bat
trunk/foray/scripts/build.xml
Modified: trunk/foray/resource/fo-examples/basic/images.fo
===================================================================
--- trunk/foray/resource/fo-examples/basic/images.fo 2007-02-10 16:21:59 UTC (rev 8644)
+++ trunk/foray/resource/fo-examples/basic/images.fo 2007-02-10 17:04:30 UTC (rev 8645)
@@ -119,8 +119,7 @@
font-weight="bold"
space-before.minimum="1em"
space-before.optimum="1.5em"
- space-before.maximum="2em">A TIFF image (Only works with
-JAI!)</fo:block>
+ space-before.maximum="2em">A TIFF image</fo:block>
<fo:block>
<fo:external-graphic src="url('../graphics/xml_fax.tif')"/>
</fo:block>
Modified: trunk/foray/resource/fo-examples/runtests.bat
===================================================================
--- trunk/foray/resource/fo-examples/runtests.bat 2007-02-10 16:21:59 UTC (rev 8644)
+++ trunk/foray/resource/fo-examples/runtests.bat 2007-02-10 17:04:30 UTC (rev 8645)
@@ -13,9 +13,6 @@
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.2.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik.jar
-set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar
-set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar
-set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\..\build\foray.jar
set ANT_HOME=%LIBDIR%
Modified: trunk/foray/scripts/build.xml
===================================================================
--- trunk/foray/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
+++ trunk/foray/scripts/build.xml 2007-02-10 17:04:30 UTC (rev 8645)
@@ -15,9 +15,6 @@
<property name="build.javadoc.api" value="${build.dir}/javadoc/api"/>
<property name="build.javadoc.full" value="${build.dir}/javadoc/full"/>
- <!-- Set defaults for other properties. -->
- <property name="jai.libs" location="${lib.dir}"/>
-
</target>
<!-- =================================================================== -->
@@ -348,9 +345,6 @@
<fileset dir="${ant.home}/lib">
<include name="*.jar"/>
</fileset>
- <fileset dir="${jai.libs}">
- <include name="jai*.jar"/>
- </fileset>
</path>
<javadoc
@@ -809,7 +803,7 @@
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
-
+
<!-- =================================================================== -->
<!-- Build the Core module -->
<!-- =================================================================== -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-10 16:36:43
|
Revision: 8644
http://svn.sourceforge.net/foray/?rev=8644&view=rev
Author: victormote
Date: 2007-02-10 08:21:59 -0800 (Sat, 10 Feb 2007)
Log Message:
-----------
Use foray.sandbox property instead of foray.home for build-oriented work.
Modified Paths:
--------------
trunk/foray/foray-app/scripts/build.xml
trunk/foray/foray-areatree/scripts/build.xml
trunk/foray/foray-common/scripts/build.xml
trunk/foray/foray-core/scripts/build.xml
trunk/foray/foray-font/scripts/build.xml
trunk/foray/foray-fotree/scripts/build.xml
trunk/foray/foray-graphic/scripts/build.xml
trunk/foray/foray-hyphen-r/scripts/build.xml
trunk/foray/foray-layout/scripts/build.xml
trunk/foray/foray-mif/scripts/build.xml
trunk/foray/foray-output/scripts/build.xml
trunk/foray/foray-pdf/scripts/build.xml
trunk/foray/foray-pioneer/scripts/build.xml
trunk/foray/foray-pretty/scripts/build.xml
trunk/foray/foray-ps/scripts/build.xml
trunk/foray/foray-render/scripts/build.xml
trunk/foray/foray-text/scripts/build.xml
trunk/foray/scripts/build-common.xml
trunk/foray/scripts/build.xml
Modified: trunk/foray/foray-app/scripts/build.xml
===================================================================
--- trunk/foray/foray-app/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-app/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="app"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -31,46 +31,46 @@
<fileset dir="${build.lib.dir}">
<include name="junit/*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-core/build/ant">
+ <fileset dir="${foray.sandbox}/foray-core/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-font/build/ant">
+ <fileset dir="${foray.sandbox}/foray-font/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-ps/build/ant">
+ <fileset dir="${foray.sandbox}/foray-ps/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-graphic/build/ant">
+ <fileset dir="${foray.sandbox}/foray-graphic/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-pdf/build/ant">
+ <fileset dir="${foray.sandbox}/foray-pdf/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-hyphen-r/build/ant">
+ <fileset dir="${foray.sandbox}/foray-hyphen-r/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-text/build/ant">
+ <fileset dir="${foray.sandbox}/foray-text/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-fotree/build/ant">
+ <fileset dir="${foray.sandbox}/foray-fotree/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-areatree/build/ant">
+ <fileset dir="${foray.sandbox}/foray-areatree/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-layout/build/ant">
+ <fileset dir="${foray.sandbox}/foray-layout/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-pioneer/build/ant">
+ <fileset dir="${foray.sandbox}/foray-pioneer/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-output/build/ant">
+ <fileset dir="${foray.sandbox}/foray-output/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-render/build/ant">
+ <fileset dir="${foray.sandbox}/foray-render/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-areatree/scripts/build.xml
===================================================================
--- trunk/foray/foray-areatree/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-areatree/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="areatree"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -27,7 +27,7 @@
<include name="axsl*.jar"/>
<include name="commons-logging.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-common/scripts/build.xml
===================================================================
--- trunk/foray/foray-common/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-common/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="common"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
Modified: trunk/foray/foray-core/scripts/build.xml
===================================================================
--- trunk/foray/foray-core/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-core/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="core"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -27,7 +27,7 @@
<include name="xml-apis-1.3.02.jar"/>
<include name="xercesImpl-2.7.1.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-font/scripts/build.xml
===================================================================
--- trunk/foray/foray-font/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-font/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="font"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -33,13 +33,13 @@
<include name="commons-logging.jar"/>
<include name="xml-apis*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-pretty/build/ant">
+ <fileset dir="${foray.sandbox}/foray-pretty/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-ps/build/ant">
+ <fileset dir="${foray.sandbox}/foray-ps/build/ant">
<include name="*.jar"/>
</fileset>
</path>
@@ -91,7 +91,7 @@
location="${build.dir}/${name.lowercase}-${module}-${version}-rsrc.jar"/>
<fileset id="foray-font-resources"
- dir="${foray.home}/${name.lowercase}-${module}/build/ant/resource">
+ dir="${foray.sandbox}/${name.lowercase}-${module}/build/ant/resource">
<include name="**"/>
</fileset>
Modified: trunk/foray/foray-fotree/scripts/build.xml
===================================================================
--- trunk/foray/foray-fotree/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-fotree/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="fotree"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -30,7 +30,7 @@
<include name="axsl*.jar"/>
<include name="commons-logging.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-graphic/scripts/build.xml
===================================================================
--- trunk/foray/foray-graphic/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-graphic/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="graphic"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -28,7 +28,7 @@
<include name="commons-logging.jar"/>
<include name="xmlgraphics-commons-*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-hyphen-r/scripts/build.xml
===================================================================
--- trunk/foray/foray-hyphen-r/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-hyphen-r/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="hyphen-r"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -33,7 +33,7 @@
<include name="axsl*.jar"/>
<include name="commons-logging.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
</path>
@@ -74,7 +74,7 @@
<property name="hyphen.resource.jar.file"
location="${build.dir}/${name.lowercase}-${module}-${version}-rsrc.jar"/>
<fileset id="foray-hyphen-resources"
- dir="${foray.home}/foray-hyphen-r/build/ant/resource">
+ dir="${foray.sandbox}/foray-hyphen-r/build/ant/resource">
<include name="**"/>
</fileset>
<jar jarfile="${hyphen.resource.jar.file}">
@@ -119,7 +119,7 @@
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
<fileset id="foray-hyphen-classes"
- dir="${foray.home}/foray-hyphen-r/build/ant/classes">
+ dir="${foray.sandbox}/foray-hyphen-r/build/ant/classes">
<include name="**"/>
</fileset>
<jar jarfile="${jar.file}">
Modified: trunk/foray/foray-layout/scripts/build.xml
===================================================================
--- trunk/foray/foray-layout/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-layout/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="layout"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -24,7 +24,7 @@
<fileset dir="${lib.dir}">
<include name="commons-logging.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-mif/scripts/build.xml
===================================================================
--- trunk/foray/foray-mif/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-mif/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="mif"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -26,7 +26,7 @@
<include name="axsl*.jar"/>
<include name="commons-logging.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-output/scripts/build.xml
===================================================================
--- trunk/foray/foray-output/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-output/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="output"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -25,10 +25,10 @@
<include name="axsl*.jar"/>
<include name="commons-logging.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-mif/build/ant">
+ <fileset dir="${foray.sandbox}/foray-mif/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-pdf/scripts/build.xml
===================================================================
--- trunk/foray/foray-pdf/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-pdf/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -13,7 +13,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="pdf"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -29,10 +29,10 @@
<include name="batik*.jar"/>
<include name="commons-logging.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-ps/build/ant">
+ <fileset dir="${foray.sandbox}/foray-ps/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-pioneer/scripts/build.xml
===================================================================
--- trunk/foray/foray-pioneer/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-pioneer/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="pioneer"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -27,10 +27,10 @@
<include name="axsl*.jar"/>
<include name="commons-logging.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-layout/build/ant">
+ <fileset dir="${foray.sandbox}/foray-layout/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-pretty/scripts/build.xml
===================================================================
--- trunk/foray/foray-pretty/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-pretty/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="pretty"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -27,7 +27,7 @@
<include name="resolver*.jar"/>
<include name="xercesImpl*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-ps/scripts/build.xml
===================================================================
--- trunk/foray/foray-ps/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-ps/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="ps"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -28,7 +28,7 @@
<include name="axsl*.jar"/>
<include name="commons-logging.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-render/scripts/build.xml
===================================================================
--- trunk/foray/foray-render/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-render/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="render"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -34,13 +34,13 @@
<include name="axsl*.jar"/>
<include name="commons-logging.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-ps/build/ant">
+ <fileset dir="${foray.sandbox}/foray-ps/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-output/build/ant">
+ <fileset dir="${foray.sandbox}/foray-output/build/ant">
<include name="*.jar"/>
</fileset>
</path>
Modified: trunk/foray/foray-text/scripts/build.xml
===================================================================
--- trunk/foray/foray-text/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/foray-text/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -10,7 +10,7 @@
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
<property name="module" value="text"/>
- <property name="module.dir" value="${foray.home}/foray-${module}"/>
+ <property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
@@ -28,7 +28,7 @@
<include name="axsl*.jar"/>
<include name="commons-logging.jar"/>
</fileset>
- <fileset dir="${foray.home}/foray-common/build/ant">
+ <fileset dir="${foray.sandbox}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
</path>
@@ -75,7 +75,7 @@
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
<fileset id="foray-text-classes"
- dir="${foray.home}/foray-text/build/ant/classes">
+ dir="${foray.sandbox}/foray-text/build/ant/classes">
<include name="**"/>
</fileset>
<jar jarfile="${jar.file}">
Modified: trunk/foray/scripts/build-common.xml
===================================================================
--- trunk/foray/scripts/build-common.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/scripts/build-common.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -22,14 +22,14 @@
<!-- Retrieve externally-configured properties. -->
<property file="${foray.config}/foray-build.properties"/>
- <!-- Get a default for {foray.home}. -->
- <property name="foray.home" location=".."/>
- <echo>foray.home: ${foray.home}</echo>
+ <!-- Get a default for {foray.sandbox}. -->
+ <property name="foray.sandbox" location=".."/>
+ <echo>foray.sandbox: ${foray.sandbox}</echo>
<!-- Set up dependent properties. -->
- <property name="lib.dir" location="${foray.home}/lib"/>
+ <property name="lib.dir" location="${foray.sandbox}/lib"/>
<property name="axsl.build" location="${lib.dir}"/>
- <property name="build.lib.dir" location="${foray.home}/lib-build"/>
+ <property name="build.lib.dir" location="${foray.sandbox}/lib-build"/>
</target>
Modified: trunk/foray/scripts/build.xml
===================================================================
--- trunk/foray/scripts/build.xml 2007-02-10 16:04:40 UTC (rev 8643)
+++ trunk/foray/scripts/build.xml 2007-02-10 16:21:59 UTC (rev 8644)
@@ -9,8 +9,8 @@
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
- <property name="src.dir" value="${foray.home}/src"/>
- <property name="build.dir" value="${foray.home}/build"/>
+ <property name="src.dir" value="${foray.sandbox}/src"/>
+ <property name="build.dir" value="${foray.sandbox}/build"/>
<property name="distrib.dir" location="${build.dir}/distribution"/>
<property name="build.javadoc.api" value="${build.dir}/javadoc/api"/>
<property name="build.javadoc.full" value="${build.dir}/javadoc/full"/>
@@ -27,24 +27,24 @@
<!-- create directories -->
<echo message="Preparing the build directories"/>
<mkdir dir="${build.dir}"/>
- <mkdir dir="${foray.home}/foray-common/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-pretty/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-graphic/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-mif/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-ps/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-pdf/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-font/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-hyphen-r/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-hyphen-r/build/ant"/>
- <mkdir dir="${foray.home}/foray-text/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-fotree/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-areatree/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-layout/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-pioneer/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-output/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-render/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-core/build/ant/classes"/>
- <mkdir dir="${foray.home}/foray-app/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-common/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-pretty/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-graphic/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-mif/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-ps/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-pdf/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-font/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-hyphen-r/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-hyphen-r/build/ant"/>
+ <mkdir dir="${foray.sandbox}/foray-text/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-fotree/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-areatree/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-layout/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-pioneer/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-output/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-render/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-core/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-app/build/ant/classes"/>
</target>
<!-- =================================================================== -->
@@ -76,71 +76,71 @@
</tstamp>
<fileset id="foray-common-classes"
- dir="${foray.home}/foray-common/build/ant/classes">
+ dir="${foray.sandbox}/foray-common/build/ant/classes">
<include name="**"/>
</fileset>
<fileset id="foray-pretty-classes"
- dir="${foray.home}/foray-pretty/build/ant/classes">
+ dir="${foray.sandbox}/foray-pretty/build/ant/classes">
<include name="**"/>
</fileset>
<fileset id="foray-graphic-classes"
- dir="${foray.home}/foray-graphic/build/ant/classes">
+ dir="${foray.sandbox}/foray-graphic/build/ant/classes">
<include name="**"/>
</fileset>
<fileset id="foray-mif-classes"
- dir="${foray.home}/foray-mif/build/ant/classes">
+ dir="${foray.sandbox}/foray-mif/build/ant/cla...
[truncated message content] |
|
From: <vic...@us...> - 2007-02-10 18:23:05
|
Revision: 8648
http://svn.sourceforge.net/foray/?rev=8648&view=rev
Author: victormote
Date: 2007-02-10 10:23:03 -0800 (Sat, 10 Feb 2007)
Log Message:
-----------
Remove unneeded parameter from the FOrayGraphicServer constructor.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/FOrayGraphicServer.java
trunk/foray/foray-graphic/src/javatest/org/foray/graphic/TestAbstractGraphic.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2007-02-10 18:20:25 UTC (rev 8647)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2007-02-10 18:23:03 UTC (rev 8648)
@@ -30,7 +30,6 @@
import org.foray.area.FOrayAreaTreeFactory;
import org.foray.common.Logging;
-import org.foray.common.XMLParser;
import org.foray.common.url.URLFactory;
import org.foray.core.FOrayException;
import org.foray.core.FOraySession;
@@ -144,7 +143,7 @@
public static GraphicServer makeGraphicServer(final Log logger)
throws FOrayException {
- return new FOrayGraphicServer(logger, XMLParser.getParserClassName());
+ return new FOrayGraphicServer(logger);
}
public static FOTreeFactory makeFOTreeFactory(final Log logger,
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/FOrayGraphicServer.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/FOrayGraphicServer.java 2007-02-10 18:20:25 UTC (rev 8647)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/FOrayGraphicServer.java 2007-02-10 18:23:03 UTC (rev 8648)
@@ -29,6 +29,7 @@
package org.foray.graphic;
import org.foray.common.Logging;
+import org.foray.common.XMLParser;
import org.foray.common.url.URLUtil;
import org.foray.graphic.factory.BMPFactory;
import org.foray.graphic.factory.EPSFactory;
@@ -89,16 +90,13 @@
/**
* Constructor.
* @param logger The logger.
- * @param svgParserClassName The name of the class that should be used to
- * parse SVG files.
*/
- public FOrayGraphicServer(final Log logger,
- final String svgParserClassName) {
+ public FOrayGraphicServer(final Log logger) {
this.logger = logger;
if (this.logger == null) {
this.logger = Logging.makeDefaultLogger();
}
- this.svgParserClassName = svgParserClassName;
+ this.svgParserClassName = XMLParser.getParserClassName();
registerStandardFactories();
}
Modified: trunk/foray/foray-graphic/src/javatest/org/foray/graphic/TestAbstractGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/javatest/org/foray/graphic/TestAbstractGraphic.java 2007-02-10 18:20:25 UTC (rev 8647)
+++ trunk/foray/foray-graphic/src/javatest/org/foray/graphic/TestAbstractGraphic.java 2007-02-10 18:23:03 UTC (rev 8648)
@@ -53,7 +53,7 @@
* @throws IOException For any errors reading the build properties.
*/
public void setUp() throws IOException {
- this.server = new FOrayGraphicServer(null, null);
+ this.server = new FOrayGraphicServer(null);
final Properties buildProperties = Environment.getBuildProperties();
final String foraySandbox = buildProperties.getProperty(
"foray.sandbox");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-12 19:31:18
|
Revision: 8689
http://svn.sourceforge.net/foray/?rev=8689&view=rev
Author: victormote
Date: 2007-02-12 11:16:13 -0800 (Mon, 12 Feb 2007)
Log Message:
-----------
Conform to axsl change: Have hyphenation return a byte array instead of an int array.
Modified Paths:
--------------
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/FOrayHyphenation.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/MorphHyphenation.java
trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/FOrayHyphenation.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/FOrayHyphenation.java 2007-02-12 18:39:46 UTC (rev 8688)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/FOrayHyphenation.java 2007-02-12 19:16:13 UTC (rev 8689)
@@ -52,7 +52,7 @@
/** The hyphenation points for the word. See {@link #hyphenValues} for the
* weights. */
- private int[] hyphenPoints;
+ private byte[] hyphenPoints;
/** The Liang weights that correspond to {@link #hyphenPoints}. */
private byte[] hyphenValues;
@@ -64,7 +64,7 @@
* @param values The Liang weights that correspond to
* <code>hyphenPoints</code>.
*/
- FOrayHyphenation(final String word, final int[] points,
+ FOrayHyphenation(final String word, final byte[] points,
final byte[] values) {
this.word = word;
this.hyphenPoints = points;
@@ -82,7 +82,7 @@
* @return The newly created {@link FOrayHyphenation} variant.
*/
static FOrayHyphenation makeHyphenation(final String word,
- final int[] points, final byte[] values,
+ final byte[] points, final byte[] values,
final int qtySpecialBreaks) {
if (qtySpecialBreaks > 0) {
try {
@@ -98,7 +98,7 @@
/**
* {@inheritDoc}
*/
- public int[] getPoints() {
+ public byte[] getPoints() {
return this.hyphenPoints;
}
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2007-02-12 18:39:46 UTC (rev 8688)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2007-02-12 19:16:13 UTC (rev 8689)
@@ -405,11 +405,11 @@
* @throws HyphenationException For invalid qtyMorphExceptions.
*/
private FOrayHyphenation createHyphenation(final String theWord,
- final int[] points, final byte[] values, final int k,
+ final byte[] points, final byte[] values, final int k,
final int qtyMorphExceptions) throws HyphenationException {
if (k > 0) {
/* Trim result array and create the hyphenation instance. */
- final int[] returnPoints = new int[k];
+ final byte[] returnPoints = new byte[k];
System.arraycopy(points, 0, returnPoints, 0, k);
final byte[] returnValues = new byte[k];
System.arraycopy(values, 0, returnValues, 0, k);
@@ -483,7 +483,7 @@
searchPatterns(testChars, i, interletterValues);
}
- final int[] result = new int[len + 1];
+ final byte[] result = new byte[len + 1];
final byte[] values = new byte[result.length];
int k = 0;
for (int i = 0; i < len; i++) {
@@ -491,7 +491,7 @@
final boolean reportValue = reportValue(interletterValue, i, len,
remainCharCount, pushCharCount, includeInhibitors);
if (reportValue) {
- result[k] = i;
+ result[k] = (byte) i;
values[k] = interletterValue;
k++;
}
@@ -579,7 +579,7 @@
}
/* Create the points array. */
- final int[] points = new int[qtyOpportunities];
+ final byte[] points = new byte[qtyOpportunities];
int index = 0;
for (int i = 0; i < hyphenatedWord.length(); i++) {
if (hyphenatedWord.charAt(i) == this.hyphenChar
@@ -587,7 +587,7 @@
&& i < hyphenatedWord.length() - this.minAfter) {
/* Subtract the index from the value, because the hyphen
* characters will be */
- points[index] = i - index;
+ points[index] = (byte) (i - index);
index ++;
}
}
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/MorphHyphenation.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/MorphHyphenation.java 2007-02-12 18:39:46 UTC (rev 8688)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/MorphHyphenation.java 2007-02-12 19:16:13 UTC (rev 8689)
@@ -60,7 +60,7 @@
* @throws HyphenationException If <code>qtySpecialBreaks</code> is less
* than 1.
*/
- MorphHyphenation(final String word, final int[] points,
+ MorphHyphenation(final String word, final byte[] points,
final byte[] values, final int qtySpecialBreaks)
throws HyphenationException {
super(word, points, values);
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2007-02-12 18:39:46 UTC (rev 8688)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2007-02-12 19:16:13 UTC (rev 8689)
@@ -426,7 +426,7 @@
- this.finalWidth
- this.spaceWidth - getHyphenWidth(this.currentLineText);
- final int[] hyphenationPoints = hyph.getPoints();
+ final byte[] hyphenationPoints = hyph.getPoints();
final byte[] hyphenationWeights = hyph.getWeights();
int index = -1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-12 20:56:25
|
Revision: 8692
http://svn.sourceforge.net/foray/?rev=8692&view=rev
Author: victormote
Date: 2007-02-12 12:56:12 -0800 (Mon, 12 Feb 2007)
Log Message:
-----------
Update library jar file containing parsed hyphenation patterns.
Modified Paths:
--------------
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java
trunk/foray/lib/foray-hyphen-r-0.3-rsrc.jar
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2007-02-12 20:30:47 UTC (rev 8691)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2007-02-12 20:56:12 UTC (rev 8692)
@@ -101,15 +101,9 @@
/**
* <p>The vector of interletter values for the Liang patterns.
- * These have no meaning apart from the {@link TernaryTree} information that
- * is stored in the superclass.
- * That map (which is not to be confused with the encapsulated
- * {@link TernaryTree} used to store {@link #classes}) maps the pattern
- * strings to a char index.
- * That char index is the index into this vector of pattern values.</p>
- *
- * <p>The pattern values themselves are stored as bytes, and are expected
- * to be in the range of 0x01 through 0x05.</p>
+ * The keys to this vector are in {@link patternKeys}.
+ * The pattern values themselves are stored as bytes, and are expected to be
+ * in the range of 0x01 through 0x05.</p>
*/
private ByteVector patternValues = new ByteVector();
@@ -121,7 +115,7 @@
private TernaryTree classes = new TernaryTree();
/** Temporary map to store interletter values during pattern loading. */
- private transient TernaryTree ivalues;
+ private transient TernaryTree tempInterletterValues;
/**
* Constructor.
@@ -185,7 +179,7 @@
void loadPatterns(final URL url, final Log logger)
throws HyphenationException {
final PatternParser pp = new PatternParser(this, logger);
- ivalues = new TernaryTree();
+ tempInterletterValues = new TernaryTree();
pp.parse(url);
@@ -196,7 +190,7 @@
classes.trimToSize();
// get rid of the auxiliary map
- ivalues = null;
+ tempInterletterValues = null;
}
/**
@@ -639,10 +633,10 @@
final String pattern = getPatternChars(rawPattern);
final String ivalue = getInterletterValues(rawPattern);
- int k = ivalues.find(ivalue);
+ int k = tempInterletterValues.find(ivalue);
if (k <= 0) {
k = packValues(ivalue);
- ivalues.insert(ivalue, (char) k);
+ tempInterletterValues.insert(ivalue, (char) k);
}
this.patternKeys.insert(pattern, (char) k);
}
Modified: trunk/foray/lib/foray-hyphen-r-0.3-rsrc.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-12 22:14:53
|
Revision: 8693
http://svn.sourceforge.net/foray/?rev=8693&view=rev
Author: victormote
Date: 2007-02-12 14:14:52 -0800 (Mon, 12 Feb 2007)
Log Message:
-----------
Add a source code package to our build libraries.
Modified Paths:
--------------
trunk/foray/foray-graphic/.classpath
Added Paths:
-----------
trunk/foray/lib-build/readme.txt
trunk/foray/lib-build/xmlgraphics-commons/
trunk/foray/lib-build/xmlgraphics-commons/xmlgraphics-commons-1.1-src.zip
Modified: trunk/foray/foray-graphic/.classpath
===================================================================
--- trunk/foray/foray-graphic/.classpath 2007-02-12 20:56:12 UTC (rev 8692)
+++ trunk/foray/foray-graphic/.classpath 2007-02-12 22:14:52 UTC (rev 8693)
@@ -8,8 +8,8 @@
<classpathentry kind="src" path="/axslCommon"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/batik.jar"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/commons-logging.jar"/>
- <classpathentry kind="var" path="FORAY_LIB_ROOT/xmlgraphics-commons-1.1.jar" sourcepath="/XMLGRAPHICS_COMMONS_HOME/xmlgraphics-commons-1.1-src.zip"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/commons-io-1.2.jar"/>
<classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
+ <classpathentry kind="lib" path="/FOray Lib/xmlgraphics-commons-1.1.jar" sourcepath="/FOray Lib-Build/xmlgraphics-commons/xmlgraphics-commons-1.1-src.zip"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Added: trunk/foray/lib-build/readme.txt
===================================================================
--- trunk/foray/lib-build/readme.txt (rev 0)
+++ trunk/foray/lib-build/readme.txt 2007-02-12 22:14:52 UTC (rev 8693)
@@ -0,0 +1,15 @@
+The files in this directory contain build-time libraries and source
+code that does not need to be distributed to end-users, but is
+included as a convenience for developers, and to ensure that a certain
+amount of consistency is achieved in the development process.
+
+Yes, we know about Maven and Ivy, etc. and we will likely switch to
+that approach at some time in the future. There is some difficulty
+with that approach unless all resources are available in public
+libraries. For now, our needs are simple enough that this approach
+should be sufficient.
+
+Licenses for some packages in this directory may be found in the
+"lib" directory with the compiled jar files.
+
+# End of memo.
Property changes on: trunk/foray/lib-build/readme.txt
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/lib-build/xmlgraphics-commons/xmlgraphics-commons-1.1-src.zip
===================================================================
(Binary files differ)
Property changes on: trunk/foray/lib-build/xmlgraphics-commons/xmlgraphics-commons-1.1-src.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-13 17:16:36
|
Revision: 8699
http://svn.sourceforge.net/foray/?rev=8699&view=rev
Author: victormote
Date: 2007-02-13 09:16:32 -0800 (Tue, 13 Feb 2007)
Log Message:
-----------
Javadoc improvements.
Modified Paths:
--------------
trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java
trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java
trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2007-02-13 02:01:46 UTC (rev 8698)
+++ trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2007-02-13 17:16:32 UTC (rev 8699)
@@ -71,12 +71,10 @@
// stores string value
private String value = "";
- /**
- * locator for line number information
- */
+ /** Locator for line number information. */
private Locator locator;
- /** inputsource for configuration file */
+ /** Inputsource for configuration file. */
private InputSource filename;
/** The logger that should be used by this parser. */
@@ -129,9 +127,8 @@
}
/**
- * creates a SAX parser
- *
- * @return the created SAX parser
+ * Creates a SAX parser.
+ * @return The created SAX parser.
*/
private XMLReader createParser() throws FOrayException {
try {
@@ -180,8 +177,8 @@
}
/**
- * extracts the element and attribute name and sets the fitting status and
- * datatype values
+ * Extracts the element and attribute name and sets the fitting status and
+ * datatype values.
*/
public void startElement(final String uri, final String localName,
final String qName, final Attributes attributes) {
@@ -205,8 +202,8 @@
} // end startElement
/**
- * stores subentries or entries into their hashes (map for subentries,
- * configuration for entry)
+ * Stores subentries or entries into their hashes (map for subentries,
+ * configuration for entry).
*/
public void endElement(final String uri, final String localName,
final String qName) {
@@ -223,8 +220,8 @@
}
/**
- * extracts characters from text nodes and puts them into their respective
- * variables
+ * Extracts characters from text nodes and puts them into their respective
+ * variables.
*/
public void characters(final char[] ch, final int start, final int length) {
final char characters[] = new char[length];
@@ -238,11 +235,10 @@
value = text;
break;
}
- } // end characters
+ }
/**
- * stores configuration entry into configuration Map according to the role
- *
+ * Stores configuration entry into configuration Map according to the role.
* @param key a string containing the key value for the configuration
* @param value a string containing the value for the configuration
*/
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2007-02-13 02:01:46 UTC (rev 8698)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2007-02-13 17:16:32 UTC (rev 8699)
@@ -280,7 +280,7 @@
}
/**
- * Dumps an error
+ * Dumps an error to the logger.
*/
public void dumpError(final Exception e) {
if (! this.getConfiguration().optionVerbosity().equals("debug")) {
@@ -304,7 +304,7 @@
/**
* Runs the formatting and renderering process using the previously set
- * inputsource and outputstream
+ * inputsource and outputstream.
*/
public synchronized void run()
throws IOException, FOrayException {
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2007-02-13 02:01:46 UTC (rev 8698)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2007-02-13 17:16:32 UTC (rev 8699)
@@ -46,9 +46,8 @@
private String contextMessage;
/**
- * Create a new FOray Exception
- *
- * @param message descriptive message
+ * Create a new FOray Exception.
+ * @param message Descriptive message.
*/
public FOrayException(final String message) {
super(message);
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2007-02-13 02:01:46 UTC (rev 8698)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2007-02-13 17:16:32 UTC (rev 8699)
@@ -82,11 +82,13 @@
/** A GraphicServer instance to be used for this session. */
private GraphicServer graphicServer;
- /** */
+ /** The FOTree factory for this session. */
private FOTreeFactory foTreeFactory;
+ /** The AreaTree factory for this session. */
private AreaTreeFactory areaTreeFactory;
+ /** The default layout factory for this session. */
private LayoutFactory layoutFactory;
/** A SessionConfig instance to be used for this session. */
@@ -223,6 +225,7 @@
}
/**
+ * Returns the font server for this session.
* @return The FontServer instance that is being used in this session.
*/
public FontServer getFontServer() {
@@ -270,6 +273,7 @@
}
/**
+ * Returns the entity resolver for this session.
* @return The EntityResolver that should be used to resolve XML entities.
*/
public EntityResolver getEntityResolver() {
Modified: trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java 2007-02-13 02:01:46 UTC (rev 8698)
+++ trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java 2007-02-13 17:16:32 UTC (rev 8699)
@@ -152,6 +152,7 @@
}
/**
+ * Returns the URL to the font-configuration file.
* @return The URL to the font-configuration file specified, or null if
* none was specified.
*/
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-13 02:01:46 UTC (rev 8698)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-13 17:16:32 UTC (rev 8699)
@@ -14,7 +14,7 @@
files="org.foray.demo.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.area.*"/>
- <suppress checks="Javadoc[MVS].*"
+ <suppress checks="Javadoc[MV].*"
files="org.foray.core.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.fotree.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-13 17:31:46
|
Revision: 8700
http://svn.sourceforge.net/foray/?rev=8700&view=rev
Author: victormote
Date: 2007-02-13 09:31:45 -0800 (Tue, 13 Feb 2007)
Log Message:
-----------
Javadoc improvements.
Modified Paths:
--------------
trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java
trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2007-02-13 17:16:32 UTC (rev 8699)
+++ trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2007-02-13 17:31:45 UTC (rev 8700)
@@ -51,24 +51,35 @@
* Normally this class doesn't need to be accessed directly.
*/
public class ConfigurationParser extends DefaultHandler {
- /*
- * TODO: These should all be changed to boolean values.
- */
+
+ /** Constant indicating that the current status of the parser is outside
+ * of either key or value. */
private static final int OUT = 0;
+
+ /** Constant indicating that the current status of the parser is inside
+ * a key element. */
private static final int IN_KEY = 2;
+
+ /** Constant indicating that the current status of the parser is inside
+ * a value element. */
private static final int IN_VALUE = 4;
- // state of parser
+ /** The current status of the parser, one of {@link #OUT}, {@link #IN_KEY},
+ * or {@link #IN_VALUE}. */
private int status = OUT;
- // store the result configuration
+ /** The session configuration into which the configuration file is being
+ * parsed. */
private SessionConfig sessionConfig;
+
+ /** The output configuration into which the configuration file is being
+ * parsed. */
private Configuration outputConfig;
- // stores key for new config entry
+ /** The current key being processed. */
private String key = "";
- // stores string value
+ /** The current value being processed. */
private String value = "";
/** Locator for line number information. */
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2007-02-13 17:16:32 UTC (rev 8699)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2007-02-13 17:31:45 UTC (rev 8700)
@@ -102,6 +102,7 @@
/** The FO tree builder, which handles the SAX events. */
private org.axsl.foR.FOTree treeBuilder;
+ /** The current target being processed. */
private FOrayTarget currentTarget;
/** The SAX parser. */
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2007-02-13 17:16:32 UTC (rev 8699)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2007-02-13 17:31:45 UTC (rev 8700)
@@ -38,11 +38,18 @@
* Exception thrown when FOray has a problem.
*/
public class FOrayException extends Exception {
+
+ /** Constant needed for serialization. */
static final long serialVersionUID = 298590433713255908L;
+ /** Constant used when formatting exception messages. */
private static final String EXCEPTION_SEPARATOR = "\n---------\n";
+ /** The "caused by" exception, if any. */
private Throwable exception;
+
+ /** The context message, if any. The context message is a message that tells
+ * where in a source document the exception was created. */
private String contextMessage;
/**
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2007-02-13 17:16:32 UTC (rev 8699)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2007-02-13 17:31:45 UTC (rev 8700)
@@ -74,6 +74,7 @@
/** A FontServer instance to be used for this session. */
private FontServer fontServer;
+ /** A HyphenationServer instance to be used for this session. */
private HyphenationServer hyphenServer;
/** A TextServer instance to be used for this session. */
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2007-02-13 17:16:32 UTC (rev 8699)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2007-02-13 17:31:45 UTC (rev 8700)
@@ -69,6 +69,9 @@
and AreaTree when a Page is formatted.<P>
*/
public class FOrayTarget implements FOTreeListener, AreaTreeListener {
+
+ /** Constant indicating whether memory profiling should be performed with
+ * the Java garbage collector. */
private static final boolean MEM_PROFILE_WITH_GC = false;
/** The "parent" FOrayDocument instance. */
@@ -112,8 +115,10 @@
/** The LayoutStrategy implementation to be used for this target. */
private Layout layout;
+ /** The Area Tree instance being processed for this target. */
private org.axsl.areaW.AreaTree areaTree;
+ /** The font consumer for this target. */
private FontConsumer fontConsumer;
public FOrayTarget(final FOrayDocument document,
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-13 17:16:32 UTC (rev 8699)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-13 17:31:45 UTC (rev 8700)
@@ -14,7 +14,7 @@
files="org.foray.demo.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.area.*"/>
- <suppress checks="Javadoc[MV].*"
+ <suppress checks="Javadoc[M].*"
files="org.foray.core.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.fotree.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-13 19:53:02
|
Revision: 8701
http://svn.sourceforge.net/foray/?rev=8701&view=rev
Author: victormote
Date: 2007-02-13 11:52:41 -0800 (Tue, 13 Feb 2007)
Log Message:
-----------
Javadoc improvements.
Modified Paths:
--------------
trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java
trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2007-02-13 17:31:45 UTC (rev 8700)
+++ trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2007-02-13 19:52:41 UTC (rev 8701)
@@ -101,6 +101,8 @@
* file XML that should be parsed.
* @param logger The logger to which errors and other messages
* should be sent.
+ * @throws FOrayException For null <code>sessionConfig</code> or null
+ * <code>outputConfig</code>.
*/
public ConfigurationParser(final SessionConfig sessionConfig,
final Configuration outputConfig, final InputSource source,
@@ -140,6 +142,7 @@
/**
* Creates a SAX parser.
* @return The created SAX parser.
+ * @throws FOrayException For errors during parser creation.
*/
private XMLReader createParser() throws FOrayException {
try {
@@ -163,9 +166,16 @@
}
}
+ /**
+ * Creates and returns an entity resolver.
+ * @param sessionConfig The session configuration, which may contain a
+ * specifier for an XML catalog.
+ * @return The entity resolver, if a catalog has been specified, or null
+ * if not.
+ */
public static EntityResolver makeEntityResolver(
- final SessionConfig configuration) {
- final String catalog = configuration.optionXMLCatalog();
+ final SessionConfig sessionConfig) {
+ final String catalog = sessionConfig.optionXMLCatalog();
if (catalog == null) {
return null;
}
@@ -176,20 +186,21 @@
return resolver;
}
+ /**
+ * {@inheritDoc}
+ */
public void startDocument() {
}
/**
- * Set the locator which is used to report the position of the element
- * in the source document.
+ * {@inheritDoc}
*/
public void setDocumentLocator(final Locator locator) {
this.locator = locator;
}
/**
- * Extracts the element and attribute name and sets the fitting status and
- * datatype values.
+ * {@inheritDoc}
*/
public void startElement(final String uri, final String localName,
final String qName, final Attributes attributes) {
@@ -210,11 +221,10 @@
// to make sure that user knows about false tag
logger.error(getFormattedLocation() + "\nUnknown tag in "
+ "configuration file: " + localName);
- } // end startElement
+ }
/**
- * Stores subentries or entries into their hashes (map for subentries,
- * configuration for entry).
+ * {@inheritDoc}
*/
public void endElement(final String uri, final String localName,
final String qName) {
@@ -231,8 +241,7 @@
}
/**
- * Extracts characters from text nodes and puts them into their respective
- * variables.
+ * {@inheritDoc}
*/
public void characters(final char[] ch, final int start, final int length) {
final char characters[] = new char[length];
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2007-02-13 17:31:45 UTC (rev 8700)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2007-02-13 19:52:41 UTC (rev 8701)
@@ -115,7 +115,7 @@
private FOrayDocument(final FOraySession session) {
this.session = session;
session.registerDocument(this);
- treeBuilder = this.session.getFOTreeServer().makeFOTree();
+ treeBuilder = this.session.getFOTreeFactory().makeFOTree();
}
/**
@@ -143,6 +143,7 @@
* Constructor for processing a DOM Document. It creates its own parser.
* @param session The parent FOraySession.
* @param domDocument A DOM Document.
+ * @throws FOrayException For errors instantiating the document.
*/
public FOrayDocument(final FOraySession session,
final Document domDocument) throws FOrayException {
@@ -156,6 +157,8 @@
* Constructor for processing a JAXP Transformer.
* @param session The parent FOraySession.
* @param jaxpTransformer A JAXP Transformer.
+ * @param jaxpSource A JAXP source to be transformed.
+ * @throws FOrayException For errors instantiating the document.
*/
public FOrayDocument(final FOraySession session,
final Transformer jaxpTransformer, final Source jaxpSource)
@@ -170,6 +173,9 @@
* Constructor for JAXP processing, using supplied URLs to the xml and
* xslt input.
* @param session The parent FOraySession.
+ * @param xmlInput The semantic XML input file to be processed.
+ * @param xsltInput The stylesheet to be processed.
+ * @throws FOrayException For errors instantiating the document.
*/
public FOrayDocument(final FOraySession session, final URL xmlInput,
final URL xsltInput) throws FOrayException {
@@ -211,12 +217,12 @@
/**
* Returns the tree builder (a SAX ContentHandler).
- *
* Used in situations where SAX is used but not via a FOray-invoked
* SAX parser, i.e. where some upstream process wishes to be in control
* of the parsing and event-firing, usually because there is a pipeline of
* processes that are both SAX consumers and producers. Cocoon is one
* example of such a system.
+ * @return The SAX content handler.
*/
public ContentHandler getContentHandler() {
return this.treeBuilder;
@@ -224,13 +230,19 @@
/**
* Returns the JAXP SAXResult (which encapsulates a SAX ContentHandler).
- *
* See {@link #getContentHandler()} for the use-case.
+ * @return The JAXP result.
*/
public SAXResult getJAXPResult() {
return this.jaxpResult;
}
+ /**
+ * Sets the target of this document.
+ * @param target The child target.
+ * @throws FOrayException If the child target is not a child of this
+ * document.
+ */
public void setTarget(final FOrayTarget target) throws FOrayException {
if (target.getDocument() != this) {
throw new FOrayException("FOrayTarget not a child of this "
@@ -239,6 +251,10 @@
this.currentTarget = target;
}
+ /**
+ * Process the target.
+ * @throws FOrayException For errors during processing.
+ */
public synchronized void process() throws FOrayException {
// Get the FOrayTarget to process.
final FOrayTarget target = targetList.get(0);
@@ -246,7 +262,10 @@
}
/**
- * Build the formatting object tree from the input.
+ * Process a given target by building the formatting object tree from the
+ * input.
+ * @param target The target to be processed.
+ * @throws FOrayException For errors during processing.
*/
public synchronized void processTarget(final FOrayTarget target)
throws FOrayException {
@@ -277,35 +296,45 @@
}
}
+ /**
+ * A hook for clients to call, allowing the document to clean up after
+ * itself.
+ * @param target The target for which cleanup is needed.
+ */
public void cleanup(final FOrayTarget target) {
}
/**
* Dumps an error to the logger.
+ * @param exception The exception that should be logged.
*/
- public void dumpError(final Exception e) {
- if (! this.getConfiguration().optionVerbosity().equals("debug")) {
+ public void dumpError(final Exception exception) {
+ if (! this.getSessionConfig().optionVerbosity().equals("debug")) {
return;
}
final Log log = getLogger();
- if (e instanceof SAXException) {
- log.error(e.getMessage());
- if (((SAXException) e).getException() != null) {
- log.error(((SAXException) e).getException().getMessage());
+ if (exception instanceof SAXException) {
+ log.error(exception.getMessage());
+ if (((SAXException) exception).getException() != null) {
+ log.error(((SAXException) exception).getException()
+ .getMessage());
}
- } else if (e instanceof FOrayException) {
- e.printStackTrace();
- if (((FOrayException) e).getException() != null) {
- log.error(((FOrayException) e).getException().getMessage());
+ } else if (exception instanceof FOrayException) {
+ exception.printStackTrace();
+ if (((FOrayException) exception).getException() != null) {
+ log.error(((FOrayException) exception).getException()
+ .getMessage());
}
} else {
- log.error(e.getMessage());
+ log.error(exception.getMessage());
}
}
/**
* Runs the formatting and renderering process using the previously set
* inputsource and outputstream.
+ * @throws IOException For I/O errors.
+ * @throws FOrayException For errors during processing.
*/
public synchronized void run()
throws IOException, FOrayException {
@@ -319,14 +348,26 @@
process();
}
+ /**
+ * Returns the logger.
+ * @return The logger.
+ */
public Log getLogger() {
return this.session.getLogger();
}
+ /**
+ * Returns the FontServer.
+ * @return The FontServer.
+ */
public FontServer getFontServer() {
return this.session.getFontServer();
}
+ /**
+ * Returns the name of the SAX parser class to use.
+ * @return The name of the SAX parser.
+ */
public String getParserClassName() {
return XMLParser.getParserClassName();
}
@@ -337,33 +378,61 @@
* graphical images, etc.
*/
public URL getBaseURL() {
- return getConfiguration().optionBaseDirectory();
+ return getSessionConfig().optionBaseDirectory();
}
+ /**
+ * Returns the FontConsumer for this document.
+ * @return The FontConsumer for this document.
+ */
public FontConsumer getFontConsumer() {
return this.currentTarget.getFontConsumer();
}
+ /**
+ * Returns the TextServer for this document.
+ * @return The TextServer for this document.
+ */
public TextServer getTextServer() {
return session.getTextServer();
}
+ /**
+ * Returns the GraphicServer for this document.
+ * @return The GraphicServer for this document.
+ */
public GraphicServer getGraphicServer() {
return session.getGraphicServer();
}
- public SessionConfig getConfiguration() {
- return session.getConfiguration();
+ /**
+ * Returns the SessionConfig for this document.
+ * @return The SessionConfig for this document.
+ */
+ public SessionConfig getSessionConfig() {
+ return session.getSessionConfig();
}
+ /**
+ * Returns the FOTree for this document.
+ * @return The FOTree for this document.
+ */
public org.axsl.foR.FOTree getFOTreeBuilder() {
return this.treeBuilder;
}
+ /**
+ * Returns the AreaTreeFactory for this document.
+ * @return The AreaTreeFactory for this document.
+ */
public AreaTreeFactory getAreaTreeFactory() {
return this.session.getAreaTreeFactory();
}
+ /**
+ * Returns the LayoutFactory for this document.
+ * @return The LayoutFactory for this document.
+ */
public LayoutFactory getLayoutFactory() {
return this.session.getLayoutFactory();
}
@@ -371,6 +440,7 @@
/**
* Creates a SAX parser.
* @return The newly-created SAX parser.
+ * @throws FOrayException For errors creating the parser.
*/
XMLReader createParser() throws FOrayException {
final SAXParserFactory spf =
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2007-02-13 17:31:45 UTC (rev 8700)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2007-02-13 19:52:41 UTC (rev 8701)
@@ -53,60 +53,111 @@
private String contextMessage;
/**
- * Create a new FOray Exception.
- * @param message Descriptive message.
+ * Create a new instance with a message.
+ * @param message A message describing the nature of the exception.
*/
public FOrayException(final String message) {
super(message);
this.contextMessage = null;
}
+ /**
+ * Create a new instance with a message and a context message.
+ * @param message A message describing the nature of the exception.
+ * @param contextMessage A message containing the location of the thrown
+ * exception.
+ */
public FOrayException(final String message, final String contextMessage) {
super(message);
this.contextMessage = contextMessage;
}
- public FOrayException(final Throwable e) {
- super(e.getMessage());
- setException(e);
+ /**
+ * Create a new instance wrapping another thrown item.
+ * @param thrown The thrown item to be wrapped.
+ */
+ public FOrayException(final Throwable thrown) {
+ super(thrown.getMessage());
+ setException(thrown);
this.contextMessage = null;
}
- public FOrayException(final Throwable e, final String contextMessage) {
- super(e.getMessage());
- setException(e);
+ /**
+ * Create a new instance wrapping another thrown item and providing a
+ * context message.
+ * @param thrown The thrown item to be wrapped.
+ * @param contextMessage A message containing the location of the thrown
+ * exception.
+ */
+ public FOrayException(final Throwable thrown, final String contextMessage) {
+ super(thrown.getMessage());
+ setException(thrown);
this.contextMessage = contextMessage;
}
- public FOrayException(final String message, final Throwable e) {
+ /**
+ * Create a new instance wrapping another thrown item and providing a
+ * message.
+ * @param thrown The thrown item to be wrapped.
+ * @param message A message describing the nature of the exception.
+ */
+ public FOrayException(final String message, final Throwable thrown) {
super(message);
- setException(e);
+ setException(thrown);
this.contextMessage = null;
}
- public FOrayException(final String message, final Throwable e,
+ /**
+ * Create a new instance wrapping another thrown item and providing a
+ * message and a context message.
+ * @param thrown The thrown item to be wrapped.
+ * @param message A message describing the nature of the exception.
+ * @param contextMessage A message containing the location of the thrown
+ * exception.
+ */
+ public FOrayException(final String message, final Throwable thrown,
final String contextMessage) {
super(message);
- setException(e);
+ setException(thrown);
this.contextMessage = contextMessage;
}
- protected void setException(final Throwable t) {
- exception = t;
+ /**
+ * Sets the wrapped thrown item.
+ * @param thrown The thrown item to be wrapped inside the exception.
+ */
+ protected void setException(final Throwable thrown) {
+ exception = thrown;
}
+ /**
+ * Returns the thrown item, if any, wrapped inside this exception.
+ * @return The thrown item, if any, wrapped inside this exception.
+ */
public Throwable getException() {
return exception;
}
+ /**
+ * Sets the context message for this exception.
+ * @param contextMessage The new context message for this exception.
+ */
public void setContextMessage(final String contextMessage) {
this.contextMessage = contextMessage;
}
+ /**
+ * Indicates whether a context message exists for this exception.
+ * @return True iff this exception has a context message.
+ */
public boolean isContextSet() {
return this.contextMessage != null;
}
+ /**
+ * Returns the original exception thrown.
+ * @return The original exception thrown.
+ */
protected Throwable getRootException() {
Throwable result = exception;
@@ -124,6 +175,9 @@
return null;
}
+ /**
+ * {@inheritDoc}
+ */
public String getMessage() {
if (this.contextMessage != null) {
return super.getMessage() + "\n"
@@ -132,6 +186,9 @@
return super.getMessage();
}
+ /**
+ * {@inheritDoc}
+ */
public void printStackTrace() {
synchronized (System.err) {
super.printStackTrace();
@@ -146,6 +203,9 @@
}
}
+ /**
+ * {@inheritDoc}
+ */
public void printStackTrace(final PrintStream stream) {
synchronized (stream) {
super.printStackTrace(stream);
@@ -160,6 +220,9 @@
}
}
+ /**
+ * {@inheritDoc}
+ */
public void printStackTrace(final PrintWriter writer) {
synchronized (writer) {
super.printStackTrace(writer);
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2007-02-13 17:31:45 UTC (rev 8700)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2007-02-13 19:52:41 UTC (rev 8701)
@@ -109,6 +109,8 @@
* for this session. If null is passed, then a FontServer instance will be
* created by this FOraySession. If an instance is passed, it needs to be
* fully configured and ready to be used.
+ * @param hyphenServer The HyphenationServer instance that should be used
+ * for this session.
* @param textServer The (optional) TextServer instance that should be used
* for this session. If null is passed, then a TextServer instance will be
* created by this FOraySession. If an instance is passed, it needs to be
@@ -117,6 +119,13 @@
* be used for this session. If null is passed, then a GraphicServer
* instance will be created by this FOray Session. If an instance is passed,
* it needs to be fully configured and ready to be used.
+ * @param foTreeFactory The FOTreeFactory that should be used for this
+ * session.
+ * @param areaTreeFactory The AreaTreeFactory that should be used for this
+ * session.
+ * @param layoutFactory The LayoutFactory that should be used for this
+ * session.
+ * @throws FOrayException For invalid parameters.
*/
public FOraySession(final Log logger, final SessionConfig configuration,
final FontServer fontServer, final HyphenationServer hyphenServer,
@@ -187,6 +196,10 @@
this.layoutFactory = layoutFactory;
}
+ /**
+ * Returns the logger for this session.
+ * @return The logger.
+ */
public Log getLogger() {
return log;
}
@@ -233,25 +246,42 @@
return this.fontServer;
}
+ /**
+ * Returns the HyphenationServer.
+ * @return The HyphenationServer.
+ */
public HyphenationServer getHyphenationServer() {
return this.hyphenServer;
}
+ /**
+ * Returns the TextServer.
+ * @return The TextServer.
+ */
public TextServer getTextServer() {
return this.textServer;
}
+ /**
+ * Returns the GraphicServer.
+ * @return The GraphicServer.
+ */
public GraphicServer getGraphicServer() {
return this.graphicServer;
}
- public SessionConfig getConfiguration() {
+ /**
+ * Returns the SessionConfig.
+ * @return The SessionConfig.
+ */
+ public SessionConfig getSessionConfig() {
return this.configuration;
}
/**
* Iterates through the collection of FOrayDocuments to be processed, and
* processes each one.
+ * @throws FOrayException For errors during document processing.
*/
public void process() throws FOrayException {
final Iterator iter = documentList.iterator();
@@ -261,7 +291,11 @@
}
}
- public FOTreeFactory getFOTreeServer() {
+ /**
+ * Returns the FOTreeFactory.
+ * @return The FOTreeFactory.
+ */
+ public FOTreeFactory getFOTreeFactory() {
return this.foTreeFactory;
}
@@ -281,10 +315,18 @@
return this.entityResolver;
}
+ /**
+ * Returns the AreaTreeFactory.
+ * @return The AreaTreeFactory.
+ */
public AreaTreeFactory getAreaTreeFactory() {
return this.areaTreeFactory;
}
+ /**
+ * Returns the LayoutFactory.
+ * @return The LayoutFactory.
+ */
public LayoutFactory getLayoutFactory() {
return this.layoutFactory;
}
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2007-02-13 17:31:45 UTC (rev 8700)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2007-02-13 19:52:41 UTC (rev 8701)
@@ -121,6 +121,17 @@
/** The font consumer for this target. */
private FontConsumer fontConsumer;
+ /**
+ * Constructor.
+ * @param document The parent document.
+ * @param outputTarget The output target to which the document should be
+ * processed.
+ * @param layout The layout implementation responsible for laying the
+ * document out.
+ * @param outputStream The output stream, if any, to which the document
+ * should be written.
+ * @throws FOrayException For errors during document processing.
+ */
public FOrayTarget(final FOrayDocument document,
final OutputTarget outputTarget, final Layout layout,
final OutputStream outputStream) throws FOrayException {
@@ -169,7 +180,7 @@
this.outputTarget.setApplicationVersion(Application.getVersion());
this.outputTarget.setDeveloperURLShort(
Application.getDeveloperURLShort());
- this.outputTarget.setStrokeSVGText(getConfiguration()
+ this.outputTarget.setStrokeSVGText(getSessionConfig()
.optionStrokeSVGText());
this.outputTarget.setFontConsumer(this.getFontConsumer());
@@ -177,6 +188,10 @@
startRenderer();
}
+ /**
+ * Starts the output processing.
+ * @throws FOrayException For errors during processing.
+ */
public void startRenderer() throws FOrayException {
pageCount = 0;
@@ -193,6 +208,10 @@
}
}
+ /**
+ * Cleans up after output processing.
+ * @throws SAXException For errors during cleanup.
+ */
public void stopRenderer() throws SAXException {
/*
Force the processing of any more queue elements,
@@ -239,15 +258,9 @@
}
/**
- Format the PageSequence. The PageSequence
- formats Pages and adds them to the AreaTree,
- which subsequently calls the StreamRenderer
- instance (this) again to render the page.
- At this time the page might be printed
- or it might be queued. A page might not
- be renderable immediately if the IDReferences
- are not all valid. In this case we defer
- the rendering until they are all valid.
+ * Outputs the PageSequence.
+ * @param pageSequence The page sequence to be processed.
+ * @throws FOrayException For errors during processing.
*/
public void render(final PageSequence pageSequence) throws FOrayException {
pageSequenceCount ++;
@@ -279,6 +292,10 @@
}
}
+ /**
+ * Returns the writable area tree.
+ * @return The writable area tree.
+ */
private org.axsl.areaW.AreaTree getCreatedAreaTree() {
if (this.areaTree == null) {
this.areaTree = this.getAreaTreeFactory().makeAreaTree(
@@ -288,6 +305,11 @@
return this.areaTree;
}
+ /**
+ * Returns the readable area tree.
+ * @return The readable area tree.
+ * @throws FOrayException If the area tree for this target is not readable.
+ */
private org.axsl.areaR.AreaTree getRenderedAreaTree()
throws FOrayException {
final org.axsl.areaW.AreaTree areaTreeW = getCreatedAreaTree();
@@ -297,6 +319,9 @@
return (org.axsl.areaR.AreaTree) areaTreeW;
}
+ /**
+ * {@inheritDoc}
+ */
public void pageComplete(final AreaTreeEvent event) {
final org.axsl.areaW.PageArea page = event.getPage();
final org.axsl.areaR.PageArea pageToRender = (PageArea) page;
@@ -308,8 +333,15 @@
}
}
+ /**
+ * Adds a page to the queue of pages to be rendered.
+ * @param page The page to add to the queue of unrendered pages.
+ * @throws AreaWException For errors during ouput.
+ */
public synchronized void queuePage(final PageArea page)
throws AreaWException {
+ /* TODO: Resolve whether the queue should be rendered here or not.*/
+
/*
* We run the pages through a queue because any page page that contains
* an unresolved ref-id prevents subsequent pages from being rendered.
@@ -331,10 +363,14 @@
}
/**
- Try to process the queue from the first entry forward.
- If an entry can't be processed, then the queue can't
- move forward, so return.
- */
+ * Try to process the queue of pages from the first entry forward.
+ * If an entry can't be processed, then the queue can't move forward, so
+ * return.
+ * @param force Set to true if pages should be processed regardless of
+ * whether they have unresolved references.
+ * @throws AreaRException For errors in the Area Tree.
+ * @throws IOException For errors during output.
+ */
private synchronized void processQueue(final boolean force)
throws AreaRException, IOException {
if (! (this.outputTarget instanceof Renderer)) {
@@ -353,7 +389,8 @@
}
/**
- * Return the logger to be used. (Required by the FontConsumer interface).
+ * Returns the logger.
+ * @return The logger.
*/
public Log getLogger() {
return document.getLogger();
@@ -375,7 +412,7 @@
*/
public void foPageSequenceComplete(final FOTreeEvent event) {
try {
- final boolean shouldRender = this.getConfiguration().isModeRender();
+ final boolean shouldRender = this.getSessionConfig().isModeRender();
if (shouldRender) {
render(event.getPageSequence());
}
@@ -400,36 +437,64 @@
}
/**
- * Tell FOTreeBuilder that we don't want the FObj-complete events.
+ * {@inheritDoc}
*/
public boolean wantsFObjCompleteEvents() {
return false;
}
+ /**
+ * Return the FontConsumer for this target.
+ * @return The FontConsumer for this target.
+ */
public FontConsumer getFontConsumer() {
return this.fontConsumer;
}
+ /**
+ * Return the FontServer for this target.
+ * @return The FontServer for this target.
+ */
public FontServer getFontServer() {
return this.document.getFontServer();
}
+ /**
+ * Return the TextConsumer for this target.
+ * @return The TextConsumer for this target.
+ */
public TextServer getTextServer() {
return document.getTextServer();
}
+ /**
+ * Return the OutputStream for this target.
+ * @return The OutputStream for this target.
+ */
public OutputStream getOutputStream() {
return this.outputStream;
}
+ /**
+ * Return the OutputTarget for this target.
+ * @return The OutputTarget for this target.
+ */
public OutputTarget getOutputTarget() {
return this.outputTarget;
}
- public SessionConfig getConfiguration() {
- return document.getConfiguration();
+ /**
+ * Return the SessionConfig for this target.
+ * @return The SessionConfig for this target.
+ */
+ public SessionConfig getSessionConfig() {
+ return document.getSessionConfig();
}
+ /**
+ * Return the LayoutStrategy for this target.
+ * @return The LayoutStrategy for this target.
+ */
public Layout getLayoutStrategy() {
return this.layout;
}
@@ -450,14 +515,26 @@
}
}
+ /**
+ * Returns the parent document.
+ * @return The parent document.
+ */
public FOrayDocument getDocument() {
return this.document;
}
+ /**
+ * Return the AreaTreeFactory for this target.
+ * @return The AreaTreeFactory for this target.
+ */
public AreaTreeFactory getAreaTreeFactory() {
return this.document.getAreaTreeFactory();
}
+ /**
+ * Return the LayoutFactory for this target.
+ * @return The LayoutFactory for this target.
+ */
public LayoutFactory getLayoutFactory() {
return this.document.getLayout...
[truncated message content] |
|
From: <vic...@us...> - 2007-02-14 04:53:30
|
Revision: 8706
http://svn.sourceforge.net/foray/?rev=8706&view=rev
Author: victormote
Date: 2007-02-13 20:53:26 -0800 (Tue, 13 Feb 2007)
Log Message:
-----------
Javadoc improvements.
Modified Paths:
--------------
trunk/foray/doc/web/app/using/release.html
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java
trunk/foray/foray-app/src/java/org/foray/app/FOray.java
trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
trunk/foray/foray-app/src/java/org/foray/app/Options.java
trunk/foray/foray-app/src/java/org/foray/app/OutputTargetFactory.java
trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java
trunk/foray/foray-app/src/java/org/foray/app/Starter.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/doc/web/app/using/release.html
===================================================================
--- trunk/foray/doc/web/app/using/release.html 2007-02-14 03:56:15 UTC (rev 8705)
+++ trunk/foray/doc/web/app/using/release.html 2007-02-14 04:53:26 UTC (rev 8706)
@@ -50,8 +50,8 @@
<li>The class org.foray.common.StringUtilPre5 has been removed, and uses of
its methods have been replaced by standar Java 5.0 String and Character
methods.</li>
- <li>Completion of javadoc API documentation for the FOrayGraphic and
- FOrayHyphen-R modules.</li>
+ <li>Completion of javadoc API documentation for the FOrayGraphic,
+ FOrayHyphen-R, FOrayApp, and FOrayCore modules.</li>
<li>The FOrayGraphicServer constructor no longer requires the name of the
parser class as a parameter.</li>
</ul>
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2007-02-14 03:56:15 UTC (rev 8705)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2007-02-14 04:53:26 UTC (rev 8706)
@@ -62,16 +62,33 @@
*/
public class AWTStarter extends CommandLineStarter {
+ /** Path to the viewer resources. */
private static final String TRANSLATION_PATH =
"/org/foray/render/awt/viewer/resources/";
+ /** The preview dialog. */
private PreviewDialog frame;
+
+ /** The renderer. */
private AWTRenderer renderer;
+
+ /** The FOray document. */
private FOrayDocument document;
+ /** The translator. */
private Translator resource;
+
+ /** The current user message. */
private UserMessage userMessage;
+ /**
+ * Constructor.
+ * @param logger The logger.
+ * @param sessionConfig The session configuration.
+ * @param renderConfig The output configuration.
+ * @param commandLineOptions The command-line options.
+ * @throws FOrayException For errors during construction.
+ */
public AWTStarter(final Log logger, final SessionConfig sessionConfig,
final OutputConfig renderConfig,
final CommandLineOptions commandLineOptions) throws FOrayException {
@@ -79,6 +96,10 @@
init();
}
+ /**
+ * Initializes the starter.
+ * @throws FOrayException For errors during initialization.
+ */
private void init() throws FOrayException {
this.userMessage = new UserMessage(getLogger());
try {
@@ -116,6 +137,9 @@
frame.progress(resource.getString("Init parser") + " ...");
}
+ /**
+ * {@inheritDoc}
+ */
public void run() throws FOrayException {
// build FO tree: time
frame.progress(resource.getString("Build FO tree") + " ...");
@@ -132,6 +156,12 @@
frame.showPage();
}
+ /**
+ * Creates a new preview dialog.
+ * @param renderer The rendere.
+ * @param res The language resources.
+ * @return The newly-created preview dialog.
+ */
protected PreviewDialog createPreviewDialog(final AWTRenderer renderer,
final Translator res) {
final PreviewDialog frame = new PreviewDialog(renderer, res,
@@ -160,7 +190,11 @@
}
-
+ /**
+ * Gets a secure resource bundle.
+ * @param path The path to the bundle.
+ * @return The secure resource bundle.
+ */
private SecureResourceBundle getResourceBundle(final String path) {
InputStream in = null;
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2007-02-14 03:56:15 UTC (rev 8705)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2007-02-14 04:53:26 UTC (rev 8706)
@@ -59,6 +59,8 @@
/** Constant indicating that the input is XML + XSLT. */
public static final int INPUT_XSLT = 2;
+ /** The number of command-line arguments needed to specify standard options,
+ * that is, one for the "-so", one for the key, and one for the value. */
private static final int STANDARD_OPTIONS_QTY_ARGUMENTS = 3;
/** The user configuration file. */
@@ -85,14 +87,25 @@
/** Language for user information. */
private String language = null;
+ /** The session configuration. */
private SessionConfig sessionConfig;
+
+ /** The output configuration. */
private OutputConfig rendererOptions;
+ /** The logger. */
private Log log;
/** State variable indicating current index into args[]. */
private transient int currentArgument = 0;
+ /**
+ * Constructor.
+ * @param args The command-line arguments.
+ * @param logger The logger.
+ * @throws FOrayException For errors parsing options.
+ * @throws FileNotFoundException For errors finding specified files.
+ */
public CommandLineOptions(final String[] args, final Log logger)
throws FOrayException, FileNotFoundException {
this.log = logger;
@@ -116,17 +129,21 @@
}
}
+ /**
+ * Sets the loggers verbosity, based on the command-line options.
+ */
private void adjustLogger() {
final String verbosity = this.sessionConfig.optionVerbosity();
if (verbosity.equals("debug")) {
- setLogger(Logging.makeDebugLogger());
+ this.log = Logging.makeDebugLogger();
} else if (verbosity.equals("quiet")) {
- setLogger(Logging.makeQuietLogger());
+ this.log = Logging.makeQuietLogger();
}
}
/**
* Parses the commandline arguments.
+ * @param args The command-line arguments to parse.
* @return true if parse was successful and procesing can continue, false
* if processing should stop.
* @throws FOrayException if there was an error in the format of the
@@ -340,6 +357,9 @@
/**
* Parses a configuration option.
* @param args The command-line arguments.
+ * @return True iff the option was successfully parsed.
+ * @throws FOrayException If the option is not in the expected key-value
+ * pair.
*/
private boolean parseConfigurationOption(final String[] args)
throws FOrayException {
@@ -362,6 +382,11 @@
OutputConfig.PRECEDENCE_COMMAND_LINE);
}
+ /**
+ * Sets the output mode.
+ * @param mode The new output mode to set.
+ * @throws FOrayException If the output mode has already been set.
+ */
private void setOutputMode(final int mode) throws FOrayException {
if (outputmode == INPUT_NOT_SET) {
outputmode = mode;
@@ -373,6 +398,8 @@
/**
* Checks whether all necessary information has been given in a consistent
* way.
+ * @throws FOrayException For FOray inconsistencies.
+ * @throws FileNotFoundException For specified files that do not exist.
*/
private void checkSettings() throws FOrayException, FileNotFoundException {
if (inputmode == INPUT_NOT_SET) {
@@ -423,12 +450,12 @@
}
}
- } // end checkSettings
-
- private void setLogger(final Log newLogger) {
- this.log = newLogger;
}
+// private void setLogger(final Log newLogger) {
+// this.log = newLogger;
+// }
+
/**
* Returns the output type specifiedon the command-line.
* @return The integer representing a Renderer type.
@@ -441,6 +468,8 @@
/**
* Provides the input source representing the command-line options.
+ * @return The input source.
+ * @throws FOrayException For errors creaing the input source.
*/
public InputSource getInputSource() throws FOrayException {
if (inputmode == INPUT_FO) {
@@ -453,14 +482,27 @@
return null;
}
+ /**
+ * Returns the renderer options.
+ * @return The renderer options.
+ */
public OutputConfig getRendererOptions() {
return this.rendererOptions;
}
+ /**
+ * Returns the session configuration.
+ * @return The session configuration.
+ */
public SessionConfig getSessionConfig() {
return this.sessionConfig;
}
+ /**
+ * Returns the starter to use for starting the application.
+ * @return The starter to use to start the application.
+ * @throws FOrayException For errors creating the starter.
+ */
public Starter getStarter() throws FOrayException {
Starter starter = null;
switch (outputmode) {
@@ -494,34 +536,66 @@
return starter;
}
+ /**
+ * Returns the parsed input mode.
+ * @return The parsed inlput mode.
+ */
public int getInputMode() {
return inputmode;
}
+ /**
+ * Returns the parsed output mode.
+ * @return The parsed output mode.
+ */
public int getOutputMode() {
return outputmode;
}
+ /**
+ * Returns the parsed FO file location.
+ * @return The parsed FO file location.
+ */
public URL getFOFile() {
return foInput;
}
+ /**
+ * Returns the parsed XML file location.
+ * @return The parsed XML file location.
+ */
public URL getXMLFile() {
return xmlInput;
}
+ /**
+ * Returns the parsed XSLT stylesheet file location.
+ * @return The parsed XSLT stylesheet file location.
+ */
public URL getXSLFile() {
return xsltInput;
}
+ /**
+ * Returns the parsed output file location.
+ * @return The parsed output file location.
+ */
public File getOutputFile() {
return outfile;
}
+ /**
+ * Returns the parsed user configuration file location.
+ * @return The parsed user configuration file location.
+ */
public URL getUserConfigFile() {
return userConfig;
}
+ /**
+ * Returns the parsed language.
+ * @return The parsed language.
+ */
public String getLanguage() {
return language;
}
@@ -543,6 +617,7 @@
/**
* Shows the commandline syntax including a summary of all available
* options and some examples.
+ * @param logger The logger on which to print the message.
*/
public static void printUsage(final Log logger) {
logger.error("\nUSAGE\nFOray [options] [-fo|-xml] infile "
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2007-02-14 03:56:15 UTC (rev 8705)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2007-02-14 04:53:26 UTC (rev 8706)
@@ -50,8 +50,17 @@
*/
public class CommandLineStarter extends Starter {
+ /** The command-line options. */
private CommandLineOptions commandLineOptions;
+ /**
+ * Constructor.
+ * @param logger The logger.
+ * @param sessionConfig The session configuration.
+ * @param outputConfig The output configuratiion.
+ * @param commandLineOptions The command-line options.
+ * @throws FOrayException For errors during construction.
+ */
public CommandLineStarter(final Log logger,
final SessionConfig sessionConfig, final OutputConfig outputConfig,
final CommandLineOptions commandLineOptions)
@@ -63,8 +72,7 @@
}
/**
- * Run the format.
- * @exception FOrayException if there is an error during processing
+ * {@inheritDoc}
*/
public void run() throws FOrayException {
/*
@@ -187,6 +195,11 @@
target.cleanup();
}
+ /**
+ * Returns the file output stream.
+ * @return The output stream.
+ * @throws FOrayException If the file is not found.
+ */
private FileOutputStream getFileOutputStream() throws FOrayException {
final File outputFile = commandLineOptions.getOutputFile();
try {
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOray.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2007-02-14 03:56:15 UTC (rev 8705)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2007-02-14 04:53:26 UTC (rev 8706)
@@ -49,6 +49,8 @@
/**
* Main command-line entry point to FOray.
+ * @param args The command-line arguments. See the application documentation
+ * for details on these arguments.
*/
public static void main(final String[] args) {
CommandLineOptions options = null;
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2007-02-14 03:56:15 UTC (rev 8705)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2007-02-14 04:53:26 UTC (rev 8706)
@@ -65,6 +65,10 @@
*/
public final class FOraySpecific {
+ /** The number of items in a standard FOray graphic search path, that is,
+ * one for the base document location (current directory of the fo file),
+ * one for the base directory, and one for the system property
+ * "user.dir". */
private static final int STANDARD_GRAPHIC_SEARCH_ELEMENTS = 3;
/**
@@ -76,6 +80,7 @@
/**
* Creates a new FOraySession instance configured with default servers and
* factories.
+ * @param sessionConfig The session configuration.
* @return The newly-created FOraySession.
* @throws FOrayException For errors in creating the server and factories,
* or in instantiating the FOraySession.
@@ -103,6 +108,11 @@
return session;
}
+ /**
+ * Make a standard logger for use in FOray.
+ * @param configuration The session configuration.
+ * @return The newly-created logger.
+ */
public static Log makeLogger(final SessionConfig configuration) {
if (configuration.optionVerbosity().equals("debug")) {
return Logging.makeDebugLogger();
@@ -111,6 +121,13 @@
}
}
+ /**
+ * Make a standard FontServer instance for use in FOray.
+ * @param logger The logger.
+ * @param configuration The session configuration.
+ * @return The newly-created FontServer instance.
+ * @throws FOrayException For errors creating the server.
+ */
public static FontServer makeFontServer(final Log logger,
final SessionConfig configuration) throws FOrayException {
final EntityResolver entityResolver = makeEntityResolver(configuration);
@@ -128,11 +145,25 @@
return forayFontServer;
}
+ /**
+ * Make a standard TextServer instance for use in FOray.
+ * @param logger The logger.
+ * @param hyphenServer The hyphenation server to be used in line-breaking
+ * decisions.
+ * @return The newly-created TextServer instance.
+ * @throws FOrayException For errors creating the server.
+ */
public static TextServer makeTextServer(final Log logger,
final HyphenationServer hyphenServer) throws FOrayException {
return new org.foray.text.TextServer(logger, hyphenServer);
}
+ /**
+ * Make a standard HyphenationServer instance for use in FOray.
+ * @param logger The logger.
+ * @param configuration The session configuration.
+ * @return The newly-created HyphenationServer instance.
+ */
public static HyphenationServer makeHyphenationServer(final Log logger,
final SessionConfig configuration) {
final URL hyphenationDir =
@@ -141,11 +172,26 @@
hyphenationDir);
}
+ /**
+ * Make a standard GraphicServer instance for use in FOray.
+ * @param logger The logger.
+ * @return The newly-created GraphicServer instance.
+ * @throws FOrayException For errors creating the server.
+ */
public static GraphicServer makeGraphicServer(final Log logger)
throws FOrayException {
return new FOrayGraphicServer(logger);
}
+ /**
+ * Make a standard FOTreeFactory instance for use in FOray.
+ * @param logger The logger.
+ * @param configuration The session configuration.
+ * @param graphicServer The GraphicServer instance to use.
+ * @param textServer The TextServer to use.
+ * @return The newly-created FOTreeFactory instance.
+ * @throws FOrayException For errors creating the server.
+ */
public static FOTreeFactory makeFOTreeFactory(final Log logger,
final SessionConfig configuration,
final GraphicServer graphicServer, final TextServer textServer)
@@ -155,6 +201,11 @@
graphicSearchPath, configuration.optionCacheGraphics());
}
+ /**
+ * Create a standard graphic search path for use in FOray.
+ * @param configuration The session configuration.
+ * @return The standard graphic search path.
+ */
private static URL[] buildGraphicSearchPath(
final SessionConfig configuration) {
final URL[] urls = new URL[STANDARD_GRAPHIC_SEARCH_ELEMENTS];
@@ -168,16 +219,35 @@
return urls;
}
+ /**
+ * Make a standard AreaTreeFactory instance for use in FOray.
+ * @param logger The logger.
+ * @param textServer The TextServer to use.
+ * @return The newly-created AreaTreeFactory instance.
+ * @throws FOrayException For errors creating the server.
+ */
public static AreaTreeFactory makeAreaTreeFactory(final Log logger,
final TextServer textServer) throws FOrayException {
return new FOrayAreaTreeFactory(logger, textServer);
}
+ /**
+ * Make a standard LayoutFactory instance for use in FOray.
+ * @param logger The logger.
+ * @return The newly-created LayoutFactory instance.
+ * @throws FOrayException For errors creating the server.
+ */
public static LayoutFactory makeLayoutFactory(final Log logger)
throws FOrayException {
return new PioneerFactory(logger);
}
+ /**
+ * Create a standard entity resolver for use with FOray.
+ * @param configuration The session configuration.
+ * @return The newly-created entity resolver, or null if no XML catalog
+ * is specified.
+ */
public static EntityResolver makeEntityResolver(
final SessionConfig configuration) {
final String catalog = configuration.optionXMLCatalog();
Modified: trunk/foray/foray-app/src/java/org/foray/app/Options.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/Options.java 2007-02-14 03:56:15 UTC (rev 8705)
+++ trunk/foray/foray-app/src/java/org/foray/app/Options.java 2007-02-14 04:53:26 UTC (rev 8706)
@@ -46,12 +46,22 @@
*/
public class Options {
+ /** The session configuration. */
private SessionConfig sessionConfig;
+
+ /** The output configuration. */
private OutputConfig renderConfig;
/** The logger that should be used. */
private Log logger;
+ /**
+ * Constructor for case when the user configuration file is not known.
+ * @param logger The logger.
+ * @param sessionConfig The session configuration.
+ * @param renderConfig The output configuration.
+ * @throws FOrayException For errors during construction.
+ */
public Options(final Log logger, final SessionConfig sessionConfig,
final OutputConfig renderConfig) throws FOrayException {
this.logger = logger;
@@ -59,6 +69,14 @@
this.renderConfig = renderConfig;
}
+ /**
+ * Constructor for case when the user configuration file is known.
+ * @param logger The logger.
+ * @param sessionConfig The session configuration.
+ * @param renderConfig The output configuration.
+ * @param userConfigFile The user configuration to be processed.
+ * @throws FOrayException For errors during construction.
+ */
public Options(final Log logger, final SessionConfig sessionConfig,
final OutputConfig renderConfig, final URL userConfigFile)
throws FOrayException {
@@ -67,7 +85,9 @@
initOptions();
}
- // initializing option settings
+ /**
+ * Initializes the option settings.
+ */
void initOptions() {
if (this.sessionConfig.optionDumpConfiguration()) {
this.sessionConfig.dumpConfiguration();
@@ -75,7 +95,12 @@
}
}
- // setting clOptions
+ /**
+ * Process the user configuration file from the command-line options.
+ * @param clOptions The command-line options whose user configuration should
+ * be processed.
+ * @throws FOrayException For errors during configuration processing.
+ */
void setCommandLineOptions(final CommandLineOptions clOptions)
throws FOrayException {
// load user configuration file,if there is one
@@ -91,6 +116,12 @@
}
}
+ /**
+ * Loads a user configuration from a URL.
+ * @param userConfigFile The URL to be loaded.
+ * @throws FOrayException If the URL cannot be accessed, or if there are
+ * errors loading it.
+ */
public void loadUserconfiguration(final URL userConfigFile)
throws FOrayException {
if (userConfigFile == null) {
@@ -105,6 +136,11 @@
}
}
+ /**
+ * Loades a user configuration from an InputSource.
+ * @param userConfigSource The input source to be processed.
+ * @throws FOrayException For errors processing the configuration.
+ */
public void loadUserconfiguration(final InputSource userConfigSource)
throws FOrayException {
// read user configuration
@@ -123,22 +159,27 @@
}
/**
- * Dumps an error in standard way.
+ * Logs an error in a standard way.
+ * @param exception The Exception to be logged.
*/
- public void dumpError(final Exception e) {
+ public void dumpError(final Exception exception) {
if (! getSessionConfig().optionVerbosity().equals("debug")) {
return;
}
- if (e instanceof SAXException) {
- e.printStackTrace();
- if (((SAXException) e).getException() != null) {
- ((SAXException) e).getException().printStackTrace();
+ if (exception instanceof SAXException) {
+ exception.printStackTrace();
+ if (((SAXException) exception).getException() != null) {
+ ((SAXException) exception).getException().printStackTrace();
}
} else {
- e.printStackTrace();
+ exception.printStackTrace();
}
}
+ /**
+ * Returns the session configuration.
+ * @return The session configuration.
+ */
public SessionConfig getSessionConfig() {
return this.sessionConfig;
}
Modified: trunk/foray/foray-app/src/java/org/foray/app/OutputTargetFactory.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/OutputTargetFactory.java 2007-02-14 03:56:15 UTC (rev 8705)
+++ trunk/foray/foray-app/src/java/org/foray/app/OutputTargetFactory.java 2007-02-14 04:53:26 UTC (rev 8706)
@@ -100,6 +100,9 @@
* </ul>
* @param outputOptions Map containing the options to be used with the
* Renderer.
+ * @param logger The logger.
+ * @return The newly-created OutputTarget instance.
+ * @throws FOrayException For errors creating the target.
*/
public static OutputTarget makeOutputTarget(final int rendererType,
final OutputConfig outputOptions, final Log logger)
@@ -191,6 +194,12 @@
return -1;
}
+ /**
+ * Returns the mime extension for a given renderer type.
+ * @param rendererType The renderer type for which the mime extension is
+ * needed.
+ * @return The mime extension.
+ */
public static String getMimeExtension(final int rendererType) {
switch (rendererType) {
case RENDER_PDF: {
Modified: trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java 2007-02-14 03:56:15 UTC (rev 8705)
+++ trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java 2007-02-14 04:53:26 UTC (rev 8706)
@@ -52,12 +52,23 @@
*/
public class PrintStarter extends CommandLineStarter {
+ /**
+ * Constructor.
+ * @param logger The logger.
+ * @param sessionConfig The session configuration.
+ * @param renderConfig The output configuration.
+ * @param options The options.
+ * @throws FOrayException For errors during construction.
+ */
public PrintStarter(final Log logger, final SessionConfig sessionConfig,
final OutputConfig renderConfig, final CommandLineOptions options)
throws FOrayException {
super(logger, sessionConfig, renderConfig, options);
}
+ /**
+ * {@inheritDoc}
+ */
public void run() throws FOrayException {
final SessionConfig configuration = getOptions().getSessionConfig();
final FOraySession session = FOraySpecific.makeFOraySession(
@@ -84,6 +95,13 @@
System.exit(0);
}
+ /**
+ * Returns an integer property value.
+ * @param name The name of the property whose value is needed.
+ * @param def The default value for the property.
+ * @return The property value if it is found, or <code>def</code> if it is
+ * not found.
+ */
int getIntProperty(final String name, final int def) {
final String propValue = System.getProperty(name);
if (propValue != null) {
Modified: trunk/foray/foray-app/src/java/org/foray/app/Starter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/Starter.java 2007-02-14 03:56:15 UTC (rev 8705)
+++ trunk/foray/foray-app/src/java/org/foray/app/Starter.java 2007-02-14 04:53:26 UTC (rev 8706)
@@ -37,17 +37,29 @@
import org.xml.sax.InputSource;
/**
- * abstract super class
- * Creates a SAX Parser (defaulting to Xerces).
- *
+ * Abstract super class for all FOray starters.
*/
public abstract class Starter {
+ /** The options instance. */
private Options options;
+
+ /** The input source. */
private InputSource inputSource;
+
+ /** The logger. */
private Log logger;
+
+ /** The output configuration. */
private OutputConfig outputConfig;
+ /**
+ * Constructor.
+ * @param logger The logger.
+ * @param sessionConfig The session configuration.
+ * @param renderConfig The output configuration.
+ * @throws FOrayException For errors durint construction.
+ */
public Starter(final Log logger, final SessionConfig sessionConfig,
final OutputConfig renderConfig) throws FOrayException {
this.logger = logger;
@@ -55,12 +67,24 @@
options = new Options(logger, sessionConfig, renderConfig);
}
+ /**
+ * Sets the input source to be used for processing.
+ * @param inputSource The new input source.
+ */
public void setInputSource(final InputSource inputSource) {
this.inputSource = inputSource;
}
+ /**
+ * Runs the process.
+ * @throws FOrayException For errors during processing.
+ */
public abstract void run() throws FOrayException;
+ /**
+ * Returns the logger.
+ * @return The logger.
+ */
public Log getLogger() {
return this.logger;
}
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-14 03:56:15 UTC (rev 8705)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-14 04:53:26 UTC (rev 8706)
@@ -8,10 +8,6 @@
<!-- Suppress partially-implemented checks where not yet implemented. -->
- <suppress checks="Javadoc[MV].*"
- files="org.foray.app.*"/>
- <suppress checks="Javadoc[MV].*"
- files="org.foray.demo.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.area.*"/>
<suppress checks="Javadoc[MVS].*"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-15 01:38:01
|
Revision: 8707
http://svn.sourceforge.net/foray/?rev=8707&view=rev
Author: victormote
Date: 2007-02-14 17:37:51 -0800 (Wed, 14 Feb 2007)
Log Message:
-----------
Javadoc improvements.
Modified Paths:
--------------
trunk/foray/doc/web/app/using/release.html
trunk/foray/foray-output/src/java/org/foray/output/Converter.java
trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java
trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/doc/web/app/using/release.html
===================================================================
--- trunk/foray/doc/web/app/using/release.html 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/doc/web/app/using/release.html 2007-02-15 01:37:51 UTC (rev 8707)
@@ -51,7 +51,7 @@
its methods have been replaced by standar Java 5.0 String and Character
methods.</li>
<li>Completion of javadoc API documentation for the FOrayGraphic,
- FOrayHyphen-R, FOrayApp, and FOrayCore modules.</li>
+ FOrayHyphen-R, FOrayOutput, FOrayApp, and FOrayCore modules.</li>
<li>The FOrayGraphicServer constructor no longer requires the name of the
parser class as a parameter.</li>
</ul>
Modified: trunk/foray/foray-output/src/java/org/foray/output/Converter.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/Converter.java 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/foray-output/src/java/org/foray/output/Converter.java 2007-02-15 01:37:51 UTC (rev 8707)
@@ -37,7 +37,9 @@
public abstract class Converter extends OutputTarget {
/**
- *
+ * Constructor.
+ * @param logger The logger.
+ * @param outputConfig The output configuration.
*/
public Converter(final Log logger, final OutputConfig outputConfig) {
super(logger, outputConfig);
Modified: trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java 2007-02-15 01:37:51 UTC (rev 8707)
@@ -53,12 +53,13 @@
*/
public class MIFConverter extends Converter {
+ /** The height of the page, in millipoints. */
private int pageHeight;
+
+ /** The width of the page, in millipoints. */
private int pageWidth;
- /**
- * the MIF Document being created
- */
+ /** The MIF Document being created. */
private MifBook mifDoc;
@@ -66,36 +67,66 @@
// private boolean inTable = false;
/**
- * create the MIF renderer
+ * Create the MIF renderer.
+ * @param logger The logger.
+ * @param outputConfig The output configuration.
*/
public MIFConverter(final Log logger, final OutputConfig outputConfig) {
super(logger, outputConfig);
}
+ /**
+ * Converts an FOTree table to a MIF Table.
+ * @param table The FOtree table to be converted.
+ */
public void convert(final Table table) {
this.mifDoc.createTable();
// this.inTable = true;
}
+ /**
+ * Converts an FOTree table-body to a MIF Table Body.
+ * @param tableBody The FOtree table-body to be converted.
+ */
public void convert(final TableBody tableBody) {
this.mifDoc.setCurrent("fo:table-body");
}
+ /**
+ * Converts an FOTree table-row to a MIF Table Row.
+ * @param row The FOtree table-row to be converted.
+ */
public void convert(final TableRow row) {
this.mifDoc.startRow();
}
+ /**
+ * Converts an FOTree table-column to a MIF Table Column.
+ * @param column The FOtree table-column to be converted.
+ */
public void convert(final TableColumn column) {
// int colWidth = column.getComputedColumnWidth();
// this.mifDoc.setColumnProp(colWidth);
}
+ /**
+ * Converts an FOTree table-cell to a MIF Table Cell.
+ * @param cell The FOtree table-cell to be converted.
+ */
public void render(final TableCell cell) {
final int rowSpan = cell.traitNumberRowsSpanned();
final int colSpan = cell.traitNumberColumnsSpanned();
this.mifDoc.startCell(rowSpan, colSpan);
}
+ /**
+ * Creates a filled rectangle in the MIF output.
+ * @param x The x coordinate of one corner of the rectangle, in millipoints.
+ * @param y The y coordinate of one corner of the rectangle, in millipoints.
+ * @param w The width of the rectangle, in millipoints.
+ * @param h The height of the rectangle, in millipoints.
+ * @param col The color of the rectangle.
+ */
protected void addFilledRect(final int x, final int y, final int w,
final int h, final Color col) {
}
@@ -150,7 +181,8 @@
// }
/**
- * render the given block area
+ * Render a given FOTree block.
+ * @param block The FOtree block to be rendered.
*/
public void render(final Block block) {
final FOContext context = null;
@@ -169,7 +201,7 @@
// }
/**
- * render the given page
+ * Render a page.
*/
public void renderPage() {
@@ -207,9 +239,8 @@
}
/**
- Default start renderer method. This would
- normally be overridden.
- */
+ * {@inheritDoc}
+ */
public void startOutput() throws IOException {
this.mifDoc = new MifBook(getLogger());
getLogger().info("rendering areas to MIF");
@@ -217,9 +248,8 @@
}
/**
- Default stop renderer method. This would
- normally be overridden.
- */
+ * {@inheritDoc}
+ */
public void stopOutput() throws IOException {
getLogger().info("writing out MIF");
this.mifDoc.output(this.getOutputStream());
@@ -233,7 +263,4 @@
return new int[] {FontConsumer.FONT_SOURCE_FREE_STANDING};
}
- public void resetTextCursor() {
- }
-
}
Modified: trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2007-02-15 01:37:51 UTC (rev 8707)
@@ -46,16 +46,23 @@
*/
public class OutputConfig extends Configuration {
+ /**
+ * Constructor.
+ * @param logger The logger.
+ */
public OutputConfig(final Log logger) {
super(logger);
}
+ /**
+ * {@inheritDoc}
+ */
public String getName() {
return "FOray Renderer Configuration";
}
/**
- * Sets the default values that should be used unless overridden later.
+ * {@inheritDoc}
*/
protected void setDefaults() {
put("at-sparse", Boolean.FALSE, PRECEDENCE_DEFAULT);
@@ -75,6 +82,9 @@
put("txt-encoding", "UTF-8", PRECEDENCE_DEFAULT);
}
+ /**
+ * {@inheritDoc}
+ */
public boolean parseOption(final String key, final String value,
final int precedenceValue) {
if (key.equals("at-sparse")
@@ -104,16 +114,25 @@
return false;
}
+ /**
+ * Indicates whether AT (Area Tree) output should be sparse.
+ * @return True iff AT output should be sparse.
+ */
public boolean optionATSparse() {
// Never null.
return getBooleanValue("at-sparse").booleanValue();
}
+ /**
+ * Returns the list of PDF filters that this document should use.
+ * @return The list of PDF filters that this document should use.
+ */
public List optionPDFFilters() {
return getListValue("pdf-filters");
}
/**
+ * Return the pdf-owner-password value set by the user.
* @return The pdf-owner-password value set by the user, or null if none
* was set.
*/
@@ -122,6 +141,7 @@
}
/**
+ * Return the pdf-user-password valud set by the user.
* @return The pdf-user-password value set by the user, or null if none
* was set.
*/
@@ -129,31 +149,55 @@
return getStringValue("pdf-user-password");
}
+ /**
+ * Returns the PDF print permission set by the user.
+ * @return True iff the user has permission to print the PDF.
+ */
public boolean optionPDFUserPrint() {
// Never null.
return getBooleanValue("pdf-user-print").booleanValue();
}
+ /**
+ * Returns the PDF copy permission set by the user.
+ * @return True iff the user has permission to copy portions of the PDF.
+ */
public boolean optionPDFUserCopy() {
// Never null.
return getBooleanValue("pdf-user-copy").booleanValue();
}
+ /**
+ * Returns the PDF modify permission set by the user.
+ * @return True iff the user has permission to modify the PDF.
+ */
public boolean optionPDFUserModify() {
// Never null.
return getBooleanValue("pdf-user-modify").booleanValue();
}
+ /**
+ * Returns the PDF annotate permission set by the user.
+ * @return True iff the user has permission to add annotations to the PDF.
+ */
public boolean optionPDFUserAnnotate() {
// Never null.
return getBooleanValue("pdf-user-annotate").booleanValue();
}
+ /**
+ * Returns the encoding options set by the user for text output.
+ * @return The text output encoding.
+ */
public String optionTXTEncoding() {
// Never null.
return getStringValue("txt-encoding");
}
+ /**
+ * Returns the PDF version selected by the user for document output.
+ * @return The PDF version to be used for document output.
+ */
public String optionPDFVersion() {
return getStringValue("pdf-version");
}
Modified: trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java 2007-02-15 01:37:51 UTC (rev 8707)
@@ -39,30 +39,57 @@
*/
public abstract class OutputTarget implements org.axsl.output.OutputTarget {
+ /** The stream to which output should be written. */
private OutputStream outputStream;
+
+ /** The name of the application generating the output (used in document
+ * metadata). */
private String applicationName;
+
+ /** The short name of the application generating the output (used in
+ * document metadata). */
private String applicationNameShort;
+
+ /** The version of the application generating the output (used in document
+ * metadata). */
private String applicationVersion;
+
+ /** The short version of the URL of the developer organization creating the
+ * output (used in document metadata). */
private String developerURLShort;
+
+ /** Indicates whether SVG text should be stroked in the output document. */
private boolean strokeSVGText;
+
+ /** The logger. */
private Log logger;
+
+ /** The FontConsumer used by the document. */
private FontConsumer fontConsumer;
+ /** The output configuration options. */
private OutputConfig options;
/**
- *
+ * Constructor.
+ * @param logger The logger.
+ * @param outputConfig The output configuration.
*/
public OutputTarget(final Log logger, final OutputConfig outputConfig) {
this.logger = logger;
this.options = outputConfig;
}
+ /**
+ * Returns the logger.
+ * @return The logger.
+ */
public Log getLogger() {
return this.logger;
}
/**
+ * Returns the FontConsumer.
* @return The FontConsumer implementation which should be used by this
* Renderer.
*/
@@ -70,10 +97,17 @@
return this.fontConsumer;
}
+ /**
+ * {@inheritDoc}
+ */
public void setOutputStream(final OutputStream stream) {
this.outputStream = stream;
}
+ /**
+ * Returns the OutputStream.
+ * @return The OutputStream.
+ */
public OutputStream getOutputStream() {
return this.outputStream;
}
@@ -87,7 +121,8 @@
}
/**
- * @return The name of the application that is creating the output.
+ * Returns the name of the application creating the output.
+ * @return The name of the application creating the output.
*/
public String getApplicationName() {
return applicationName;
@@ -101,6 +136,7 @@
}
/**
+ * Returns the short name of the application creating the output.
* @return The "short" name of the application that is creating the
* output.
* For example, if the name of the application is "XYZ Document Processor",
@@ -118,6 +154,8 @@
}
/**
+ * Returna the current version of the application that is creating the
+ * output.
* @return The current version of the application that is creating the
* output.
*/
@@ -133,6 +171,7 @@
}
/**
+ * Returns a short version of the URL of the developer.
* @return The shortened version of the URL to the home-page of the
* developer. For example, if the URL is "http://www.xyz.com", return
* "www.xyz.com".
@@ -148,11 +187,15 @@
this.developerURLShort = developerURLShort;
}
+ /**
+ * {@inheritDoc}
+ */
public void setStrokeSVGText(final boolean stroke) {
this.strokeSVGText = stroke;
}
/**
+ * Indicates whether SVG text should be converted to strokes.
* @return True if SVG text should be converted to strokes instead of
* rendered as characters of a Font.
*/
@@ -161,13 +204,14 @@
}
/**
- * @param fontConsumer The fontConsumer to set.
+ * {@inheritDoc}
*/
public void setFontConsumer(final FontConsumer fontConsumer) {
this.fontConsumer = fontConsumer;
}
/**
+ * Returns the configuration options.
* @return Returns the options.
*/
public OutputConfig getOptions() {
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-15 01:37:51 UTC (rev 8707)
@@ -17,8 +17,6 @@
<suppress checks="Javadoc[MVS].*"
files="org.foray.mif.*"/>
<suppress checks="Javadoc[MVS].*"
- files="org.foray.output.*"/>
- <suppress checks="Javadoc[MVS].*"
files="org.foray.pdf.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.pioneer.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-15 01:52:07
|
Revision: 8708
http://svn.sourceforge.net/foray/?rev=8708&view=rev
Author: victormote
Date: 2007-02-14 17:52:04 -0800 (Wed, 14 Feb 2007)
Log Message:
-----------
Javadoc improvements.
Modified Paths:
--------------
trunk/foray/doc/web/app/using/release.html
trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/doc/web/app/using/release.html
===================================================================
--- trunk/foray/doc/web/app/using/release.html 2007-02-15 01:37:51 UTC (rev 8707)
+++ trunk/foray/doc/web/app/using/release.html 2007-02-15 01:52:04 UTC (rev 8708)
@@ -51,7 +51,8 @@
its methods have been replaced by standar Java 5.0 String and Character
methods.</li>
<li>Completion of javadoc API documentation for the FOrayGraphic,
- FOrayHyphen-R, FOrayOutput, FOrayApp, and FOrayCore modules.</li>
+ FOrayHyphen-R, FOrayOutput, FOrayLayout, FOrayApp, and FOrayCore
+ modules.</li>
<li>The FOrayGraphicServer constructor no longer requires the name of the
parser class as a parameter.</li>
</ul>
Modified: trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
===================================================================
--- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-02-15 01:37:51 UTC (rev 8707)
+++ trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-02-15 01:52:04 UTC (rev 8708)
@@ -60,15 +60,15 @@
*/
public abstract class LayoutStrategy implements LineBreakHandler, Layout {
+ /** The logger. */
private Log logger;
- /**
- * The AreaTree instance that this layout system is processing.
- */
+ /** The AreaTree instance that this layout system is processing. */
private AreaTree areaTree;
/**
* Constructor.
+ * @param logger The logger.
*/
public LayoutStrategy(final Log logger) {
this.logger = logger;
@@ -90,18 +90,34 @@
processPageSequence(pageCollection);
}
+ /**
+ * Performs layout on one PageCollection.
+ * @param pageCollection The (empty) page collection into which layout
+ * should be placed. (The PageCollection has a reference to the FOTree
+ * PageSequence that has the content to be laid out).
+ * @throws AreaWException For errors during layout.
+ */
public abstract void processPageSequence(PageCollection pageCollection)
throws AreaWException;
/**
- * For a given page, layout the static content on that page. This method
- * allows PageCollection to generate blank pages as needed, and to call
- * back to the LayoutStrategy for layout of the static content, without
- * having to know the specifics of the layout process.
+ * For a given region, layout the static content for that region.
+ * This method allows PageCollection to generate blank pages as needed, and
+ * to call back to the LayoutStrategy for layout of the static content,
+ * without having to know the specifics of the layout process.
+ * @param pageSequence The page sequence whose static content is being
+ * processed.
+ * @param region The page region whose static content is being laid out.
+ * @param area The region area into which the static content should be
+ * placed.
+ * @throws AreaWException For errors during layout.
*/
public abstract void layoutStaticContent(PageSequence pageSequence,
Region region, RegionArea area) throws AreaWException;
+ /**
+ * {@inheritDoc}
+ */
public void handleLineBreakText(final LineOutput lineOutput,
final LineText text, final int startOffset, final int sizeInChars,
final int sizeInline, final boolean hasDiscretionaryHyphen,
@@ -127,6 +143,9 @@
}
}
+ /**
+ * {@inheritDoc}
+ */
public void handleLineBreakNonText(final LineOutput lineOutput,
final LineNonText nonText, final int sizeInline)
throws TextException {
@@ -162,6 +181,13 @@
}
}
+ /**
+ * Ensures that a given {@link LineOutput} instance is an instance of
+ * {@link LineArea}, throwing an exception if it is not.
+ * @param lineOutput The instance to be tested.
+ * @throws TextException If <code>lineOutput</code> is not an instance of
+ * {@link LineArea}.
+ */
private void checkLayoutTarget(final LineOutput lineOutput)
throws TextException {
if (! (lineOutput instanceof LineArea)) {
@@ -170,12 +196,18 @@
}
}
+ /**
+ * Returns the logger.
+ * @return The logger.
+ */
public Log getLogger() {
return this.logger;
}
/**
* Formats the static content of the current page.
+ * @param pageArea The page area whose static content should be laid out.
+ * @throws AreaWException For errors during layout.
*/
public void formatStaticContent(final PageArea pageArea)
throws AreaWException {
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-15 01:37:51 UTC (rev 8707)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-15 01:52:04 UTC (rev 8708)
@@ -13,8 +13,6 @@
<suppress checks="Javadoc[MVS].*"
files="org.foray.fotree.*"/>
<suppress checks="Javadoc[MVS].*"
- files="org.foray.layout.*"/>
- <suppress checks="Javadoc[MVS].*"
files="org.foray.mif.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.pdf.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-15 14:27:27
|
Revision: 8709
http://svn.sourceforge.net/foray/?rev=8709&view=rev
Author: victormote
Date: 2007-02-15 06:27:26 -0800 (Thu, 15 Feb 2007)
Log Message:
-----------
Clean up some constant usages.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2007-02-15 01:52:04 UTC (rev 8708)
+++ trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2007-02-15 14:27:26 UTC (rev 8709)
@@ -158,6 +158,9 @@
/** Constant defining an invalid character value. */
public static final char INVALID_UNICODE_CHARACTER = Character.MAX_VALUE;
+ /** Constant defining the largest integral color value, that is, 255. */
+ public static final short MAXIMUM_INTEGRAL_COLOR_VALUE = 255;
+
/**
* Private constructor. This is a utility class, and should never be
* instantiated.
Modified: trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2007-02-15 01:52:04 UTC (rev 8708)
+++ trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2007-02-15 14:27:26 UTC (rev 8709)
@@ -33,6 +33,7 @@
package org.foray.render;
+import org.foray.common.FOrayConstants;
import org.foray.common.MUserAgent;
import org.foray.common.SVGUserAgent;
import org.foray.common.WKConstants;
@@ -80,6 +81,7 @@
import java.awt.Color;
import java.awt.Rectangle;
+import java.awt.Transparency;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
@@ -93,19 +95,15 @@
public abstract class Renderer extends OutputTarget
implements org.axsl.output.Renderer, org.axsl.areaR.RenderVisitor {
- /** The number of millipoints in a point. */
- public static final float MILLIPOINT_CONVERSION_FACTOR = 1000f;
-
- /** The number of pixels in an inch. */
- public static final byte PIXELS_PER_INCH = 96;
-
- /** */
- public static final int MAXIMUM_INTEGRAL_COLOR_VALUE = 255;
-
+ /** Magic-number constant used in the conversion of color to gray. */
protected static final float SHADING_WEIGHT_RED = 0.3f;
+ /* TODO: Replace these magic numbers for color-to-gray conversion with
+ * AWT methods that convert from one colorspace to another. */
+ /** Magic-number constant used in the conversion of color to gray. */
protected static final float SHADING_WEIGHT_GREEN = 0.59f;
+ /** Magic-number constant used in the conversion of color to gray. */
protected static final float SHADING_WEIGHT_BLUE = 0.11f;
private AreaTree areaTree;
@@ -156,7 +154,7 @@
}
final Color backgroundColor = area.traitBackgroundColor();
- if (backgroundColor.getAlpha() == MAXIMUM_INTEGRAL_COLOR_VALUE) {
+ if (backgroundColor.getTransparency() == Transparency.OPAQUE) {
this.drawRectangle(x, y, w, -h, false, null, true, backgroundColor);
}
}
@@ -268,7 +266,7 @@
* @return The pixel density, per inch.
*/
public int getPixelsPerInch() {
- return PIXELS_PER_INCH;
+ return FOrayConstants.DEFAULT_SCREEN_RESOLUTION;
}
/**
@@ -604,12 +602,12 @@
* @return The converted value in points.
*/
protected static float toPoints(final int millipoints) {
- return millipoints / MILLIPOINT_CONVERSION_FACTOR;
+ return millipoints / WKConstants.MILLIPOINTS_PER_POINT;
}
/**
* Converts a color value in the range 0 - 255 to its floating-point
- * equivelant, that is, a value in the range 0 - 1.
+ * equivalant, that is, a value in the range 0 - 1.
* @param integralColorComponent The integral color value to be converted, a
* value in the range 0 - 255.
* @return The floating point value, a value in the range 0 - 1.
@@ -617,8 +615,8 @@
protected static float colorToFloat(final int integralColorComponent) {
int colorValue = Math.max(integralColorComponent, 0);
colorValue = Math.min(integralColorComponent,
- MAXIMUM_INTEGRAL_COLOR_VALUE);
- return colorValue / MAXIMUM_INTEGRAL_COLOR_VALUE;
+ WKConstants.MAXIMUM_INTEGRAL_COLOR_VALUE);
+ return colorValue / WKConstants.MAXIMUM_INTEGRAL_COLOR_VALUE;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-17 03:46:57
|
Revision: 8716
http://svn.sourceforge.net/foray/?rev=8716&view=rev
Author: victormote
Date: 2007-02-16 19:46:57 -0800 (Fri, 16 Feb 2007)
Log Message:
-----------
Javadoc improvements.
Modified Paths:
--------------
trunk/foray/doc/web/app/using/release.html
trunk/foray/foray-text/src/java/org/foray/text/TextServer.java
trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java
trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java
trunk/foray/foray-text/src/java/org/foray/text/line/PatientLineBreaker.java
trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/doc/web/app/using/release.html
===================================================================
--- trunk/foray/doc/web/app/using/release.html 2007-02-17 02:37:36 UTC (rev 8715)
+++ trunk/foray/doc/web/app/using/release.html 2007-02-17 03:46:57 UTC (rev 8716)
@@ -51,7 +51,7 @@
its methods have been replaced by standar Java 5.0 String and Character
methods.</li>
<li>Completion of javadoc API documentation for the FOrayGraphic,
- FOrayHyphen-R, FOrayOutput, FOrayLayout, FOrayApp, and FOrayCore
+ FOrayHyphen-R, FOrayOutput, FOrayLayout, FOrayText, FOrayApp, and FOrayCore
modules.</li>
<li>The FOrayGraphicServer constructor no longer requires the name of the
parser class as a parameter.</li>
Modified: trunk/foray/foray-text/src/java/org/foray/text/TextServer.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/TextServer.java 2007-02-17 02:37:36 UTC (rev 8715)
+++ trunk/foray/foray-text/src/java/org/foray/text/TextServer.java 2007-02-17 03:46:57 UTC (rev 8716)
@@ -54,6 +54,8 @@
* Constructor.
* @param logger The logger instance that should be used to log
* user messages.
+ * @param hyphenationServer The hyphenation server that should be used to
+ * resolved hyphenation questions.
*/
public TextServer(final Log logger,
final HyphenationServer hyphenationServer) {
@@ -61,10 +63,18 @@
this.hyphenationServer = hyphenationServer;
}
+ /**
+ * Returns the logger.
+ * @return The logger.
+ */
public Log getLogger() {
return this.logger;
}
+ /**
+ * Returns the hyphenation server.
+ * @return The hyphenation server.
+ */
public HyphenationServer getHyphenationServer() {
return this.hyphenationServer;
}
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java 2007-02-17 02:37:36 UTC (rev 8715)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java 2007-02-17 03:46:57 UTC (rev 8716)
@@ -47,13 +47,22 @@
public abstract class EagerLineBreaker extends LineBreaker
implements org.axsl.text.line.EagerLineBreaker {
+ /** The current handler for line output. */
private LineOutput currentOutput;
+ /** The current line content being processed. */
private LineContent currentLineContent;
/**
* Constructor.
- * @param control
+ * @param server The "parent" TextServer.
+ * @param control The client object that provides process-time information,
+ * specifically by providing line length information.
+ * @param handler The client object that is responsible for taking the
+ * results of the line-breaking work and doing something with it.
+ * @param fontConsumer Provides the line-breaking system with the
+ * FontConsumer instance that should be used for interfacing with the Font
+ * subsystem.
*/
public EagerLineBreaker(final TextServer server,
final LineBreakControl control,
@@ -63,7 +72,11 @@
/**
* Run a piece of content through the line-breaking system.
+ * @param lineContent The line content to be processed.
+ * @param start The staring index in the line content to be processed.
+ * @param end The ending index in the line content to be processed.
* @throws TextException For errors during line-breaking.
+ * @return The index in the line to the last character processed.
*/
protected int processInput(final LineContent lineContent, final int start,
final int end) throws TextException {
@@ -114,9 +127,9 @@
* Standard processing of non-text items for eager line breaking systems.
* @param nonTextItem The non-text item that should be added to the current
* line.
- * @return 1 if the item was successfully added to the current line, or 0
- * if there is not enough room on the line for it.
- * @throws TextException
+ * @return If the item was successfully added to the current line, returns
+ * 1, or returns 0 if there is not enough room on the line for it.
+ * @throws TextException For errors during processing.
*/
protected int processLineNonText(final LineNonText nonTextItem)
throws TextException {
@@ -141,20 +154,51 @@
return 1;
}
+ /**
+ * Processes a line-text item.
+ * @param lineText The line-text item to be processed.
+ * @param start The index to the first character in the line-text item that
+ * should be processed.
+ * @param end The index to the last character in the line-text item that
+ * should be processed.
+ * @return The index to the last character in the line-text item that was
+ * actually processed.
+ * @throws TextException For errors during line-breaking.
+ */
protected abstract int processLineText(LineText lineText, int start,
int end) throws TextException;
- protected int currentLineWidthRemaining() throws TextException {
+ /**
+ * Copmputes the amount of space available on the current line.
+ * @return The size, in millipoints, of available space on the current line.
+ */
+ protected int currentLineWidthRemaining() {
return lineReceivingContent().capacityTotal()
- lineReceivingContent().capacityUsed();
}
+ /**
+ * Add new line-content for processing.
+ * @param content The line-content to be processed.
+ * @param start The index to the first element in the line-content to be
+ * processed.
+ * @param end The index to the last element in the line-content to be
+ * processed.
+ * @param output The line-output onto which the text should be placed.
+ * @return The index to the last element in the line-content that was
+ * actually processed.
+ * @throws TextException For errors during text processing.
+ */
public int addLineContent(final LineContent content, final int start,
final int end, final LineOutput output) throws TextException {
setCurrentLine(output);
return processInput(content, start, end);
}
+ /**
+ * Return the current line-output.
+ * @return The current line-output.
+ */
protected LineOutput lineReceivingContent() {
return this.getCurrentLine();
}
@@ -187,10 +231,18 @@
}
}
+ /**
+ * Sets the current line-output item.
+ * @param line The new line-output item.
+ */
public void setCurrentLine(final LineOutput line) {
this.currentOutput = line;
}
+ /**
+ * Returns the current line-output item.
+ * @return The current line-output item.
+ */
public LineOutput getCurrentLine() {
return this.currentOutput;
}
@@ -203,7 +255,10 @@
return this.currentLineContent;
}
- protected void overflowMessage() throws TextException {
+ /**
+ * Writes a standard overflow message to the logger.
+ */
+ protected void overflowMessage() {
getLogger().info("Content overflows line "
+ this.lineReceivingContent());
}
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2007-02-17 02:37:36 UTC (rev 8715)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2007-02-17 03:46:57 UTC (rev 8716)
@@ -47,26 +47,33 @@
/** The "parent" TextServer. */
private TextServer server;
- /**
- * The client object that provides process-time information, specifically
- * by providing line length information.
- */
+ /** The client object that provides process-time information, specifically
+ * by providing line length information. */
private LineBreakControl control;
- /**
- * Provides the line-breaking system with the FontConsumer instance that
- * should be used for interfacing with the Font subsystem.
- */
+ /** Provides the line-breaking system with the FontConsumer instance that
+ * should be used for interfacing with the Font subsystem. */
private FontConsumer fontConsumer;
+ /** The client object that is responsible for taking the results of the
+ * line-breaking work and doing something with it. */
private LineBreakHandler handler;
+ /** Keeps track of whether the current chunk of text is lower-case for
+ * purposes of faux small-caps or not. */
+ private boolean inLowerCase = false;
+
/**
- * Keeps track of whether the current chunk of text is lower-case for
- * purposes of faux small-caps or not.
+ * Constructor.
+ * @param server The "parent" TextServer.
+ * @param control The client object that provides process-time information,
+ * specifically by providing line length information.
+ * @param handler The client object that is responsible for taking the
+ * results of the line-breaking work and doing something with it.
+ * @param fontConsumer Provides the line-breaking system with the
+ * FontConsumer instance that should be used for interfacing with the Font
+ * subsystem.
*/
- private boolean inLowerCase = false;
-
protected LineBreaker(final TextServer server,
final LineBreakControl control,
final LineBreakHandler handler, final FontConsumer fontConsumer) {
@@ -76,6 +83,13 @@
this.fontConsumer = fontConsumer;
}
+ /**
+ * Returns the width of a character.
+ * @param lineText The object containing information about font and font
+ * size needed to get the width.
+ * @param codePoint The Unicode code point whose width is needed.
+ * @return The width of <code>codePoint</code>, in millipoints.
+ */
public int getCharWidth(final LineText lineText, final int codePoint) {
final FontUse fontUse = lineText.inlinePrimaryFont();
final Font font = fontUse.getFont();
@@ -91,6 +105,12 @@
+ lineText.inlineLetterSpacingOptimum();
}
+ /**
+ * Indicates whether a given Unicode code point should be considered to be
+ * lower case.
+ * @param codePoint The Unicode code point to be tested.
+ * @return True iff <code>codePoint</code> is lower case.
+ */
public boolean isLowerCase(final int codePoint) {
if (codePoint > Character.MAX_VALUE) {
return false;
@@ -103,15 +123,23 @@
return false;
}
+ /**
+ * Returns the width of the hyphenation character.
+ * @param lineText The object containing information about font, font size,
+ * and hyphenation character needed to get the width.
+ * @return The width of the hyphenation character, in millipoints.
+ */
public int getHyphenWidth(final LineText lineText) {
final int hyphenChar = lineText.inlineHyphenationCharacter();
return getCharWidth(lineText, hyphenChar);
}
/**
- * Helper method to determine if the character is a
- * space with normal behaviour. Normal behaviour means that
- * it's not non-breaking
+ * Helper method to determine if the character is a space with normal
+ * behavior. Normal behaviour means that it's not non-breaking, that is,
+ * that we are permitted to use it as a line-breaking opportunity.
+ * @param codePoint The Unicode code point to be tested.
+ * @return True iff <code>codePoint</code> is a normal space.
*/
public static boolean isSpace(final int codePoint) {
if (codePoint == ' '
@@ -133,8 +161,9 @@
}
/**
- * Method to determine if the character is a nonbreaking
- * space.
+ * Determine if a given character is a non-breaking space.
+ * @param codePoint The Unicode code point to be tested.
+ * @return True iff <code>codePoint</code> is a non-breaking space.
*/
public static boolean isNonBreakingSpace(final int codePoint) {
if (codePoint == '\u00A0'
@@ -175,6 +204,11 @@
return false;
}
+ /**
+ * Indicates whether a given character should be considered whitespace.
+ * @param codePoint The Unicode code point to be tested.
+ * @return True iff <code>codePoint</code> is whitespace.
+ */
public static boolean isWhitespace(final int codePoint) {
if (isSpace(codePoint)
|| (codePoint == '\n')
@@ -186,6 +220,11 @@
return false;
}
+ /**
+ * Indicates whether a given character is a zero-width space.
+ * @param codePoint The Unicode code point to be tested.
+ * @return True iff <code>codePoint</code> is a zero-width space.
+ */
public static boolean isZeroWidthSpace(final int codePoint) {
if ((codePoint == '\u200B')
|| codePoint == '\uFEFF') {
@@ -194,6 +233,14 @@
return false;
}
+ /**
+ * Computes the width of a given character.
+ * @param lineText The object which knows the font and font size information
+ * for the text tested.
+ * @param codePoint The Unicode code point whose width is needed.
+ * @param whitespaceWidth The pre-computed whitespace width for this font.
+ * @return The computed width of the given code point.
+ */
protected int charWidth(final LineText lineText, final int codePoint,
final int whitespaceWidth) {
if (isZeroWidthSpace(codePoint)) {
@@ -214,18 +261,28 @@
return charWidth;
}
+ /**
+ * Returns the font consumer.
+ * @return The font consumer.
+ */
protected FontConsumer getFontConsumer() {
return this.fontConsumer;
}
+ /**
+ * Returns the logger.
+ * @return The logger.
+ */
public Log getLogger() {
return this.server.getLogger();
}
/**
- * Checks if it's legal to break a word in the middle
- * based on the current language property.
- * @return true if legal to break word in the middle
+ * Indicates the validity of breaking a word in the middle without
+ * hyphenation, based on a given language. The CJKV languages allow this,
+ * since the ideographs are themselves distinct words or word-like concepts.
+ * @param language The language code to be tested.
+ * @return True iff it is legal to break a word in the middle
*/
public static boolean canBreakMidWord(final String language) {
if (language == null) {
@@ -247,10 +304,20 @@
return false;
}
+ /**
+ * Return the text server.
+ * @return The text server.
+ */
public TextServer getTextServer() {
return this.server;
}
+ /**
+ * Compute the width of a given word.
+ * @param lineText The object providing font and font size information.
+ * @param word The word whose size is needed.
+ * @return The width, in millipoints, of <code>word</code>.
+ */
public int getWordWidth(final LineText lineText, final CharSequence word) {
final FontUse fontUse = lineText.inlinePrimaryFont();
final Font font = fontUse.getFont();
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/PatientLineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/PatientLineBreaker.java 2007-02-17 02:37:36 UTC (rev 8715)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/PatientLineBreaker.java 2007-02-17 03:46:57 UTC (rev 8716)
@@ -46,6 +46,8 @@
public abstract class PatientLineBreaker extends LineBreaker
implements org.axsl.text.line.PatientLineBreaker {
+ /** The number of new elements in the buffer that should be created when
+ * it needs to increase its capacity. */
private static final int LINE_COUNT_INCREMENT = 20;
/**
@@ -77,7 +79,14 @@
/**
* Constructor.
- * @param control
+ * @param server The "parent" TextServer.
+ * @param control The client object that provides process-time information,
+ * specifically by providing line length information.
+ * @param handler The client object that is responsible for taking the
+ * results of the line-breaking work and doing something with it.
+ * @param fontConsumer Provides the line-breaking system with the
+ * FontConsumer instance that should be used for interfacing with the Font
+ * subsystem.
*/
public PatientLineBreaker(final TextServer server,
final LineBreakControl control,
@@ -93,6 +102,11 @@
this.content.add(contentItem);
}
+ /**
+ * Returns the line currently having content placed upon it.
+ * @return The line currently having content placed upon it.
+ * @throws TextException If a new line is needed and cannot be created.
+ */
protected LineOutput lineReceivingContent() throws TextException {
if (this.lineReceivingContent < 0) {
this.lineReceivingContent ++;
@@ -101,6 +115,11 @@
return this.outputLines[this.lineReceivingContent];
}
+ /**
+ * Ensures that we have enough lines in the buffer to be able to process
+ * the line currently being processed.
+ * @throws TextException If a new line is needed and cannot be created.
+ */
private void updateLineLengths() throws TextException {
while (this.lineReceivingContent > this.lastLineRequested) {
this.lastLineRequested ++;
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2007-02-17 02:37:36 UTC (rev 8715)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2007-02-17 03:46:57 UTC (rev 8716)
@@ -48,59 +48,58 @@
*/
public class SolitaryLineBreaker extends EagerLineBreaker {
- /**
- * Possible value for {@link #previousCharacter}, indicating that there
- * was no previous character.
- */
+ /** Possible value for {@link #previousCharacter}, indicating that there
+ * was no previous character. */
protected static final byte NOTHING = 0;
- /**
- * Possible value for {@link #previousCharacter}, indicating that the
+ /** Possible value for {@link #previousCharacter}, indicating that the
* previous character was an interword connectors, like whitespace or a
- * hyphen.
- */
+ * hyphen. */
protected static final byte CONNECTOR = 1;
- /**
- * Possible value for {@link #previousCharacter}, indicating that the
- * previous character was text within a "word".
- */
+ /** Possible value for {@link #previousCharacter}, indicating that the
+ * previous character was text within a "word". */
protected static final byte TEXT = 2;
- /**
- * The width, in millipoints, of the content that has definitely made it
- * onto the line.
- */
+ /** The width, in millipoints, of the content that has definitely made it
+ * onto the line. */
private int finalWidth = 0;
- /**
- * One of {@link #NOTHING}, {@link #CONNECTOR}, or {@link #TEXT},
- * indicating the class of the previous character.
- */
+ /** One of {@link #NOTHING}, {@link #CONNECTOR}, or {@link #TEXT},
+ * indicating the class of the previous character. */
private byte previousCharacter = SolitaryLineBreaker.NOTHING;
- /**
- * The accumulated width, in millipoints, of whitespace before the current
- * word.
- */
+ /** The accumulated width, in millipoints, of whitespace before the current
+ * word. */
private int spaceWidth = 0;
/** The width, in millipoints, of the current word so far. */
private int wordWidth = 0;
- /**
- * Index into the char array indicating the first character in this word.
- */
+ /** Index into the char array indicating the first character in this
+ * word. */
private int wordStart = 0;
+ /** The current line-text item being processed. */
private LineText currentLineText = null;
+
+ /** The current characters from {@link #currentLineText}, available here
+ * merely as a convenience. */
private char[] currentChars = null;
+ /** Indicates whether leading spaces can be ignored. */
private boolean canEatLeadingSpaces = true;
/**
* Constructor.
- * @param control
+ * @param server The "parent" TextServer.
+ * @param control The client object that provides process-time information,
+ * specifically by providing line length information.
+ * @param handler The client object that is responsible for taking the
+ * results of the line-breaking work and doing something with it.
+ * @param fontConsumer Provides the line-breaking system with the
+ * FontConsumer instance that should be used for interfacing with the Font
+ * subsystem.
*/
public SolitaryLineBreaker(final TextServer server,
final LineBreakControl control,
@@ -108,6 +107,9 @@
super(server, control, handler, fontConsumer);
}
+ /**
+ * {@inheritDoc}
+ */
protected int processLineText(final LineText lineText, final int start,
final int end) throws TextException {
this.currentLineText = lineText;
@@ -237,6 +239,13 @@
return endIndex + 1;
}
+ /**
+ * Returns the size of the first word in the next text item.
+ * @param lineText The line-text item being processed.
+ * @param start The index of the first character eligible for layout.
+ * @param end The index of the last character eligible for layout.
+ * @return The index through which layout was actually completed.
+ */
private int sizeFirstWordNextText(final LineText lineText, final int start,
final int end) {
int size = 0;
@@ -306,8 +315,8 @@
* For characters that allows (but do not demand) a line break, reset the
* word-related variables to that everything up to this point is included
* on the current line.
- * @param lineText
- * @param codePoint
+ * @param lineText The line-text item being processed.
+ * @param codePoint The current Unicode code point being processed.
*/
private void processLineBreakPossibility(final LineText lineText,
final int codePoint) {
@@ -340,6 +349,8 @@
* @param sizeInline The size, in millipoints, of the content being created.
* @param isHyphenated Indicates whether an end-of-line hyphen should be
* added to this content.
+ * @throws TextException For errors disposing of the line-breaking
+ * results.
*/
private void createLineContent(final int startIndex, final int endIndex,
final int sizeInline, final boolean isHyphenated)
@@ -361,9 +372,12 @@
}
/**
- * Extracts word for hyphenation and calls the hyphenation package.
+ * Extracts a word for hyphenation and calls the hyphenation package.
* Handles quotation marks at the beginning of words, but not in an
* internationalized way.
+ * @return The index to the last element in the current line that has been
+ * processed.
+ * @throws TextException For errors during the hyphenation.
*/
public int tryHyphenation() throws TextException {
/*
@@ -419,6 +433,14 @@
/**
* Extracts from a hyphenated word the best (most greedy) fit.
+ * @param lineText The line-text item containing font and font size
+ * information.
+ * @param word The hyphenated word.
+ * @param hyph The hyphenation object containing the list of hyphenation
+ * opportunities.
+ * @return The index to the selected hyphenation opportunity, or -1 if no
+ * opportunity was selected.
+ * @throws TextException For errors during break selection.
*/
private int selectDiscretionaryHyphenationPoint(final LineText lineText,
final String word, final Hyphenation hyph) throws TextException {
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-17 02:37:36 UTC (rev 8715)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-17 03:46:57 UTC (rev 8716)
@@ -20,8 +20,6 @@
files="org.foray.pioneer.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.render.*"/>
- <suppress checks="Javadoc[MV].*"
- files="org.foray.text.*"/>
<!-- Suppress Javadoc package documentation for test directories. -->
<suppress checks="PackageHtml"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-17 19:01:53
|
Revision: 8721
http://svn.sourceforge.net/foray/?rev=8721&view=rev
Author: victormote
Date: 2007-02-17 11:01:53 -0800 (Sat, 17 Feb 2007)
Log Message:
-----------
Conform to aXSL change: Removed unneeded marker interface FObjMixed.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjMixed.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjMixedPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
Added Paths:
-----------
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BasicLinkPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InlinePL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/WrapperPL.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjMixed.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjMixed.java 2007-02-17 17:44:19 UTC (rev 8720)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjMixed.java 2007-02-17 19:01:53 UTC (rev 8721)
@@ -34,7 +34,7 @@
* base class for representation of mixed content formatting objects
* and their processing
*/
-public abstract class FObjMixed extends FObj implements org.axsl.foR.FObjMixed {
+public abstract class FObjMixed extends FObj {
private StringBuffer textBuffer;
Added: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BasicLinkPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BasicLinkPL.java (rev 0)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BasicLinkPL.java 2007-02-17 19:01:53 UTC (rev 8721)
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * 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.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.pioneer;
+
+import org.axsl.foR.fo.BasicLink;
+
+/**
+ * Pioneer Layout for a {@link BasicLink}.
+ */
+public class BasicLinkPL extends FObjMixedPL {
+
+ public BasicLinkPL(final BasicLink realFObj, final PioneerLS layout) {
+ super(realFObj, layout);
+ }
+
+}
Property changes on: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BasicLinkPL.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2007-02-17 17:44:19 UTC (rev 8720)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2007-02-17 19:01:53 UTC (rev 8721)
@@ -33,7 +33,6 @@
import org.axsl.areaW.LineArea;
import org.axsl.areaW.NormalBlockArea;
import org.axsl.foR.FONode;
-import org.axsl.foR.FObj;
import org.axsl.foR.fo.Block;
import org.axsl.foR.fo.RetrieveMarker;
import org.axsl.fontR.FontConsumer;
@@ -54,7 +53,7 @@
private LineArea currentLineArea;
- public BlockPL(final FObj realFObj, final PioneerLS layout) {
+ public BlockPL(final Block realFObj, final PioneerLS layout) {
super(realFObj, layout);
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjMixedPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjMixedPL.java 2007-02-17 17:44:19 UTC (rev 8720)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjMixedPL.java 2007-02-17 19:01:53 UTC (rev 8721)
@@ -29,29 +29,27 @@
package org.foray.pioneer;
import org.axsl.areaW.Area;
-
import org.axsl.areaW.AreaWException;
import org.axsl.foR.FONode;
import org.axsl.foR.FObj;
-import org.axsl.foR.FObjMixed;
import org.axsl.foR.fo.RetrieveMarker;
/**
- * Pioneer Layout for {@link FObjMixed}.
+ * Pioneer Layout for FOTree nodes that have mixed content.
*/
-public class FObjMixedPL extends FObjPL {
+public abstract class FObjMixedPL extends FObjPL {
public FObjMixedPL(final FObj realFObj, final PioneerLS layout) {
super(realFObj, layout);
}
- public FObjMixed getFObjMixed() {
- return (FObjMixed) this.getFONode();
+ public FObj getFObjMixed() {
+ return (FObj) this.getFONode();
}
public int layout(final Area area, final RetrieveMarker retrieveMarker)
throws AreaWException {
- final FObjMixed node = getFObjMixed();
+ final FObj node = getFObjMixed();
if (getProgress() == FONodePL.START) {
setProgress(0);
}
Added: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InlinePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InlinePL.java (rev 0)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InlinePL.java 2007-02-17 19:01:53 UTC (rev 8721)
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * 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.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.pioneer;
+
+import org.axsl.foR.fo.Inline;
+
+/**
+ * Pioneer Layout for a {@link Inline}.
+ */
+public class InlinePL extends FObjMixedPL {
+
+ public InlinePL(final Inline realFObj, final PioneerLS layout) {
+ super(realFObj, layout);
+ }
+
+}
Property changes on: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InlinePL.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-02-17 17:44:19 UTC (rev 8720)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-02-17 19:01:53 UTC (rev 8721)
@@ -364,7 +364,7 @@
}
public FONodeProxy makeProxy(final Inline node) {
- return new FObjMixedPL(node, this);
+ return new InlinePL(node, this);
}
public FONodeProxy makeProxy(final InlineContainer node) {
@@ -472,7 +472,7 @@
}
public FONodeProxy makeProxy(final Wrapper node) {
- return new FObjMixedPL(node, this);
+ return new WrapperPL(node, this);
}
public FONodeProxy makeProxy(final RegionAfter node) {
@@ -504,7 +504,7 @@
}
public FONodeProxy makeProxy(final BasicLink node) {
- return new FObjMixedPL(node, this);
+ return new BasicLinkPL(node, this);
}
public FONodeProxy makeProxy(final SVGElement node) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2007-02-17 17:44:19 UTC (rev 8720)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2007-02-17 19:01:53 UTC (rev 8721)
@@ -45,7 +45,7 @@
/**
* Pioneer Layout for {@link Table}.
*/
-public class TablePL extends BlockPL {
+public class TablePL extends FObjPL {
private int bodyCount = 0;
Added: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/WrapperPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/WrapperPL.java (rev 0)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/WrapperPL.java 2007-02-17 19:01:53 UTC (rev 8721)
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * 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.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.pioneer;
+
+import org.axsl.foR.fo.Wrapper;
+
+/**
+ * Pioneer Layout for a {@link Wrapper}.
+ */
+public class WrapperPL extends FObjMixedPL {
+
+ public WrapperPL(final Wrapper realFObj, final PioneerLS layout) {
+ super(realFObj, layout);
+ }
+
+}
Property changes on: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/WrapperPL.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-17 21:31:59
|
Revision: 8724
http://svn.sourceforge.net/foray/?rev=8724&view=rev
Author: victormote
Date: 2007-02-17 13:31:58 -0800 (Sat, 17 Feb 2007)
Log Message:
-----------
Conform to aXSL change: Remove no-longer-needed BasicLinkArea interface.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/BasicLinkArea.java
trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-02-17 19:57:46 UTC (rev 8723)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-02-17 21:31:58 UTC (rev 8724)
@@ -1078,12 +1078,22 @@
}
/**
- * If this Area is descended from a fo:basic-link, return the link type
- * for that link.
- * @return One of: {@link LinkType#EXTERNAL} or
- * {@link LinkType#INTERNAL}. If this area is not part
- * of a link, returns null.
+ * {@inheritDoc}
*/
+ public boolean isLinkRoot() {
+ if (linkType() == null) {
+ return false;
+ }
+ if (this.getParentArea() != null
+ && this.getParentArea().linkType() != null) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public LinkType linkType() {
final BasicLink link = this.traitGeneratedBy().getBasicLink(this);
if (link == null) {
@@ -1093,10 +1103,7 @@
}
/**
- * If this Area is descended from a fo:basic-link, return the link
- * destination (either internal-destination or external-destination).
- * @return String representation of either internal-destination or
- * external-destination.
+ * {@inheritDoc}
*/
public String linkDestination() {
final BasicLink link = this.traitGeneratedBy().getBasicLink(this);
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BasicLinkArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BasicLinkArea.java 2007-02-17 19:57:46 UTC (rev 8723)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BasicLinkArea.java 2007-02-17 21:31:58 UTC (rev 8724)
@@ -36,8 +36,7 @@
* Areas generated by the fo:basic-link object.
*/
public class BasicLinkArea extends AbstractInlineArea
- implements org.axsl.areaR.BasicLinkArea,
- org.axsl.areaW.BasicLinkArea {
+ implements org.axsl.areaW.BasicLinkArea {
public BasicLinkArea(final BasicLink generatedBy, final LineArea parentArea,
final RetrieveMarker retrieveMarker) {
Modified: trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2007-02-17 19:57:46 UTC (rev 8723)
+++ trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2007-02-17 21:31:58 UTC (rev 8724)
@@ -45,7 +45,6 @@
import org.axsl.areaR.AreaRException;
import org.axsl.areaR.AreaTree;
import org.axsl.areaR.BackgroundArea;
-import org.axsl.areaR.BasicLinkArea;
import org.axsl.areaR.BeforeFloatArea;
import org.axsl.areaR.BlockContainerArea;
import org.axsl.areaR.BookmarkTreeArea;
@@ -583,18 +582,10 @@
}
/**
- * {@inheritDoc}
- */
- public void render(final BasicLinkArea area) {
- createBasicLink(area);
- renderChildren(area);
- }
-
- /**
- * Creates a link from a {@link BasicLinkArea}.
+ * Creates a link from a given {@link Area}.
* @param area The area from which the link should be created.
*/
- protected abstract void createBasicLink(BasicLinkArea area);
+ protected abstract void createBasicLink(Area area);
/**
* {@inheritDoc}
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-02-17 19:57:46 UTC (rev 8723)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-02-17 21:31:58 UTC (rev 8724)
@@ -34,7 +34,6 @@
import org.foray.render.Renderer;
import org.axsl.areaR.Area;
-import org.axsl.areaR.BasicLinkArea;
import org.axsl.areaR.BookmarkTreeArea;
import org.axsl.areaR.ExternalGraphicArea;
import org.axsl.areaR.ForeignObjectArea;
@@ -591,7 +590,7 @@
/**
* {@inheritDoc}
*/
- protected void createBasicLink(final BasicLinkArea area) {
+ protected void createBasicLink(final Area area) {
}
/**
Modified: trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java 2007-02-17 19:57:46 UTC (rev 8723)
+++ trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java 2007-02-17 21:31:58 UTC (rev 8724)
@@ -41,7 +41,7 @@
import org.foray.render.PrintRenderer;
import org.foray.render.Renderer;
-import org.axsl.areaR.BasicLinkArea;
+import org.axsl.areaR.Area;
import org.axsl.areaR.BookmarkTreeArea;
import org.axsl.areaR.ExternalGraphicArea;
import org.axsl.areaR.ForeignObjectArea;
@@ -651,7 +651,7 @@
/**
* {@inheritDoc}
*/
- protected void createBasicLink(final BasicLinkArea area) {
+ protected void createBasicLink(final Area area) {
/* TODO: Implement this. */
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2007-02-17 19:57:46 UTC (rev 8723)
+++ trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2007-02-17 21:31:58 UTC (rev 8724)
@@ -39,7 +39,6 @@
import org.axsl.areaR.Area;
import org.axsl.areaR.AreaRException;
-import org.axsl.areaR.BasicLinkArea;
import org.axsl.areaR.BookmarkArea;
import org.axsl.areaR.BookmarkTitleArea;
import org.axsl.areaR.BookmarkTreeArea;
@@ -458,7 +457,7 @@
/**
* {@inheritDoc}
*/
- protected void createBasicLink(final BasicLinkArea area) {
+ protected void createBasicLink(final Area area) {
boolean externalLink = false;
if (area.linkType() == LinkType.EXTERNAL) {
externalLink = true;
Modified: trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2007-02-17 19:57:46 UTC (rev 8723)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2007-02-17 21:31:58 UTC (rev 8724)
@@ -39,7 +39,6 @@
import org.foray.render.PrintRenderer;
import org.axsl.areaR.Area;
-import org.axsl.areaR.BasicLinkArea;
import org.axsl.areaR.BookmarkTreeArea;
import org.axsl.areaR.ForeignObjectArea;
import org.axsl.areaR.GeneralInlineArea;
@@ -891,7 +890,7 @@
/**
* {@inheritDoc}
*/
- protected void createBasicLink(final BasicLinkArea area) {
+ protected void createBasicLink(final Area area) {
}
/**
Modified: trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java 2007-02-17 19:57:46 UTC (rev 8723)
+++ trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java 2007-02-17 21:31:58 UTC (rev 8724)
@@ -33,7 +33,6 @@
import org.foray.render.Renderer;
import org.axsl.areaR.Area;
-import org.axsl.areaR.BasicLinkArea;
import org.axsl.areaR.BookmarkTreeArea;
import org.axsl.areaR.ExternalGraphicArea;
import org.axsl.areaR.ForeignObjectArea;
@@ -451,7 +450,7 @@
/**
* {@inheritDoc}
*/
- protected void createBasicLink(final BasicLinkArea area) {
+ protected void createBasicLink(final Area area) {
}
/**
Modified: trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java 2007-02-17 19:57:46 UTC (rev 8723)
+++ trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java 2007-02-17 21:31:58 UTC (rev 8724)
@@ -33,7 +33,7 @@
import org.foray.render.PrintRenderer;
import org.foray.render.Renderer;
-import org.axsl.areaR.BasicLinkArea;
+import org.axsl.areaR.Area;
import org.axsl.areaR.BookmarkTreeArea;
import org.axsl.areaR.ExternalGraphicArea;
import org.axsl.areaR.ForeignObjectArea;
@@ -595,7 +595,7 @@
/**
* {@inheritDoc}
*/
- protected void createBasicLink(final BasicLinkArea area) {
+ protected void createBasicLink(final Area area) {
}
/**
Modified: trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2007-02-17 19:57:46 UTC (rev 8723)
+++ trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2007-02-17 21:31:58 UTC (rev 8724)
@@ -40,7 +40,6 @@
import org.axsl.areaR.Area;
import org.axsl.areaR.AreaNode;
-import org.axsl.areaR.BasicLinkArea;
import org.axsl.areaR.BeforeFloatArea;
import org.axsl.areaR.BlockContainerArea;
import org.axsl.areaR.BookmarkTreeArea;
@@ -403,7 +402,7 @@
/**
* {@inheritDoc}
*/
- protected void createBasicLink(final BasicLinkArea area) {
+ protected void createBasicLink(final Area area) {
}
/**
@@ -503,19 +502,6 @@
/**
* {@inheritDoc}
*/
- public void render(final BasicLinkArea area) {
- final StringBuffer buffer = new StringBuffer();
- outputGeneratedBy(area, buffer);
- outputDimension(area, buffer);
- writeStartTag(area, buffer);
- outputAllRectangles(area);
- renderChildren(area);
- writeEndTag(area);
- }
-
- /**
- * {@inheritDoc}
- */
public void render(final InlineArea area) {
final StringBuffer buffer = new StringBuffer();
outputGeneratedBy(area, buffer);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-18 18:47:51
|
Revision: 8730
http://svn.sourceforge.net/foray/?rev=8730&view=rev
Author: victormote
Date: 2007-02-18 10:47:45 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
Add a test to the Renderer package.
Modified Paths:
--------------
trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java
trunk/foray/foray-render/.classpath
Added Paths:
-----------
trunk/foray/foray-render/src/javatest/
trunk/foray/foray-render/src/javatest/org/
trunk/foray/foray-render/src/javatest/org/foray/
trunk/foray/foray-render/src/javatest/org/foray/render/
trunk/foray/foray-render/src/javatest/org/foray/render/TestFOrayRender.java
trunk/foray/foray-render/src/javatest/org/foray/render/TestRenderer.java
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java 2007-02-18 18:18:09 UTC (rev 8729)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java 2007-02-18 18:47:45 UTC (rev 8730)
@@ -32,6 +32,7 @@
import org.foray.graphic.TestFOrayGraphic;
import org.foray.hyphenR.TestFOrayHyphenR;
import org.foray.ps.TestFOrayPS;
+import org.foray.render.TestFOrayRender;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -51,6 +52,7 @@
testSuite.addTest(TestFOrayGraphic.suite());
testSuite.addTest(TestFOrayHyphenR.suite());
testSuite.addTest(TestFOrayFOTree.suite());
+ testSuite.addTest(TestFOrayRender.suite());
return testSuite;
}
Modified: trunk/foray/foray-render/.classpath
===================================================================
--- trunk/foray/foray-render/.classpath 2007-02-18 18:18:09 UTC (rev 8729)
+++ trunk/foray/foray-render/.classpath 2007-02-18 18:47:45 UTC (rev 8730)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
+ <classpathentry kind="src" path="src/javatest"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/FOrayCommon"/>
<classpathentry kind="src" path="/axslFont-R"/>
@@ -15,5 +16,6 @@
<classpathentry kind="src" path="/axslPDF-W"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayPS"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslOutput"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Added: trunk/foray/foray-render/src/javatest/org/foray/render/TestFOrayRender.java
===================================================================
--- trunk/foray/foray-render/src/javatest/org/foray/render/TestFOrayRender.java (rev 0)
+++ trunk/foray/foray-render/src/javatest/org/foray/render/TestFOrayRender.java 2007-02-18 18:47:45 UTC (rev 8730)
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2006 The FOray Project.
+ * http://www.foray.org
+ *
+ * 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.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.render;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Handles testing for the FOrayFOTree module.
+ */
+public class TestFOrayRender extends TestCase {
+
+ /**
+ * Builds a test suite for all classes in this module.
+ * @return The built test suite.
+ */
+ public static Test suite() {
+ final TestSuite testSuite = new TestSuite();
+
+ testSuite.addTestSuite(TestRenderer.class);
+
+ return testSuite;
+ }
+
+}
Property changes on: trunk/foray/foray-render/src/javatest/org/foray/render/TestFOrayRender.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/foray-render/src/javatest/org/foray/render/TestRenderer.java
===================================================================
--- trunk/foray/foray-render/src/javatest/org/foray/render/TestRenderer.java (rev 0)
+++ trunk/foray/foray-render/src/javatest/org/foray/render/TestRenderer.java 2007-02-18 18:47:45 UTC (rev 8730)
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * 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.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.render;
+
+import junit.framework.TestCase;
+
+/**
+ * JUnit test class for the class {@link Renderer}.
+ */
+public class TestRenderer extends TestCase {
+
+ /**
+ * Unit test for the method {@link Renderer#toPoints(int)}.
+ */
+ public void testToPoints() {
+ final float testValue = Renderer.toPoints(749);
+ assertEquals(.749, testValue, .0005);
+ }
+
+}
Property changes on: trunk/foray/foray-render/src/javatest/org/foray/render/TestRenderer.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-18 22:47:23
|
Revision: 8738
http://svn.sourceforge.net/foray/?rev=8738&view=rev
Author: victormote
Date: 2007-02-18 14:47:23 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
Conform to aXSL change: Remove the exposed LineArea.optimize() method, and force the Area tree to run this before even making the area available to the renderer.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-02-18 22:28:27 UTC (rev 8737)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-02-18 22:47:23 UTC (rev 8738)
@@ -270,7 +270,7 @@
* is ready to be rendered. It makes the page available to be rendered.
*/
public void layoutComplete() throws AreaWException {
- purgeEmptyNodes(this);
+ optimize(this);
final List<Marker> markers = getMarkers();
if (markers != null) {
for (int i = 0; i < markers.size(); i++) {
@@ -289,7 +289,7 @@
* @param area The Area instance that is the root of the tree fragment
* currently being examined.
*/
- private void purgeEmptyNodes(final Area area) {
+ private void optimize(final Area area) {
/*
* Need post-traversal, so that the child nodes are examined before the
* parent nodes. For example, we want an empty LineArea to be purged
@@ -300,15 +300,20 @@
for (int i = 0; i < children.size(); i++) {
final Object object = children.get(i);
if (object instanceof Area) {
- purgeEmptyNodes((Area) object);
+ optimize((Area) object);
}
}
- /* Remove empty line areas. */
- if (area instanceof LineArea
- && ! area.hasChildren()) {
- area.remove();
- getLogger().debug("Removing empty line-area.");
+ if (area instanceof LineArea) {
+ if (area.hasChildren()) {
+ /* Optimize non-empty lines. */
+ final LineArea lineArea = (LineArea) area;
+ lineArea.optimize();
+ } else {
+ /* Remove empty line areas. */
+ area.remove();
+ getLogger().debug("Removing empty line-area.");
+ }
}
/* Remove empty block areas only if they are generated by FONodes that
Modified: trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2007-02-18 22:28:27 UTC (rev 8737)
+++ trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2007-02-18 22:47:23 UTC (rev 8738)
@@ -527,7 +527,6 @@
* {@inheritDoc}
*/
public void render(final LineArea area) {
- area.optimize();
renderChildren(area);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-18 23:27:35
|
Revision: 8739
http://svn.sourceforge.net/foray/?rev=8739&view=rev
Author: victormote
Date: 2007-02-18 15:27:36 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
Conform to aXSL change: Remove possibility of requesting both an odd and an even page.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2007-02-18 22:47:23 UTC (rev 8738)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2007-02-18 23:27:36 UTC (rev 8739)
@@ -143,24 +143,16 @@
}
/**
- * Creates a new page area for the given parameters
- * @param inputIsBlank True iff this page will be empty (e.g. forced even or
- * odd break, or forced page count).
- * @return A Page layout object based on the page master selected from the
- * params.
+ * {@inheritDoc}
*/
- public PageArea getNextPage(final boolean forceOdd, final boolean forceEven,
+ public PageArea getNextPage(final Force forceValue,
final boolean inputIsBlank) throws AreaWException {
boolean isBlank = inputIsBlank;
- if (forceOdd && forceEven) {
- throw new AreaWException("Cannot force a page to be both odd and "
- + "even.");
- }
- if (forceOdd) {
+ if (Force.ODD.equals(forceValue)) {
if (getCurrentPageNumber() % 2 == 0) {
isBlank = true;
}
- } else if (forceEven) {
+ } else if (Force.EVEN.equals(forceValue)) {
if (getCurrentPageNumber() % 2 == 1) {
isBlank = true;
}
@@ -318,7 +310,7 @@
}
private void makeBlankPage() throws AreaWException {
- getNextPage(false, false, true);
+ getNextPage(Force.NONE, true);
}
public AreaTree getAreaTree() {
@@ -366,7 +358,7 @@
*/
PageRA startingPage = null;
/* TODO: Remove cast on following line. */
- startingPage = (PageRA) getNextPage(false, false, false);
+ startingPage = (PageRA) getNextPage(Force.NONE, false);
final RegionRABody bodyArea = startingPage.getRegionRABody();
final MainRA mainRA = bodyArea.getMainRA();
final RegionBody body = (RegionBody) mainRA.traitGeneratedBy();
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-02-18 22:47:23 UTC (rev 8738)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-02-18 23:27:36 UTC (rev 8739)
@@ -33,6 +33,7 @@
import org.axsl.areaR.RegionBodyArea;
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaW.AreaWException;
+import org.axsl.areaW.PageCollection.Force;
import org.axsl.common.AbsoluteAxis;
import org.axsl.common.AbsoluteDirection;
import org.axsl.common.Compass;
@@ -436,7 +437,7 @@
*/
public Area getOverflowArea(final Area childRequesting)
throws AreaWException {
- return (PageRA) getPageCollection().getNextPage(false, false, false);
+ return (PageRA) getPageCollection().getNextPage(Force.NONE, false);
}
/**
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-02-18 22:47:23 UTC (rev 8738)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-02-18 23:27:36 UTC (rev 8739)
@@ -178,8 +178,8 @@
isBlankPage = true;
}
}
- final PageArea newPage = pageCollection.getNextPage(false, false,
- isBlankPage);
+ final PageArea newPage = pageCollection.getNextPage(
+ PageCollection.Force.NONE, isBlankPage);
setPendingFootnotes(newPage);
currentPage = newPage;
/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-20 02:27:01
|
Revision: 8743
http://svn.sourceforge.net/foray/?rev=8743&view=rev
Author: victormote
Date: 2007-02-19 18:15:46 -0800 (Mon, 19 Feb 2007)
Log Message:
-----------
Stub in testing for AreaTree.
Modified Paths:
--------------
trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java
trunk/foray/foray-areatree/.classpath
Added Paths:
-----------
trunk/foray/foray-areatree/src/javatest/
trunk/foray/foray-areatree/src/javatest/org/
trunk/foray/foray-areatree/src/javatest/org/foray/
trunk/foray/foray-areatree/src/javatest/org/foray/area/
trunk/foray/foray-areatree/src/javatest/org/foray/area/TestFOrayAreaTree.java
trunk/foray/foray-areatree/src/javatest/org/foray/area/TestPageCollection.java
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java 2007-02-19 01:22:48 UTC (rev 8742)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java 2007-02-20 02:15:46 UTC (rev 8743)
@@ -28,6 +28,7 @@
package org.foray.app;
+import org.foray.area.TestFOrayAreaTree;
import org.foray.fotree.TestFOrayFOTree;
import org.foray.graphic.TestFOrayGraphic;
import org.foray.hyphenR.TestFOrayHyphenR;
@@ -52,6 +53,7 @@
testSuite.addTest(TestFOrayGraphic.suite());
testSuite.addTest(TestFOrayHyphenR.suite());
testSuite.addTest(TestFOrayFOTree.suite());
+ testSuite.addTest(TestFOrayAreaTree.suite());
testSuite.addTest(TestFOrayRender.suite());
return testSuite;
}
Modified: trunk/foray/foray-areatree/.classpath
===================================================================
--- trunk/foray/foray-areatree/.classpath 2007-02-19 01:22:48 UTC (rev 8742)
+++ trunk/foray/foray-areatree/.classpath 2007-02-20 02:15:46 UTC (rev 8743)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
+ <classpathentry kind="src" path="src/javatest"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/FOrayCommon"/>
<classpathentry kind="src" path="/axslFont-R"/>
@@ -12,5 +13,6 @@
<classpathentry kind="var" path="FORAY_LIB_ROOT/batik.jar"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/commons-logging.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslArea-W"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Added: trunk/foray/foray-areatree/src/javatest/org/foray/area/TestFOrayAreaTree.java
===================================================================
--- trunk/foray/foray-areatree/src/javatest/org/foray/area/TestFOrayAreaTree.java (rev 0)
+++ trunk/foray/foray-areatree/src/javatest/org/foray/area/TestFOrayAreaTree.java 2007-02-20 02:15:46 UTC (rev 8743)
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * 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.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.area;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Handles testing for the FOrayAreaTree module.
+ */
+public class TestFOrayAreaTree extends TestCase {
+
+ /**
+ * Builds a test suite for all classes in this module.
+ * @return The built test suite.
+ */
+ public static Test suite() {
+ final TestSuite testSuite = new TestSuite();
+
+ testSuite.addTestSuite(TestPageCollection.class);
+
+ return testSuite;
+ }
+
+}
Property changes on: trunk/foray/foray-areatree/src/javatest/org/foray/area/TestFOrayAreaTree.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/foray-areatree/src/javatest/org/foray/area/TestPageCollection.java
===================================================================
--- trunk/foray/foray-areatree/src/javatest/org/foray/area/TestPageCollection.java (rev 0)
+++ trunk/foray/foray-areatree/src/javatest/org/foray/area/TestPageCollection.java 2007-02-20 02:15:46 UTC (rev 8743)
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * 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.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.area;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for the class {@link PageCollection}.
+ */
+public class TestPageCollection extends TestCase {
+
+ /**
+ * Test of {@link PageCollection#padPagesAtBeginning()}.
+ */
+ public void testPadPagesAtBeginning() {
+ return;
+ }
+
+}
Property changes on: trunk/foray/foray-areatree/src/javatest/org/foray/area/TestPageCollection.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-20 04:10:41
|
Revision: 8745
http://svn.sourceforge.net/foray/?rev=8745&view=rev
Author: victormote
Date: 2007-02-19 20:10:42 -0800 (Mon, 19 Feb 2007)
Log Message:
-----------
Conform to aXSL change: Remove no-longer-needed method.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-02-20 03:46:55 UTC (rev 8744)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-02-20 04:10:42 UTC (rev 8745)
@@ -32,6 +32,7 @@
import org.axsl.areaW.Area;
import org.axsl.areaW.AreaTreeEvent;
import org.axsl.areaW.AreaTreeListener;
+import org.axsl.areaW.AreaWException;
import org.axsl.areaW.PageArea;
import org.axsl.foR.FObj;
import org.axsl.foR.fo.Bookmark;
@@ -90,8 +91,11 @@
this.getNormalLinkage().registerGeneratedArea(this);
}
+ /**
+ * {@inheritDoc}
+ */
public PageCollection makePageCollection(
- final PageSequence pageSequence) {
+ final PageSequence pageSequence) throws AreaWException {
final int lastPageNumber;
final int collectionsProcessed = this.pageCollectionsProcessed.size();
if (collectionsProcessed > 0) {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2007-02-20 03:46:55 UTC (rev 8744)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2007-02-20 04:10:42 UTC (rev 8745)
@@ -74,10 +74,11 @@
* @param areaTree {@inheritDoc}
*/
public PageCollection(final PageSequence pageSeq, final AreaTree areaTree,
- final int lastPageNumber) {
+ final int lastPageNumber) throws AreaWException {
super(pageSeq, areaTree);
this.pageMasterResolver = pageSeq.makePageMasterResolver(
lastPageNumber);
+ padPagesAtBeginning();
}
/*
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2007-02-20 03:46:55 UTC (rev 8744)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2007-02-20 04:10:42 UTC (rev 8745)
@@ -270,9 +270,9 @@
final Renderer renderer = (Renderer) this.outputTarget;
final org.axsl.areaR.AreaTree areaTreeR = getRenderedAreaTree();
renderer.setAreaTree(areaTreeR);
- final org.axsl.areaW.PageCollection pageCollection =
- areaTree.makePageCollection(pageSequence);
+ final org.axsl.areaW.PageCollection pageCollection;
try {
+ pageCollection = areaTree.makePageCollection(pageSequence);
layout.formatPageSequence(pageCollection);
} catch (final AreaWException e) {
throw new FOrayException(e);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-02-20 03:46:55 UTC (rev 8744)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-02-20 04:10:42 UTC (rev 8745)
@@ -159,7 +159,6 @@
final PageSequence pageSeq = pageCollection.getPageSequence();
final org.axsl.foR.fo.Flow flow = pageSeq.getFlow();
flow.setProxy(new FlowPL(flow, this));
- pageCollection.padPagesAtBeginning();
// make pages and layout content
int status = Status.UNKNOWN;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-20 04:25:01
|
Revision: 8746
http://svn.sourceforge.net/foray/?rev=8746&view=rev
Author: victormote
Date: 2007-02-19 20:25:01 -0800 (Mon, 19 Feb 2007)
Log Message:
-----------
1. Conform to aXSL change renaming a method.
2. Move the execution of that method to the superclass.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java
trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2007-02-20 04:10:42 UTC (rev 8745)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2007-02-20 04:25:01 UTC (rev 8746)
@@ -267,7 +267,7 @@
* PageCollection to meet the related PageSequence's constraints.
* @throws AreaWException
*/
- public void padPagesAtEnd() throws AreaWException {
+ public void layoutComplete() throws AreaWException {
final PageSequence pageSeq = getPageSequence();
switch (pageSeq.traitForcePageCount(this)) {
case AUTO: {
Modified: trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
===================================================================
--- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-02-20 04:10:42 UTC (rev 8745)
+++ trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-02-20 04:25:01 UTC (rev 8746)
@@ -88,6 +88,7 @@
}
}
processPageSequence(pageCollection);
+ pageCollection.layoutComplete();
}
/**
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-02-20 04:10:42 UTC (rev 8745)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-02-20 04:25:01 UTC (rev 8746)
@@ -192,7 +192,6 @@
currentPage.layoutComplete();
status = flowPL.getStatus();
}
- pageCollection.padPagesAtEnd();
}
public void setPendingFootnotes(final PageArea pageArea) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-21 20:02:34
|
Revision: 8748
http://svn.sourceforge.net/foray/?rev=8748&view=rev
Author: victormote
Date: 2007-02-21 12:02:35 -0800 (Wed, 21 Feb 2007)
Log Message:
-----------
Conform to aXSL change: Added some generic return types.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/OrderedTreeNode.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/OrderedTreeNode.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/OrderedTreeNode.java 2007-02-21 19:59:43 UTC (rev 8747)
+++ trunk/foray/foray-common/src/java/org/foray/common/OrderedTreeNode.java 2007-02-21 20:02:35 UTC (rev 8748)
@@ -128,7 +128,7 @@
/**
* {@inheritDoc}
*/
- public abstract List getChildren();
+ public abstract List<? extends OrderedTreeNode> getChildren();
/**
* {@inheritDoc}
@@ -145,7 +145,7 @@
if (childIndex >= getChildren().size()) {
return null;
}
- return (TreeNode) getChildren().get(childIndex);
+ return getChildren().get(childIndex);
}
/**
@@ -188,11 +188,11 @@
/**
* {@inheritDoc}
*/
- public List getSiblings() {
+ public List<? extends OrderedTreeNode> getSiblings() {
if (parent == null) {
return null;
}
- final List children = parent.getChildren();
+ final List<? extends OrderedTreeNode> children = parent.getChildren();
if (children == null) {
return null;
}
@@ -213,18 +213,18 @@
/**
* {@inheritDoc}
*/
- public org.axsl.common.OrderedTreeNode getPreviousSibling() {
+ public OrderedTreeNode getPreviousSibling() {
final int mySiblingIndex = siblingIndex();
if (mySiblingIndex < 1) {
return null;
}
- return (OrderedTreeNode) getSiblings().get(mySiblingIndex - 1);
+ return getSiblings().get(mySiblingIndex - 1);
}
/**
* {@inheritDoc}
*/
- public org.axsl.common.OrderedTreeNode getNextSibling() {
+ public OrderedTreeNode getNextSibling() {
final int mySiblingIndex = siblingIndex();
if (mySiblingIndex < 0) {
return null;
@@ -233,7 +233,7 @@
if (mySiblingIndex >= getSiblings().size() - 1) {
return null;
}
- return (OrderedTreeNode) getSiblings().get(mySiblingIndex + 1);
+ return getSiblings().get(mySiblingIndex + 1);
}
/**
@@ -271,7 +271,7 @@
/**
* {@inheritDoc}
*/
- public org.axsl.common.OrderedTreeNode getLastChild() {
+ public OrderedTreeNode getLastChild() {
final List children = getChildren();
if (children == null) {
return null;
@@ -285,12 +285,12 @@
/**
* {@inheritDoc}
*/
- public org.axsl.common.OrderedTreeNode nextPreOrderNode() {
+ public OrderedTreeNode nextPreOrderNode() {
// Any children?
if (getChildCount() > 0) {
- return (OrderedTreeNode) getChildren().get(0);
+ return getChildren().get(0);
}
- org.axsl.common.OrderedTreeNode currentNode = this;
+ OrderedTreeNode currentNode = this;
while (currentNode != null) {
currentNode = currentNode.getNextSibling();
if (currentNode != null) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2007-02-21 19:59:43 UTC (rev 8747)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2007-02-21 20:02:35 UTC (rev 8748)
@@ -28,6 +28,7 @@
package org.foray.fotree;
+import org.foray.common.OrderedTreeNode;
import org.foray.common.WKConstants;
import org.foray.common.XMLCharacter;
import org.foray.fotree.fo.obj.BookmarkTitle;
@@ -111,7 +112,7 @@
this.filterStatus = FILTER_PRE_TRANSFORM;
}
- public List getChildren() {
+ public List<? extends OrderedTreeNode> getChildren() {
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-02-23 00:43:54
|
Revision: 8751
http://svn.sourceforge.net/foray/?rev=8751&view=rev
Author: victormote
Date: 2007-02-22 16:43:55 -0800 (Thu, 22 Feb 2007)
Log Message:
-----------
Make a couple of logged messages at level "debug".
Modified Paths:
--------------
trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java
Modified: trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2007-02-21 20:18:31 UTC (rev 8750)
+++ trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2007-02-23 00:43:55 UTC (rev 8751)
@@ -156,7 +156,7 @@
final EntityResolver entityResolver = makeEntityResolver(
this.sessionConfig);
xmlReader.setEntityResolver(entityResolver);
- logger.info("Config: Using "
+ logger.debug("Config: Using "
+ xmlReader.getClass().getName() + " as SAX2 Parser.");
return xmlReader;
} catch (final javax.xml.parsers.ParserConfigurationException e) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java 2007-02-21 20:18:31 UTC (rev 8750)
+++ trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java 2007-02-23 00:43:55 UTC (rev 8751)
@@ -316,7 +316,7 @@
final URL baseFontUrl = this.fontServer.getBaseFontURL();
if (baseFontUrl != null) {
value = baseFontUrl.toExternalForm();
- getLogger().info("FONT_BASE_DIRECTORY interpreted as: "
+ getLogger().debug("FONT_BASE_DIRECTORY interpreted as: "
+ value);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|