Thread: [FOray-commit] SF.net SVN: foray: [9961] trunk/foray (Page 18)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-07-09 20:44:10
|
Revision: 9961
http://svn.sourceforge.net/foray/?rev=9961&view=rev
Author: victormote
Date: 2007-07-09 13:44:13 -0700 (Mon, 09 Jul 2007)
Log Message:
-----------
Fix various issues related to moving the hyphenation directories around.
Modified Paths:
--------------
trunk/foray/foray-hyphen/scripts/build.xml
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenationServer.java
Added Paths:
-----------
trunk/foray/lib/foray-hyphen-0.3-rsrc.jar
Removed Paths:
-------------
trunk/foray/lib/foray-hyphen-r-0.3-rsrc.jar
Modified: trunk/foray/foray-hyphen/scripts/build.xml
===================================================================
--- trunk/foray/foray-hyphen/scripts/build.xml 2007-07-09 20:26:12 UTC (rev 9960)
+++ trunk/foray/foray-hyphen/scripts/build.xml 2007-07-09 20:44:13 UTC (rev 9961)
@@ -9,7 +9,7 @@
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
- <property name="module" value="hyphen-r"/>
+ <property name="module" value="hyphen"/>
<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"/>
@@ -20,7 +20,7 @@
<property name="resource.dir" value="${module.dir}/resource"/>
<property name="hyph.source" value="${resource.dir}/hyph-patterns"/>
<property name="hyph.build"
- value="${build.dir}/resource/org/foray/hyphenR/resource/patterns"/>
+ value="${build.dir}/resource/org/foray/hyphen/resource/patterns"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -64,7 +64,7 @@
<pathelement location="${classes.dir}"/>
</path>
<taskdef name="serHyph"
- classname="org.foray.hyphenR.SerializeHyphPattern"
+ classname="org.foray.hyphen.SerializeHyphPattern"
classpathref="hyph-classpath"/>
<serHyph includes="*.xml"
sourceDir="${hyph.source}"
@@ -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.sandbox}/foray-hyphen-r/build/ant/resource">
+ dir="${foray.sandbox}/foray-hyphen/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.sandbox}/foray-hyphen-r/build/ant/classes">
+ dir="${foray.sandbox}/foray-hyphen/build/ant/classes">
<include name="**"/>
</fileset>
<jar jarfile="${jar.file}">
@@ -139,7 +139,7 @@
<echo message="Producing the javadoc files "/>
<mkdir dir="${build.dir}/javadoc-api"/>
<javadoc
- packagenames="org.foray.hyphenR"
+ packagenames="org.foray.hyphen"
sourcepath="${src.dir}/java"
destdir="${build.dir}/javadoc-api"
classpathref="libs-build-classpath"
@@ -148,7 +148,7 @@
windowtitle="FOray Hyphenation API"
doctitle="FOray Hyphenation API"
bottom="Copyright © 2004 The FOray Project. All Rights Reserved."
- overview="${src.dir}/java/org/foray/hyphenR/overview.html"
+ overview="${src.dir}/java/org/foray/hyphen/overview.html"
use="true"
access="public"
failonerror="true">
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenationServer.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenationServer.java 2007-07-09 20:26:12 UTC (rev 9960)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenationServer.java 2007-07-09 20:44:13 UTC (rev 9961)
@@ -64,7 +64,7 @@
/** The path to the hyphenation patterns. */
public static final String PATTERN_RESOURCE_PATH =
- "org/foray/hyphenR/resource/patterns";
+ "org/foray/hyphen/resource/patterns";
/** Standard text for some user messages. */
private static final String PATTERN_MISSING_TEXT =
Copied: trunk/foray/lib/foray-hyphen-0.3-rsrc.jar (from rev 9957, trunk/foray/lib/foray-hyphen-r-0.3-rsrc.jar)
===================================================================
(Binary files differ)
Deleted: 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-07-10 15:04:38
|
Revision: 9969
http://svn.sourceforge.net/foray/?rev=9969&view=rev
Author: victormote
Date: 2007-07-10 08:04:38 -0700 (Tue, 10 Jul 2007)
Log Message:
-----------
Conform to axsl change requiring an iterator over the PageSequence descendants of Root.
Modified Paths:
--------------
trunk/foray/foray-app/src/javatest/org/foray/app/area/AreaTreeCreator.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/area/AreaTreeCreator.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/area/AreaTreeCreator.java 2007-07-10 12:37:46 UTC (rev 9968)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/area/AreaTreeCreator.java 2007-07-10 15:04:38 UTC (rev 9969)
@@ -44,6 +44,7 @@
import org.axsl.area.AreaTreeException;
import java.io.IOException;
+import java.util.Iterator;
/**
* Singleton Helper class for tests that parses an input file and returns an
@@ -106,7 +107,9 @@
final Root root = foTree.getRootFo();
final AreaTree areaTree = this.areaTreeFactory.makeAreaTree(root);
final PioneerLS layout = this.layoutFactory.makeLayout();
- for (PageSequence pageSequence : root.getPageSequences()) {
+ final Iterator<PageSequence> iterator = root.getPageSequenceIterator();
+ while (iterator.hasNext()) {
+ final PageSequence pageSequence = iterator.next();
try {
final PageCollection collection = areaTree.makePageCollection(
pageSequence);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java 2007-07-10 12:37:46 UTC (rev 9968)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java 2007-07-10 15:04:38 UTC (rev 9969)
@@ -28,6 +28,7 @@
package org.foray.fotree.fo.obj;
+import org.foray.common.OrderedTreeNode;
import org.foray.fotree.FONode;
import org.foray.fotree.FOTreeBuilder;
import org.foray.fotree.FObj;
@@ -43,8 +44,10 @@
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.NoSuchElementException;
/**
* A "root" object in XSL-FO.
@@ -348,27 +351,6 @@
}
/**
- * Returns the descendant page-sequence objects as a list. Note that this
- * list is not necessarily complete until the entire document has been
- * parsed.
- * @return A list of descendant page-sequence objects.
- */
- public List<PageSequence> getPageSequences() {
- final ArrayList<PageSequence> psList = new ArrayList<PageSequence>();
- for (int i = 0; i < this.getChildCount(); i++) {
- final FONode child = this.getChildAt(i);
- if (child instanceof PageSequence) {
- final PageSequence ps = (PageSequence) child;
- psList.add(ps);
- }
- /* TODO: After we add a class for the page-sequence-wrapper
- * object, we need to add logic here to include its children as
- * well. */
- }
- return psList;
- }
-
- /**
* {@inheritDoc}
*/
public String getTitle() {
@@ -448,4 +430,76 @@
return false;
}
+ /**
+ * {@inheritDoc}
+ */
+ public Iterator<PageSequence> getPageSequenceIterator() {
+ return new PageSequenceIterator();
+ }
+
+ /**
+ * Inner class that iterates over the descendant PageSequence instances.
+ */
+ private final class PageSequenceIterator implements Iterator<PageSequence> {
+
+ /** An iterator over the descendants of our enclosing Root instance. */
+ private Iterator<OrderedTreeNode> descendantIterator;
+
+ /** The next PageSequence instance to be returned by this iterator. */
+ private PageSequence nextPageSequence;
+
+ /**
+ * Constructor.
+ */
+ private PageSequenceIterator() {
+ this.descendantIterator = Root.this.postOrderDescendantIterator();
+ this.updateNext();
+ }
+
+ /**
+ * Loads the instance variable nextPageSequence with the next item to
+ * be iterated, if possible, or null if there are no more items.
+ */
+ private void updateNext() {
+ this.nextPageSequence = null;
+ while (this.nextPageSequence == null) {
+ if (! descendantIterator.hasNext()) {
+ return;
+ }
+ final OrderedTreeNode node = descendantIterator.next();
+ if (node instanceof PageSequence) {
+ this.nextPageSequence = (PageSequence) node;
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean hasNext() {
+ return this.nextPageSequence != null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PageSequence next() {
+ if (this.nextPageSequence == null) {
+ throw new NoSuchElementException("Iterator is empty.");
+ }
+ final PageSequence next = this.nextPageSequence;
+ this.updateNext();
+ return next;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void remove() {
+ throw new UnsupportedOperationException("The \"remove\" operation "
+ + "is not supported by this iterator.");
+ }
+
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-10 20:59:45
|
Revision: 9971
http://svn.sourceforge.net/foray/?rev=9971&view=rev
Author: victormote
Date: 2007-07-10 13:59:46 -0700 (Tue, 10 Jul 2007)
Log Message:
-----------
Conform to axsl changes removing two super-interfaces.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractTablePart.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractTablePart.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractTablePart.java 2007-07-10 20:12:11 UTC (rev 9970)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractTablePart.java 2007-07-10 20:59:46 UTC (rev 9971)
@@ -42,8 +42,7 @@
* Abstract superclass for table-body, table-header, and table-footer objects
* in XSL-FO.
*/
-public abstract class AbstractTablePart extends FObj
- implements org.axsl.fo.fo.AbstractTablePart {
+public abstract class AbstractTablePart extends FObj {
/** The parent of this node. */
private Table parent;
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java 2007-07-10 20:12:11 UTC (rev 9970)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java 2007-07-10 20:59:46 UTC (rev 9971)
@@ -28,7 +28,6 @@
package org.foray.pioneer;
-import org.axsl.fo.fo.AbstractFlow;
import org.axsl.fo.fo.Flow;
import org.axsl.fo.fo.StaticContent;
@@ -46,13 +45,22 @@
private List<Integer> progressSnapshot;
/**
- * Constructor.
- * @param abstractFlow The FO Tree object which is being laid out.
+ * Constructor for flow.
+ * @param flow The flow object which is being laid out.
* @param layout The ancestor layout system.
*/
- public AbstractFlowPL(final AbstractFlow abstractFlow,
+ public AbstractFlowPL(final Flow flow, final PioneerLS layout) {
+ super(flow, layout);
+ }
+
+ /**
+ * Constructor for static-content.
+ * @param staticContent The static-content object which is being laid out.
+ * @param layout The ancestor layout system.
+ */
+ public AbstractFlowPL(final StaticContent staticContent,
final PioneerLS layout) {
- super(abstractFlow, layout);
+ super(staticContent, layout);
}
/**
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java 2007-07-10 20:12:11 UTC (rev 9970)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java 2007-07-10 20:59:46 UTC (rev 9971)
@@ -30,10 +30,9 @@
import org.axsl.area.AbstractTablePartContainer;
import org.axsl.area.AreaNode;
+import org.axsl.area.AreaTreeException;
import org.axsl.area.TableArea;
-import org.axsl.area.AreaTreeException;
import org.axsl.fo.FoNode;
-import org.axsl.fo.fo.AbstractTablePart;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Marker;
import org.axsl.fo.fo.Table;
@@ -54,26 +53,41 @@
private RowSpanMgr rowSpanMgr;
/**
- * Constructor.
- * @param tableBody The FO Tree object which is being laid out.
+ * Constructor for table-body.
+ * @param tableBody The table-body object which is being laid out.
* @param layout The ancestor layout system.
*/
- public AbstractTablePartPL(final AbstractTablePart tableBody,
+ public AbstractTablePartPL(final TableBody tableBody,
final PioneerLS layout) {
super(tableBody, layout);
}
/**
- * {@inheritDoc}
+ * Constructor for table-header.
+ * @param tableHeader The table-header object which is being laid out.
+ * @param layout The ancestor layout system.
*/
- public abstract AbstractTablePart getFONode();
+ public AbstractTablePartPL(final TableHeader tableHeader,
+ final PioneerLS layout) {
+ super(tableHeader, layout);
+ }
/**
+ * Constructor for table-footer.
+ * @param tableFooter The table-footer object which is being laid out.
+ * @param layout The ancestor layout system.
+ */
+ public AbstractTablePartPL(final TableFooter tableFooter,
+ final PioneerLS layout) {
+ super(tableFooter, layout);
+ }
+
+ /**
* {@inheritDoc}
*/
public Status layout(final AreaNode areaNode,
final GraftingPoint graftingPoint) throws AreaTreeException {
- final AbstractTablePart node = getFONode();
+ final FoNode node = getFONode();
final TableArea tableArea = (TableArea) areaNode;
final Table table = tableArea.traitGeneratedBy();
if (getProgress() == FONodePL.BREAK_AFTER) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-10 23:36:17
|
Revision: 9974
http://svn.sourceforge.net/foray/?rev=9974&view=rev
Author: victormote
Date: 2007-07-10 16:36:20 -0700 (Tue, 10 Jul 2007)
Log Message:
-----------
Conform to axsl (and XSL-FO 1.1) changes allowing page-sequence to return multiple flow objects.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2007-07-10 22:41:09 UTC (rev 9973)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2007-07-10 23:36:20 UTC (rev 9974)
@@ -67,7 +67,7 @@
* multiplicity of fo:flow in XSL 1.0 is cleared up - one (1)
* fo:flow per fo:page-sequence only.
*/
- private Flow flow = null;
+ private List<Flow> flows = new ArrayList<Flow>(1);
/** Handles page numbering and related formatting. */
private PageNumberGenerator pageNumberGenerator;
@@ -114,7 +114,7 @@
* {@inheritDoc}
*/
protected void validateDescendants() throws FoTreeException {
- if (flow == null) {
+ if (flows == null) {
throwException(getFullName() + "has no flow.");
}
}
@@ -148,15 +148,11 @@
* is not unique.
*/
public void addFlow(final Flow flow) throws FoTreeException {
- if (this.flow != null) {
- throwException("Only a single fo:flow permitted per "
- + getFullName());
- }
if (staticContentMap.containsKey(flow.traitFlowName())) {
throwException("flow-names must be unique within an "
+ getFullName());
}
- this.flow = flow;
+ this.flows.add(flow);
}
/**
@@ -167,7 +163,7 @@
*/
public void addStaticContent(final StaticContent staticContent)
throws FoTreeException {
- if (this.flow != null) {
+ if (this.flows != null) {
throwException("Static content ('" + staticContent.traitFlowName()
+ "') is not allowed after fo:flow");
}
@@ -264,8 +260,8 @@
/**
* {@inheritDoc}
*/
- public org.axsl.fo.fo.Flow getFlow() {
- return this.flow;
+ public List<org.axsl.fo.fo.Flow> getFlows() {
+ return this.flows;
}
/**
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-10 22:41:09 UTC (rev 9973)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-10 23:36:20 UTC (rev 9974)
@@ -175,7 +175,20 @@
public void processPageSequence(final PageCollection pageCollection)
throws AreaTreeException {
final PageSequence pageSeq = pageCollection.getPageSequence();
- final org.axsl.fo.fo.Flow flow = pageSeq.getFlow();
+ for (org.axsl.fo.fo.Flow flow : pageSeq.getFlows()) {
+ processFlow(pageCollection, flow);
+ }
+ }
+
+ /**
+ * Handles layout for one flow in the page-sequence.
+ * @param pageCollection The AreaTree PageCollection into which the flow is
+ * being laid out.
+ * @param flow The flow being processed.
+ * @throws AreaTreeException For errors during layout.
+ */
+ private void processFlow(final PageCollection pageCollection,
+ final org.axsl.fo.fo.Flow flow) throws AreaTreeException {
this.setLayoutProxy(flow, new FlowPL(flow, this));
// make pages and layout content
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-11 00:32:03
|
Revision: 9975
http://svn.sourceforge.net/foray/?rev=9975&view=rev
Author: victormote
Date: 2007-07-10 17:32:03 -0700 (Tue, 10 Jul 2007)
Log Message:
-----------
Conform to axsl (and XSL-FO 1.1) changes allowing multiple region-body instances on the same page.
Modified Paths:
--------------
trunk/foray/foray-app/src/javatest/org/foray/app/area/AbstractAreaTreeTest.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/area/AbstractAreaTreeTest.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/area/AbstractAreaTreeTest.java 2007-07-10 23:36:20 UTC (rev 9974)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/area/AbstractAreaTreeTest.java 2007-07-11 00:32:03 UTC (rev 9975)
@@ -56,7 +56,8 @@
protected NormalFlowRA getFirstNormalFlowArea(final AreaTree areaTree) {
final PageCollection pageCollection = getPageCollection(areaTree, 1);
final PageRA firstPage = getPage(pageCollection, 1);
- final RegionRABody regionBody = firstPage.getRegionBody();
+ final RegionRABody regionBody = firstPage.getRegionBody(
+ "xsl-region-body");
final MainRA main = regionBody.getMainRefArea();
AreaNode node = main.getChildAt(0);
assertTrue(node instanceof SpanRA);
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-07-10 23:36:20 UTC (rev 9974)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-07-11 00:32:03 UTC (rev 9975)
@@ -51,7 +51,10 @@
import org.axsl.galley.RenderVisitor;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Area containing a page.
@@ -68,8 +71,9 @@
/** The children of this node. */
private List<AreaNode> children = new ArrayList<AreaNode>();
- /** The child region-body. */
- private RegionRABody body;
+ /** The child region-body(s). */
+ private Map<String, RegionRABody> bodies =
+ new HashMap<String, RegionRABody>();
/** The child region-before. */
private RegionRA before;
@@ -201,8 +205,8 @@
/**
* {@inheritDoc}
*/
- public RegionRABody getRegionBody() {
- return this.body;
+ public Collection<RegionRABody> getRegionBodies() {
+ return this.bodies.values();
}
/**
@@ -259,14 +263,13 @@
*/
private void createRegionBody() {
final SimplePageMaster simplePageMaster = getPageMaster();
- if (simplePageMaster.getRegionBody() == null) {
- return;
+ for (RegionBody regionBody : simplePageMaster.getRegionBodies()) {
+ final RegionRABody area = RegionRABody.makeRegionBodyArea(
+ regionBody, this);
+ this.children.add(area);
+ final String name = regionBody.traitRegionName();
+ this.bodies.put(name, area);
}
- final RegionBody regionBody = simplePageMaster.getRegionBody();
- final RegionRABody area = RegionRABody.makeRegionBodyArea(regionBody,
- this);
- this.children.add(area);
- this.body = area;
}
/**
@@ -765,7 +768,21 @@
* @return True iff this page is blank.
*/
public boolean isBlank() {
- return ! this.body.hasChildren();
+ for (RegionRABody body : this.bodies.values()) {
+ if (body.hasChildren()) {
+ return false;
+ }
+ }
+ return true;
}
+ /**
+ * Returns the region-body area for a named region.
+ * @param regionName The name of the region to be returned.
+ * @return The named region.
+ */
+ public RegionRABody getRegionBody(final String regionName) {
+ return this.bodies.get(regionName);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2007-07-10 23:36:20 UTC (rev 9974)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2007-07-11 00:32:03 UTC (rev 9975)
@@ -267,7 +267,8 @@
public Area getOverflowArea(final Area childRequesting)
throws AreaTreeException {
final PageRA page = (PageRA) ancestorArea().getOverflowArea(this);
- return page.getRegionBody();
+ final String name = this.traitGeneratedBy().traitRegionName();
+ return page.getRegionBody(name);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java 2007-07-10 23:36:20 UTC (rev 9974)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java 2007-07-11 00:32:03 UTC (rev 9975)
@@ -35,6 +35,11 @@
import org.axsl.fo.FoTreeException;
import org.axsl.fo.ProxyFactory;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* A "simple-page-master" object in XSL-FO.
*/
@@ -59,8 +64,9 @@
/** The child regiond-end. */
private RegionEnd regionEnd;
- /** The child region-body. */
- private RegionBody regionBody;
+ /** The child region-body(s). */
+ private Map<String, RegionBody> regionBodies =
+ new HashMap<String, RegionBody>(1);
/**
* Constructor.
@@ -90,8 +96,9 @@
* {@inheritDoc}
*/
protected void validateDescendants() throws FoTreeException {
- if (getRegionBody() == null) {
- throwException(getFullName() + " must have an fo:region-body.");
+ if (this.regionBodies.size() < 1) {
+ throwException(getFullName() + " must have at least one child "
+ + "fo:region-body.");
}
}
@@ -161,10 +168,8 @@
*/
protected void addRegionBody(final RegionBody regionBody)
throws FoTreeException {
- if (this.regionBody != null) {
- duplicateRegionClass(regionBody);
- }
- this.regionBody = regionBody;
+ final String regionName = regionBody.traitRegionName();
+ this.regionBodies.put(regionName, regionBody);
}
/**
@@ -182,35 +187,42 @@
/**
* {@inheritDoc}
*/
- public org.axsl.fo.fo.RegionBody getRegionBody() {
- return this.regionBody;
+ public Collection<RegionBody> getRegionBodies() {
+ return Collections.unmodifiableCollection(this.regionBodies.values());
}
/**
* {@inheritDoc}
*/
- public org.axsl.fo.fo.RegionBefore getRegionBefore() {
+ public RegionBody getRegionBody(final String regionName) {
+ return this.regionBodies.get(regionName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public RegionBefore getRegionBefore() {
return this.regionBefore;
}
/**
* {@inheritDoc}
*/
- public org.axsl.fo.fo.RegionAfter getRegionAfter() {
+ public RegionAfter getRegionAfter() {
return this.regionAfter;
}
/**
* {@inheritDoc}
*/
- public org.axsl.fo.fo.RegionStart getRegionStart() {
+ public RegionStart getRegionStart() {
return this.regionStart;
}
/**
* {@inheritDoc}
*/
- public org.axsl.fo.fo.RegionEnd getRegionEnd() {
+ public RegionEnd getRegionEnd() {
return this.regionEnd;
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2007-07-10 23:36:20 UTC (rev 9974)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2007-07-11 00:32:03 UTC (rev 9975)
@@ -92,7 +92,8 @@
*/
public boolean layoutFootnote(final PageArea p,
final GraftingPoint graftingPoint) {
- final RegionBodyRefArea bac = p.getRegionBody();
+ /* TODO: This needs to handle multiple body-regions properly. */
+ final RegionBodyRefArea bac = p.getRegionBody("xsl-region-body");
final FootnoteRefArea footArea = bac.getFootnoteRefArea();
try {
layoutFootnoteSeparator(bac, footArea);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-10 23:36:20 UTC (rev 9974)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-11 00:32:03 UTC (rev 9975)
@@ -208,9 +208,10 @@
* Because of markers, lay out the fo:flow first, then the
* static content. This is likely also justifiable because of spec.
*/
- final RegionBodyRefArea bodyArea = currentPage.getRegionBody();
final FlowPL flowPL = (FlowPL) this.getLayoutProxy(flow);
- flowPL.layout(bodyArea, null);
+ for (RegionBodyRefArea bodyArea : currentPage.getRegionBodies()) {
+ flowPL.layout(bodyArea, null);
+ }
this.formatStaticContent(currentPage);
currentPage.layoutComplete();
status = flowPL.getStatus();
Modified: trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2007-07-10 23:36:20 UTC (rev 9974)
+++ trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2007-07-11 00:32:03 UTC (rev 9975)
@@ -336,7 +336,9 @@
* @param page The page whose regions should be rendered.
*/
protected void renderRegions(final Page page) {
- render(page.getRegionBody());
+ for (RegionArea regionBody : page.getRegionBodies()) {
+ render(regionBody);
+ }
if (page.getRegionBefore() != null) {
render(page.getRegionBefore());
}
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-07-10 23:36:20 UTC (rev 9974)
+++ trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2007-07-11 00:32:03 UTC (rev 9975)
@@ -100,7 +100,6 @@
* {@inheritDoc}
*/
public void render(final Page page) {
- final RegionArea body = page.getRegionBody();
final RegionArea before = page.getRegionBefore();
final RegionArea after = page.getRegionAfter();
final RegionArea start = page.getRegionStart();
@@ -120,8 +119,8 @@
if (end != null) {
this.render(end);
}
- if (body != null) {
- this.render(body);
+ for (RegionArea regionBody : page.getRegionBodies()) {
+ this.render(regionBody);
}
this.writeEndTag(page);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-11 20:39:50
|
Revision: 9979
http://svn.sourceforge.net/foray/?rev=9979&view=rev
Author: victormote
Date: 2007-07-11 13:39:53 -0700 (Wed, 11 Jul 2007)
Log Message:
-----------
1. Fix some bugs related to flow-maps.
2. Partially implement multiple flows in layout logic.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowAssignment.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowAssignment.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowAssignment.java 2007-07-11 20:15:38 UTC (rev 9978)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowAssignment.java 2007-07-11 20:39:53 UTC (rev 9979)
@@ -158,7 +158,7 @@
if (this.children.size() < 2) {
throw new IllegalStateException("flow-target-list not yet parsed");
}
- return (FlowTargetList) this.children.get(0);
+ return (FlowTargetList) this.children.get(1);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java 2007-07-11 20:15:38 UTC (rev 9978)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java 2007-07-11 20:39:53 UTC (rev 9979)
@@ -384,11 +384,20 @@
private FlowMap createImplicitFlowMap() {
final FlowMap flowMap = new FlowMap(this,
PropertyList.emptyPropertyList());
- addImplicitFlowMapAssignment(flowMap, "xsl-region-body");
- addImplicitFlowMapAssignment(flowMap, "xsl-region-before");
- addImplicitFlowMapAssignment(flowMap, "xsl-region-after");
- addImplicitFlowMapAssignment(flowMap, "xsl-region-start");
- addImplicitFlowMapAssignment(flowMap, "xsl-region-end");
+ try {
+ this.addChild(flowMap);
+ addImplicitFlowMapAssignment(flowMap, "xsl-region-body");
+ addImplicitFlowMapAssignment(flowMap, "xsl-region-before");
+ addImplicitFlowMapAssignment(flowMap, "xsl-region-after");
+ addImplicitFlowMapAssignment(flowMap, "xsl-region-start");
+ addImplicitFlowMapAssignment(flowMap, "xsl-region-end");
+ } catch (final FoTreeException e) {
+ /* This should not happen, as all parameters are controlled. */
+ throw new IllegalStateException(e);
+ } catch (final PropertyException e) {
+ /* This should not happen, as all parameters are controlled. */
+ throw new IllegalStateException(e);
+ }
return flowMap;
}
@@ -397,45 +406,40 @@
* created.
* @param flowMap The implicit flow map.
* @param impliedName The name which is being mapped in the flow map.
+ * @throws FoTreeException For errors attaching children to parents.
+ * @throws PropertyException For errors creating properties.
*/
private void addImplicitFlowMapAssignment(final FlowMap flowMap,
- final String impliedName) {
+ final String impliedName) throws FoTreeException,
+ PropertyException {
final FlowAssignment assignment = new FlowAssignment(flowMap,
PropertyList.emptyPropertyList());
+ flowMap.addChild(assignment);
/* The source part. */
final FlowSourceList sourceList = new FlowSourceList(assignment,
PropertyList.emptyPropertyList());
+ assignment.addChild(sourceList);
PropertyList propertyList = new PropertyList(1);
final FlowNameSpecifier flowNameSpecifier = new FlowNameSpecifier(
sourceList, propertyList);
- Property property;
- try {
- property = new FlowNameReference(flowNameSpecifier,
+ sourceList.addChild(flowNameSpecifier);
+ Property property = new FlowNameReference(flowNameSpecifier,
FoProperty.FLOW_NAME_REFERENCE.toXslFo(), impliedName);
- } catch (final PropertyException e) {
- /* This shouldn't happen, as all parameters are controlled. */
- throw new IllegalStateException("Logic error in (source): "
- + this.getClass().getName(), e);
- }
propertyList.addProperty(flowNameSpecifier, property);
/* The target part. */
final FlowTargetList targetList = new FlowTargetList(assignment,
PropertyList.emptyPropertyList());
+ assignment.addChild(targetList);
propertyList = new PropertyList(1);
final RegionNameSpecifier regionNameSpecifier = new RegionNameSpecifier(
targetList, propertyList);
- try {
- property = new RegionNameReference(regionNameSpecifier,
- FoProperty.REGION_NAME_REFERENCE.toXslFo(), impliedName);
- } catch (final PropertyException e) {
- /* This shouldn't happen, as all parameters are controlled. */
- throw new IllegalStateException("Logic error in (target): "
- + this.getClass().getName(), e);
- }
+ targetList.addChild(regionNameSpecifier);
+ property = new RegionNameReference(regionNameSpecifier,
+ FoProperty.REGION_NAME_REFERENCE.toXslFo(), impliedName);
propertyList.addProperty(regionNameSpecifier, property);
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-11 20:15:38 UTC (rev 9978)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-11 20:39:53 UTC (rev 9979)
@@ -189,7 +189,12 @@
*/
private void processFlow(final PageCollection pageCollection,
final org.axsl.fo.fo.Flow flow) throws AreaTreeException {
+ /* TODO: This needs to be reworked to handle multiple flows.
+ * For example, if we are on the second flow, we need to see whether
+ * layout should be done on already-existing pages. */
+
this.setLayoutProxy(flow, new FlowPL(flow, this));
+ final List<String> regionBodies = flow.regionBodies();
// make pages and layout content
Status status = Status.UNKNOWN;
@@ -209,7 +214,9 @@
* static content. This is likely also justifiable because of spec.
*/
final FlowPL flowPL = (FlowPL) this.getLayoutProxy(flow);
- for (RegionBodyRefArea bodyArea : currentPage.getRegionBodies()) {
+ for (String regionBodyName : regionBodies) {
+ final RegionBodyRefArea bodyArea = currentPage.getRegionBody(
+ regionBodyName);
flowPL.layout(bodyArea, null);
}
this.formatStaticContent(currentPage);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-12 16:08:19
|
Revision: 9985
http://svn.sourceforge.net/foray/?rev=9985&view=rev
Author: victormote
Date: 2007-07-12 09:07:59 -0700 (Thu, 12 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving trait methods to independent interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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-07-12 15:53:51 UTC (rev 9984)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-12 16:07:59 UTC (rev 9985)
@@ -30,11 +30,10 @@
import org.foray.common.WKConstants;
-import org.axsl.area.BlockContainerRefArea;
import org.axsl.area.AreaTreeException;
+import org.axsl.area.BlockContainerRefArea;
import org.axsl.common.value.AbsoluteAxis;
import org.axsl.common.value.AbsoluteDirection;
-import org.axsl.common.value.AbsolutePosition;
import org.axsl.common.value.AlignmentBaseline;
import org.axsl.common.value.BackgroundRepeat;
import org.axsl.common.value.Baseline;
@@ -307,14 +306,6 @@
}
/**
- * Returns the "absolute-position" trait for this Area.
- * @return The "absolute-position" trait.
- */
- public AbsolutePosition traitAbsolutePosition() {
- return traitGeneratedBy().traitAbsolutePosition(this);
- }
-
- /**
* Indicates whether this area is its parent's first child.
* @return True iff this area is its parent's first child.
*/
@@ -1595,42 +1586,6 @@
}
/**
- * Returns the top trait for this area.
- * @return The top trait for this area.
- * @see Fo#traitTop(FoContext)
- */
- public int traitTop() {
- return traitGeneratedBy().traitTop(this);
- }
-
- /**
- * Returns the bottom trait for this area.
- * @return The bottom trait for this area.
- * @see Fo#traitBottom(FoContext)
- */
- public int traitBottom() {
- return traitGeneratedBy().traitBottom(this);
- }
-
- /**
- * Returns the left trait for this area.
- * @return The left trait for this area.
- * @see Fo#traitLeft(FoContext)
- */
- public int traitLeft() {
- return traitGeneratedBy().traitLeft(this);
- }
-
- /**
- * Returns the right trait for this area.
- * @return The right trait for this area.
- * @see Fo#traitRight(FoContext)
- */
- public int traitRight() {
- return traitGeneratedBy().traitRight(this);
- }
-
- /**
* Indicates whether this Area is positioned absolutely or relatively.
* @return True iff this Area is absolutely positioned.
*/
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2007-07-12 15:53:51 UTC (rev 9984)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2007-07-12 16:07:59 UTC (rev 9985)
@@ -32,6 +32,7 @@
import org.axsl.common.value.AbsolutePosition;
import org.axsl.common.value.RelativeAxis;
import org.axsl.fo.Fo;
+import org.axsl.fo.FoContext;
import org.axsl.fo.fo.Block;
import org.axsl.fo.fo.BlockContainer;
import org.axsl.fo.fo.GraftingPoint;
@@ -286,4 +287,48 @@
return newListBlockArea;
}
+ /**
+ * Returns the "absolute-position" trait for this Area.
+ * @return The "absolute-position" trait.
+ */
+ public AbsolutePosition traitAbsolutePosition() {
+ return traitGeneratedBy().traitAbsolutePosition(this);
+ }
+
+ /**
+ * Returns the top trait for this area.
+ * @return The top trait for this area.
+ * @see BlockContainer#traitTop(FoContext)
+ */
+ public int traitTop() {
+ return traitGeneratedBy().traitTop(this);
+ }
+
+ /**
+ * Returns the bottom trait for this area.
+ * @return The bottom trait for this area.
+ * @see BlockContainer#traitBottom(FoContext)
+ */
+ public int traitBottom() {
+ return traitGeneratedBy().traitBottom(this);
+ }
+
+ /**
+ * Returns the left trait for this area.
+ * @return The left trait for this area.
+ * @see BlockContainer#traitLeft(FoContext)
+ */
+ public int traitLeft() {
+ return traitGeneratedBy().traitLeft(this);
+ }
+
+ /**
+ * Returns the right trait for this area.
+ * @return The right trait for this area.
+ * @see BlockContainer#traitRight(FoContext)
+ */
+ public int traitRight() {
+ return traitGeneratedBy().traitRight(this);
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-12 15:53:51 UTC (rev 9984)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-12 16:07:59 UTC (rev 9985)
@@ -100,6 +100,7 @@
import org.axsl.fo.FoContext;
import org.axsl.fo.FoTreeException;
import org.axsl.fo.fo.Marker;
+import org.axsl.fo.fo.prop.CommonAbsolutePositionPa;
import org.axsl.fo.fo.prop.CommonAccessibilityPa;
import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
import org.axsl.font.Font;
@@ -121,7 +122,8 @@
* Base class for formatting objects.
*/
public abstract class FObj extends FONode implements org.axsl.fo.Fo,
- CommonAccessibilityPa, HyphenationLadderCountPa {
+ CommonAccessibilityPa, CommonAbsolutePositionPa,
+ HyphenationLadderCountPa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-12 21:30:07
|
Revision: 9987
http://svn.sourceforge.net/foray/?rev=9987&view=rev
Author: victormote
Date: 2007-07-12 14:30:07 -0700 (Thu, 12 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving trait methods to independent interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java
trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableBodyContainer.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableFooterContainer.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableHeaderContainer.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-render/src/java/org/foray/render/PrintRenderer.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/ps/PSRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.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-07-12 17:00:56 UTC (rev 9986)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-12 21:30:07 UTC (rev 9987)
@@ -35,9 +35,7 @@
import org.axsl.common.value.AbsoluteAxis;
import org.axsl.common.value.AbsoluteDirection;
import org.axsl.common.value.AlignmentBaseline;
-import org.axsl.common.value.BackgroundRepeat;
import org.axsl.common.value.Baseline;
-import org.axsl.common.value.BorderStyle;
import org.axsl.common.value.Conditionality;
import org.axsl.common.value.DisplayAlign;
import org.axsl.common.value.Iso639;
@@ -56,7 +54,6 @@
import org.axsl.font.Font;
import org.axsl.font.FontUse;
import org.axsl.galley.BackgroundArea;
-import org.axsl.graphic.Graphic;
import java.awt.Color;
import java.awt.geom.Rectangle2D;
@@ -75,24 +72,6 @@
}
/**
- * Returns the background-repeat trait.
- * @return The background-repeat trait.
- * @see Fo#traitBackgroundRepeat(FoContext)
- */
- public BackgroundRepeat traitBackgroundRepeat() {
- return this.traitGeneratedBy().traitBackgroundRepeat(this);
- }
-
- /**
- * Returns the background-image trait.
- * @return The background-image trait.
- * @see Fo#traitBackgroundImage(FoContext)
- */
- public Graphic traitBackgroundImage() {
- return this.traitGeneratedBy().traitBackgroundImage(this);
- }
-
- /**
* Returns the nearest ancestor area that is a block container.
* @return The nearest ancestor area that is a block container.
*/
@@ -251,34 +230,6 @@
}
/**
- * {@inheritDoc}
- */
- public Color traitBorderBeforeColor() {
- return traitGeneratedBy().traitBorderBeforeColor(this);
- }
-
- /**
- * {@inheritDoc}
- */
- public Color traitBorderStartColor() {
- return traitGeneratedBy().traitBorderStartColor(this);
- }
-
- /**
- * {@inheritDoc}
- */
- public Color traitBorderEndColor() {
- return traitGeneratedBy().traitBorderEndColor(this);
- }
-
- /**
- * {@inheritDoc}
- */
- public Color traitBorderAfterColor() {
- return traitGeneratedBy().traitBorderAfterColor(this);
- }
-
- /**
* Returns the font-family for this area.
* @return The font-family for this area.
* @see Fo#traitFontFamily(FoContext)
@@ -288,15 +239,6 @@
}
/**
- * Returns the background-color for this area.
- * @return The background-color for this area.
- * @see Fo#traitBackgroundColor(FoContext)
- */
- public Color traitBackgroundColor() {
- return traitGeneratedBy().traitBackgroundColor(this);
- }
-
- /**
* Returns the relative-position for this area.
* @return The relative-position for this area.
* @see Fo#traitRelativePosition(FoContext)
@@ -857,66 +799,6 @@
}
/**
- * {@inheritDoc}
- */
- public int traitBorderStartWidth() {
- return traitGeneratedBy().traitBorderStartWidth(this);
- }
-
- /**
- * {@inheritDoc}
- */
- public int traitBorderEndWidth() {
- return traitGeneratedBy().traitBorderEndWidth(this);
- }
-
- /**
- * {@inheritDoc}
- */
- public int traitBorderBeforeWidth() {
- return traitGeneratedBy().traitBorderBeforeWidth(this);
- }
-
- /**
- * {@inheritDoc}
- */
- public int traitBorderAfterWidth() {
- return traitGeneratedBy().traitBorderAfterWidth(this);
- }
-
- /**
- * Returns the padding-start trait for this area.
- * @return The padding-start trait for this area.
- */
- public int traitPaddingStart() {
- return traitGeneratedBy().traitPaddingStart(this);
- }
-
- /**
- * Returns the padding-end trait for this area.
- * @return The padding-end trait for this area.
- */
- public int traitPaddingEnd() {
- return traitGeneratedBy().traitPaddingEnd(this);
- }
-
- /**
- * Returns the padding-before trait for this area.
- * @return The padding-before trait for this area.
- */
- public int traitPaddingBefore() {
- return traitGeneratedBy().traitPaddingBefore(this);
- }
-
- /**
- * Returns the padding-after trait for this area.
- * @return The padding-after trait for this area.
- */
- public int traitPaddingAfter() {
- return traitGeneratedBy().traitPaddingAfter(this);
- }
-
- /**
* Returns the space-before minimum trait for this area.
* @return The space-before minimum trait for this area.
* @see Fo#traitSpaceBeforeMinimum(FoContext)
@@ -1558,34 +1440,6 @@
}
/**
- * Indicates whether the background repeats on the X axis for this area.
- * @return True iff the background repeats on the X axis for this area.
- */
- public boolean backgroundRepeatX() {
- switch (traitBackgroundRepeat()) {
- case REPEAT_Y:
- case NO_REPEAT: {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Indicates whether the background repeats on the Y axis for this area.
- * @return True iff the background repeats on the Y axis for this area.
- */
- public boolean backgroundRepeatY() {
- switch (traitBackgroundRepeat()) {
- case REPEAT_X:
- case NO_REPEAT: {
- return false;
- }
- }
- return true;
- }
-
- /**
* Indicates whether this Area is positioned absolutely or relatively.
* @return True iff this Area is absolutely positioned.
*/
@@ -1630,38 +1484,6 @@
}
/**
- * Returns the border style for the "start" edge of this Area.
- * @return The border style for the "start" edge of this Area.
- */
- public BorderStyle traitBorderStartStyle() {
- return traitGeneratedBy().traitBorderStartStyle(this);
- }
-
- /**
- * Returns the border style for the "end" edge of this Area.
- * @return The border style for the "end" edge of this Area.
- */
- public BorderStyle traitBorderEndStyle() {
- return traitGeneratedBy().traitBorderEndStyle(this);
- }
-
- /**
- * Returns the border style for the "before" edge of this Area.
- * @return The border style for the "before" edge of this Area.
- */
- public BorderStyle traitBorderBeforeStyle() {
- return traitGeneratedBy().traitBorderBeforeStyle(this);
- }
-
- /**
- * Returns the border style for the "after" edge of this Area.
- * @return The border style for the "after" edge of this Area.
- */
- public BorderStyle traitBorderAfterStyle() {
- return traitGeneratedBy().traitBorderAfterStyle(this);
- }
-
- /**
* Returns the display-align trait for this Area.
* @return The display-align trait.
*/
@@ -1782,4 +1604,52 @@
return traitGeneratedBy().traitId();
}
+ /**
+ * Returns the border-start-width trait for this area.
+ * @return The border-start-width trait for this area.
+ */
+ public abstract int traitBorderStartWidth();
+
+ /**
+ * Returns the border-end-width trait for this area.
+ * @return The border-end-width trait for this area.
+ */
+ public abstract int traitBorderEndWidth();
+
+ /**
+ * Returns the border-before-width trait for this area.
+ * @return The border-before-width trait for this area.
+ */
+ public abstract int traitBorderBeforeWidth();
+
+ /**
+ * Returns the border-after-width trait for this area.
+ * @return The border-after-width trait for this area.
+ */
+ public abstract int traitBorderAfterWidth();
+
+ /**
+ * Returns the padding-start trait for this area.
+ * @return The padding-start trait for this area.
+ */
+ public abstract int traitPaddingStart();
+
+ /**
+ * Returns the padding-end trait for this area.
+ * @return The padding-end trait for this area.
+ */
+ public abstract int traitPaddingEnd();
+
+ /**
+ * Returns the padding-before trait for this area.
+ * @return The padding-before trait for this area.
+ */
+ public abstract int traitPaddingBefore();
+
+ /**
+ * Returns the padding-after trait for this area.
+ * @return The padding-after trait for this area.
+ */
+ public abstract int traitPaddingAfter();
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java 2007-07-12 17:00:56 UTC (rev 9986)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java 2007-07-12 21:30:07 UTC (rev 9987)
@@ -211,4 +211,60 @@
return this;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderStartWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderEndWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderBeforeWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderAfterWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingStart() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingEnd() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingBefore() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingAfter() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2007-07-12 17:00:56 UTC (rev 9986)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2007-07-12 21:30:07 UTC (rev 9987)
@@ -30,6 +30,8 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.AbsolutePosition;
+import org.axsl.common.value.BackgroundRepeat;
+import org.axsl.common.value.BorderStyle;
import org.axsl.common.value.RelativeAxis;
import org.axsl.fo.Fo;
import org.axsl.fo.FoContext;
@@ -42,6 +44,7 @@
import org.axsl.galley.RenderVisitor;
import org.axsl.graphic.Graphic;
+import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
@@ -331,4 +334,141 @@
return traitGeneratedBy().traitRight(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public Graphic traitBackgroundImage() {
+ return this.traitGeneratedBy().traitBackgroundImage(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitBackgroundColor() {
+ return traitGeneratedBy().traitBackgroundColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public BackgroundRepeat traitBackgroundRepeat() {
+ return traitGeneratedBy().traitBackgroundRepeat(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitBorderBeforeColor() {
+ return traitGeneratedBy().traitBorderBeforeColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitBorderStartColor() {
+ return traitGeneratedBy().traitBorderStartColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitBorderEndColor() {
+ return traitGeneratedBy().traitBorderEndColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitBorderAfterColor() {
+ return traitGeneratedBy().traitBorderAfterColor(this);
+ }
+
+ /**
+ * Returns the border style for the "start" edge of this Area.
+ * @return The border style for the "start" edge of this Area.
+ */
+ public BorderStyle traitBorderStartStyle() {
+ return traitGeneratedBy().traitBorderStartStyle(this);
+ }
+
+ /**
+ * Returns the border style for the "end" edge of this Area.
+ * @return The border style for the "end" edge of this Area.
+ */
+ public BorderStyle traitBorderEndStyle() {
+ return traitGeneratedBy().traitBorderEndStyle(this);
+ }
+
+ /**
+ * Returns the border style for the "before" edge of this Area.
+ * @return The border style for the "before" edge of this Area.
+ */
+ public BorderStyle traitBorderBeforeStyle() {
+ return traitGeneratedBy().traitBorderBeforeStyle(this);
+ }
+
+ /**
+ * Returns the border style for the "after" edge of this Area.
+ * @return The border style for the "after" edge of this Area.
+ */
+ public BorderStyle traitBorderAfterStyle() {
+ return traitGeneratedBy().traitBorderAfterStyle(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderStartWidth() {
+ return traitGeneratedBy().traitBorderStartWidth(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderEndWidth() {
+ return traitGeneratedBy().traitBorderEndWidth(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderBeforeWidth() {
+ return traitGeneratedBy().traitBorderBeforeWidth(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderAfterWidth() {
+ return traitGeneratedBy().traitBorderAfterWidth(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingStart() {
+ return traitGeneratedBy().traitPaddingStart(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingEnd() {
+ return traitGeneratedBy().traitPaddingEnd(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingBefore() {
+ return traitGeneratedBy().traitPaddingBefore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingAfter() {
+ return traitGeneratedBy().traitPaddingAfter(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-12 17:00:56 UTC (rev 9986)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-12 21:30:07 UTC (rev 9987)
@@ -256,4 +256,60 @@
return this.traitGeneratedBy().referenceBpd(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderStartWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderEndWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderBeforeWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderAfterWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingStart() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingEnd() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingBefore() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingAfter() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java 2007-07-12 17:00:56 UTC (rev 9986)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java 2007-07-12 21:30:07 UTC (rev 9987)
@@ -222,4 +222,60 @@
return this;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderStartWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderEndWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderBeforeWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderAfterWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingStart() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingEnd() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingBefore() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingAfter() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-12 17:00:56 UTC (rev 9986)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-12 21:30:07 UTC (rev 9987)
@@ -268,4 +268,60 @@
return this.traitGeneratedBy().referenceBpd(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderStartWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderEndWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderBeforeWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderAfterWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingStart() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingEnd() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingBefore() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingAfter() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-12 17:00:56 UTC (rev 9986)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-12 21:30:07 UTC (rev 9987)
@@ -29,6 +29,8 @@
package org.foray.area;
import org.axsl.area.AreaTreeException;
+import org.axsl.common.value.BackgroundRepeat;
+import org.axsl.common.value.BorderStyle;
import org.axsl.fo.FoText;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
@@ -41,6 +43,7 @@
import org.axsl.galley.RenderVisitor;
import org.axsl.graphic.Graphic;
+import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
@@ -315,4 +318,141 @@
this.parent = this.validateNewParent(node);
}
+ /**
+ * {@inheritDoc}
+ */
+ public Graphic traitBackgroundImage() {
+ return this.traitGeneratedBy().traitBackgroundImage(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitBackgroundColor() {
+ return traitGeneratedBy().traitBackgroundColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public BackgroundRepeat traitBackgroundRepeat() {
+ return traitGeneratedBy().traitBackgroundRepeat(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitBorderBeforeColor() {
+ return traitGeneratedBy().traitBorderBeforeColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitBorderStartColor() {
+ return traitGeneratedBy().traitBorderStartColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitBorderEndColor() {
+ return traitGeneratedBy().traitBorderEndColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitBorderAfterColor() {
+ return traitGeneratedBy().traitBorderAfterColor(this);
+ }
+
+ /**
+ * Returns the border style for the "start" edge of this Area.
+ * @return The border style for the "start" edge of this Area.
+ */
+ public BorderStyle traitBorderStartStyle() {
+ return traitGeneratedBy().traitBorderStartStyle(this);
+ }
+
+ /**
+ * Returns the border style for the "end" edge of this Area.
+ * @return The border style for the "end" edge of this Area.
+ */
+ public BorderStyle traitBorderEndStyle() {
+ return traitGeneratedBy().traitBorderEndStyle(this);
+ }
+
+ /**
+ * Returns the border style for the "before" edge of this Area.
+ * @return The border style for the "before" edge of this Area.
+ */
+ public BorderStyle traitBorderBeforeStyle() {
+ return traitGeneratedBy().traitBorderBeforeStyle(this);
+ }
+
+ /**
+ * Returns the border style for the "after" edge of this Area.
+ * @return The border style for the "after" edge of this Area.
+ */
+ public BorderStyle traitBorderAfterStyle() {
+ return traitGeneratedBy().traitBorderAfterStyle(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderStartWidth() {
+ return traitGeneratedBy().traitBorderStartWidth(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderEndWidth() {
+ return traitGeneratedBy().traitBorderEndWidth(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderBeforeWidth() {
+ return traitGeneratedBy().traitBorderBeforeWidth(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderAfterWidth() {
+ return traitGeneratedBy().traitBorderAfterWidth(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingStart() {
+ return traitGeneratedBy().traitPaddingStart(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingEnd() {
+ return traitGeneratedBy().traitPaddingEnd(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingBefore() {
+ return traitGeneratedBy().traitPaddingBefore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingAfter() {
+ return traitGeneratedBy().traitPaddingAfter(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-12 17:00:56 UTC (rev 9986)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-12 21:30:07 UTC (rev 9987)
@@ -195,4 +195,60 @@
this.parent = this.validateNewParent(node);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderStartWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderEndWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderBeforeWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderAfterWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingStart() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingEnd() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingBefore() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingAfter() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-12 17:00:56 UTC (rev 9986)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-12 21:30:07 UTC (rev 9987)
@@ -584,4 +584,60 @@
this.parent = this.validateNewParent(node);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderStartWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderEndWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderBeforeWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderAfterWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingStart() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingEnd() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingBefore() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingAfter() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java 2007-07-12 17:00:56 UTC (rev 9986)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java 2007-07-12 21:30:07 UTC (rev 9987)
@@ -213,4 +213,60 @@
return false;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderStartWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderEndWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderBeforeWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderAfterWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingStart() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingEnd() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingBefore() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingAfter() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java 2007-07-12 17:00:56 UTC (rev 9986)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java 2007-07-12 21:30:07 UTC (rev 9987)
@@ -292,4 +292,60 @@
return false;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderStartWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderEndWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderBeforeWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitBorderAfterWidth() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingStart() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingEnd() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingBefore() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitPaddingAfter() {
+ return 0;
+ }
+
}
Modifi...
[truncated message content] |
|
From: <vic...@us...> - 2007-07-12 23:26:38
|
Revision: 9988
http://svn.sourceforge.net/foray/?rev=9988&view=rev
Author: victormote
Date: 2007-07-12 16:26:34 -0700 (Thu, 12 Jul 2007)
Log Message:
-----------
Conform to axsl changes consolidating text-related methods in TextArea instead of GeneralInlineArea.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
trunk/foray/foray-render/src/java/org/foray/render/PrintRenderer.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/ExternalGraphicArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -207,30 +207,6 @@
/**
* {@inheritDoc}
*/
- public int letterSpacing() {
- /* Letter-spacing is not applicable for this inline element. */
- return 0;
- }
-
- /**
- * {@inheritDoc}
- */
- public int wordSpacing() {
- /* Word-spacing is not applicable for this inline element. */
- return 0;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean kern() {
- /* Kerning is not applicable for this inline element. */
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
public Area getParent() {
return this.parent;
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -219,30 +219,6 @@
/**
* {@inheritDoc}
*/
- public int letterSpacing() {
- /* Letter-spacing is not applicable for this inline element. */
- return 0;
- }
-
- /**
- * {@inheritDoc}
- */
- public int wordSpacing() {
- /* Word-spacing is not applicable for this inline element. */
- return 0;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean kern() {
- /* Kerning is not applicable for this inline element. */
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
public Area getParent() {
return this.parent;
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -283,30 +283,6 @@
/**
* {@inheritDoc}
*/
- public int letterSpacing() {
- /* Letter-spacing is not applicable for this inline element. */
- return 0;
- }
-
- /**
- * {@inheritDoc}
- */
- public int wordSpacing() {
- /* Word-spacing is not applicable for this inline element. */
- return 0;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean kern() {
- /* Kerning is not applicable for this inline element. */
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
public Area getParent() {
return this.parent;
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -160,30 +160,6 @@
/**
* {@inheritDoc}
*/
- public int letterSpacing() {
- /* Letter-spacing is not applicable for this inline element. */
- return 0;
- }
-
- /**
- * {@inheritDoc}
- */
- public int wordSpacing() {
- /* Word-spacing is not applicable for this inline element. */
- return 0;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean kern() {
- /* Kerning is not applicable for this inline element. */
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
public Area getParent() {
return this.parent;
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -331,6 +331,13 @@
/**
* {@inheritDoc}
*/
+ public char[] getText() {
+ return this.dotLeaderText();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public char[] dotLeaderText() {
/* Note that we are not concerned here with optimizing the size of the
* leader itself. That needs to be done prior to rendering. */
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -34,6 +34,7 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.fo.Fo;
+import org.axsl.fo.FoContext;
import org.axsl.fo.FoNode;
import org.axsl.fo.FoTextContent;
import org.axsl.fo.fo.GraftingPoint;
@@ -813,4 +814,24 @@
this.parent = this.validateNewParent(node);
}
+ /**
+ * Returns the primary font for this area.
+ * @return The primary font for this area.
+ * @see Fo#getPrimaryFont(FoContext)
+ */
+ public FontUse getPrimaryFont() {
+ return traitGeneratedBy().getPrimaryFont(this);
+ }
+
+ /**
+ * Returns a secondary font for this area.
+ * @param codePoint The Unicode code point for which the secondary font is
+ * needed.
+ * @return A secondary font for this area.
+ * @see Fo#getSecondaryFont(FoContext, int)
+ */
+ public FontUse getSecondaryFont(final int codePoint) {
+ return traitGeneratedBy().getSecondaryFont(this, codePoint);
+ }
+
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/PrintRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/PrintRenderer.java 2007-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-render/src/java/org/foray/render/PrintRenderer.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -35,7 +35,6 @@
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
import org.axsl.galley.BorderPaddingArea;
-import org.axsl.galley.GeneralInlineArea;
import org.axsl.galley.LeaderArea;
import org.axsl.galley.TextArea;
@@ -122,7 +121,7 @@
* but that may have features like underscore, overscore, and through-score.
* @param area The area whose "space" features are to be rendered.
*/
- protected void renderGenericSpace(final GeneralInlineArea area) {
+ protected void renderGenericSpace(final TextArea area) {
final int startX = area.crOriginX();
int startY;
final int endX = area.crOriginX() + area.crIpd();
@@ -152,7 +151,7 @@
* @param area The area whose metrics should be used for the computation.
* @return The Y position that should be used for the underline stroke.
*/
- protected int getUnderlineYPosition(final GeneralInlineArea area) {
+ protected int getUnderlineYPosition(final TextArea area) {
final Font font = area.getPrimaryFont().getFont();
final int underlinePosition = font.underlinePosition(
area.traitFontSize());
@@ -164,7 +163,7 @@
* @param area The area whose metrics should be used for the computation.
* @return The Y position that should be used for the overline stroke.
*/
- protected int getOverlineYPosition(final GeneralInlineArea area) {
+ protected int getOverlineYPosition(final TextArea area) {
final Font font = area.getPrimaryFont().getFont();
final int overlinePosition = font.overlinePosition(
area.traitFontSize());
@@ -176,7 +175,7 @@
* @param area The area whose metrics should be used for the computation.
* @return The Y position that should be used for the through stroke.
*/
- protected int getThroughYPosition(final GeneralInlineArea area) {
+ protected int getThroughYPosition(final TextArea area) {
final Font font = area.getPrimaryFont().getFont();
final int strikeoutPosition = font.strikeoutPosition(
area.traitFontSize());
Modified: trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2007-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -52,7 +52,6 @@
import org.axsl.galley.ForeignContentSvg;
import org.axsl.galley.ForeignObjectArea;
import org.axsl.galley.Galley;
-import org.axsl.galley.GeneralInlineArea;
import org.axsl.galley.GraphicArea;
import org.axsl.galley.InlineArea;
import org.axsl.galley.LeaderArea;
@@ -466,7 +465,7 @@
* used to render the text.
* @param text The text content to be rendered.
*/
- public abstract void renderTextSegment(GeneralInlineArea area,
+ public abstract void renderTextSegment(TextArea area,
char[] text);
/**
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-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -52,7 +52,6 @@
import org.axsl.galley.ExternalGraphicArea;
import org.axsl.galley.ForeignContentSvg;
import org.axsl.galley.ForeignObjectArea;
-import org.axsl.galley.GeneralInlineArea;
import org.axsl.galley.GraphicArea;
import org.axsl.galley.LeaderArea;
import org.axsl.galley.Page;
@@ -553,7 +552,7 @@
/**
* {@inheritDoc}
*/
- public void renderTextSegment(final GeneralInlineArea area,
+ public void renderTextSegment(final TextArea area,
final char[] text) {
final FontUse font = area.getPrimaryFont();
final int size = area.traitFontSize();
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-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -46,9 +46,9 @@
import org.axsl.galley.BookmarkTree;
import org.axsl.galley.ExternalGraphicArea;
import org.axsl.galley.ForeignContentSvg;
-import org.axsl.galley.GeneralInlineArea;
import org.axsl.galley.GraphicArea;
import org.axsl.galley.Page;
+import org.axsl.galley.TextArea;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
import org.axsl.output.OutputException;
@@ -643,7 +643,7 @@
/**
* {@inheritDoc}
*/
- public void renderTextSegment(final GeneralInlineArea area,
+ public void renderTextSegment(final TextArea area,
final char[] text) {
/* 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-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -45,12 +45,13 @@
import org.axsl.galley.AreaNode;
import org.axsl.galley.Bookmark;
import org.axsl.galley.BookmarkTree;
+import org.axsl.galley.ForeignContentSvg;
import org.axsl.galley.ForeignObjectArea;
import org.axsl.galley.Galley;
import org.axsl.galley.GeneralInlineArea;
import org.axsl.galley.GraphicArea;
import org.axsl.galley.Page;
-import org.axsl.galley.ForeignContentSvg;
+import org.axsl.galley.TextArea;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicLink;
import org.axsl.graphic.SvgGraphic;
@@ -300,7 +301,7 @@
/**
* {@inheritDoc}
*/
- public void renderTextSegment(final GeneralInlineArea area,
+ public void renderTextSegment(final TextArea area,
final char[] text) {
if (text == null || text.length < 1) {
return;
@@ -356,7 +357,7 @@
* @param c The next character to be written.
* @return The appropriate font to use.
*/
- private FontUse whichFont(final GeneralInlineArea area,
+ private FontUse whichFont(final TextArea area,
final FontUse primaryFont, final FontUse currentFont, final int c) {
/* Trying to avoid unnecessary font selection work on the one hand, and
* unnecessary switching between fonts in the output on the other.*/
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-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -51,10 +51,10 @@
import org.axsl.galley.BorderPaddingArea;
import org.axsl.galley.ForeignContentSvg;
import org.axsl.galley.ForeignObjectArea;
-import org.axsl.galley.GeneralInlineArea;
import org.axsl.galley.GraphicArea;
import org.axsl.galley.LeaderArea;
import org.axsl.galley.Page;
+import org.axsl.galley.TextArea;
import org.axsl.graphic.EpsGraphic;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
@@ -846,7 +846,7 @@
/**
* {@inheritDoc}
*/
- public void renderTextSegment(final GeneralInlineArea area,
+ public void renderTextSegment(final TextArea area,
final char[] text) {
if (text == null || text.length < 1) {
return;
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-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -42,7 +42,6 @@
import org.axsl.galley.ExternalGraphicArea;
import org.axsl.galley.ForeignContentSvg;
import org.axsl.galley.ForeignObjectArea;
-import org.axsl.galley.GeneralInlineArea;
import org.axsl.galley.GraphicArea;
import org.axsl.galley.LeaderArea;
import org.axsl.galley.Page;
@@ -439,7 +438,7 @@
/**
* {@inheritDoc}
*/
- public void renderTextSegment(final GeneralInlineArea area,
+ public void renderTextSegment(final TextArea area,
final char[] text) {
/* TODO: Implement this. */
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-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -37,9 +37,9 @@
import org.axsl.galley.BookmarkTree;
import org.axsl.galley.ExternalGraphicArea;
import org.axsl.galley.ForeignContentSvg;
-import org.axsl.galley.GeneralInlineArea;
import org.axsl.galley.GraphicArea;
import org.axsl.galley.Page;
+import org.axsl.galley.TextArea;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
import org.axsl.output.OutputException;
@@ -502,7 +502,7 @@
/**
* {@inheritDoc}
*/
- public void renderTextSegment(final GeneralInlineArea area,
+ public void renderTextSegment(final TextArea area,
final char[] text) {
/* TODO: Implement this. */
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-07-12 21:30:07 UTC (rev 9987)
+++ trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2007-07-12 23:26:34 UTC (rev 9988)
@@ -347,7 +347,7 @@
/**
* {@inheritDoc}
*/
- public void renderTextSegment(final GeneralInlineArea area,
+ public void renderTextSegment(final TextArea area,
final char[] text) {
/* TODO: Implement this. */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-13 16:55:22
|
Revision: 9990
http://svn.sourceforge.net/foray/?rev=9990&view=rev
Author: victormote
Date: 2007-07-13 09:55:25 -0700 (Fri, 13 Jul 2007)
Log Message:
-----------
Conform to axsl change moving font-related trait methods to new interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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-07-12 23:47:43 UTC (rev 9989)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-13 16:55:25 UTC (rev 9990)
@@ -230,15 +230,6 @@
}
/**
- * Returns the font-family for this area.
- * @return The font-family for this area.
- * @see Fo#traitFontFamily(FoContext)
- */
- public String traitFontFamily() {
- return traitGeneratedBy().traitFontFamily(this)[0];
- }
-
- /**
* Returns the relative-position for this area.
* @return The relative-position for this area.
* @see Fo#traitRelativePosition(FoContext)
@@ -319,15 +310,6 @@
}
/**
- * Returns the font-variant trait of this area.
- * @return The font-variant trait of this area.
- * @see Fo#traitFontVariant(FoContext)
- */
- public Font.Variant traitFontVariant() {
- return traitGeneratedBy().traitFontVariant(this);
- }
-
- /**
* Returns the underline-score trait of this area.
* @return The underline-score trait of this area.
* @see Fo#traitUnderlineScore(FoContext)
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-12 23:47:43 UTC (rev 9989)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-13 16:55:25 UTC (rev 9990)
@@ -104,6 +104,7 @@
import org.axsl.fo.fo.prop.CommonAccessibilityPa;
import org.axsl.fo.fo.prop.CommonAuralPa;
import org.axsl.fo.fo.prop.CommonBorderPaddingBgPa;
+import org.axsl.fo.fo.prop.CommonFontPa;
import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -125,7 +126,8 @@
*/
public abstract class FObj extends FONode implements org.axsl.fo.Fo,
CommonAccessibilityPa, CommonAbsolutePositionPa,
- CommonAuralPa, CommonBorderPaddingBgPa, HyphenationLadderCountPa {
+ CommonAuralPa, CommonBorderPaddingBgPa, CommonFontPa,
+ HyphenationLadderCountPa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-13 17:20:47
|
Revision: 9991
http://svn.sourceforge.net/foray/?rev=9991&view=rev
Author: victormote
Date: 2007-07-13 10:20:50 -0700 (Fri, 13 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving trait definitions to property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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-07-13 16:55:25 UTC (rev 9990)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-13 17:20:50 UTC (rev 9991)
@@ -38,7 +38,6 @@
import org.axsl.common.value.Baseline;
import org.axsl.common.value.Conditionality;
import org.axsl.common.value.DisplayAlign;
-import org.axsl.common.value.Iso639;
import org.axsl.common.value.LineStackingStrategy;
import org.axsl.common.value.LinkType;
import org.axsl.common.value.ReferenceOrientation;
@@ -1279,15 +1278,6 @@
}
/**
- * Returns the language trait for this area.
- * @return The language trait for this area.
- * @see Fo#traitLanguage(FoContext)
- */
- public Iso639 traitLanguage() {
- return traitGeneratedBy().traitLanguage(this);
- }
-
- /**
* Returns the text-align trait for this area.
* @return The text-align trait for this area.
* @see Fo#traitTextAlign(FoContext)
@@ -1315,15 +1305,6 @@
}
/**
- * Returns the hyphenation-character trait for this area.
- * @return The hyphenation-character trait for this area.
- * @see Fo#traitWrapOption(FoContext)
- */
- public int traitHyphenationCharacter() {
- return traitGeneratedBy().traitHyphenationCharacter(this);
- }
-
- /**
* Returns the dominant-baseline trait for this area.
* @return The dominant-baseline trait for this area.
* @see Fo#traitWrapOption(FoContext)
@@ -1389,15 +1370,6 @@
}
/**
- * Returns the width of the hyphenation character.
- * @return The width, in millipoints, of the hyphenation character.
- */
- public int getHyphenWidth() {
- final int hyphenChar = traitHyphenationCharacter();
- return getCharWidth(hyphenChar);
- }
-
- /**
* Returns the content rectangle measured in points (1/72 of an inch).
* @return The content rectangle in points.
*/
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-13 16:55:25 UTC (rev 9990)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-13 17:20:50 UTC (rev 9991)
@@ -37,6 +37,7 @@
import org.axsl.fo.FoContext;
import org.axsl.fo.FoNode;
import org.axsl.fo.FoTextContent;
+import org.axsl.fo.fo.Block;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.font.Font;
import org.axsl.font.FontUse;
@@ -834,4 +835,23 @@
return traitGeneratedBy().getSecondaryFont(this, codePoint);
}
+ /**
+ * Returns the hyphenation-character trait for this area.
+ * @return The hyphenation-character trait for this area.
+ * @see Fo#traitWrapOption(FoContext)
+ */
+ public int traitHyphenationCharacter() {
+ /* TODO: Clean this method up after we clean up the construction. */
+ final Fo generatedBy = this.traitGeneratedBy();
+ if (generatedBy instanceof org.axsl.fo.fo.Character) {
+ final org.axsl.fo.fo.Character character =
+ (org.axsl.fo.fo.Character) generatedBy;
+ return character.traitHyphenationCharacter(this);
+ } else {
+ final NormalBlockArea blockArea = this.ancestorNormalBlockArea();
+ final Block block = blockArea.traitGeneratedBy();
+ return block.traitHyphenationCharacter(blockArea);
+ }
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-13 16:55:25 UTC (rev 9990)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-13 17:20:50 UTC (rev 9991)
@@ -105,6 +105,7 @@
import org.axsl.fo.fo.prop.CommonAuralPa;
import org.axsl.fo.fo.prop.CommonBorderPaddingBgPa;
import org.axsl.fo.fo.prop.CommonFontPa;
+import org.axsl.fo.fo.prop.CommonHyphenationPa;
import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -127,7 +128,7 @@
public abstract class FObj extends FONode implements org.axsl.fo.Fo,
CommonAccessibilityPa, CommonAbsolutePositionPa,
CommonAuralPa, CommonBorderPaddingBgPa, CommonFontPa,
- HyphenationLadderCountPa {
+ CommonHyphenationPa, HyphenationLadderCountPa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-14 22:44:40
|
Revision: 9992
http://svn.sourceforge.net/foray/?rev=9992&view=rev
Author: victormote
Date: 2007-07-14 15:44:42 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Conform to axsl change removing "width of containing block" parameter from margin getters.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractMargin.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Padding.java
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/AbstractTestMargin.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-07-13 17:20:50 UTC (rev 9991)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-14 22:44:42 UTC (rev 9992)
@@ -1083,7 +1083,7 @@
* @return The top margin for this area.
*/
public int getMarginTop() {
- return traitGeneratedBy().getMarginTop(this, traitPageWidth());
+ return traitGeneratedBy().getMarginTop(this);
}
/**
@@ -1091,7 +1091,7 @@
* @return The bottom margin for this area.
*/
public int getMarginBottom() {
- return traitGeneratedBy().getMarginBottom(this, traitPageWidth());
+ return traitGeneratedBy().getMarginBottom(this);
}
/**
@@ -1099,7 +1099,7 @@
* @return The left margin for this area.
*/
public int getMarginLeft() {
- return traitGeneratedBy().getMarginLeft(this, traitPageWidth());
+ return traitGeneratedBy().getMarginLeft(this);
}
/**
@@ -1107,7 +1107,7 @@
* @return The right margin for this area.
*/
public int getMarginRight() {
- return traitGeneratedBy().getMarginRight(this, traitPageWidth());
+ return traitGeneratedBy().getMarginRight(this);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-13 17:20:50 UTC (rev 9991)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-14 22:44:42 UTC (rev 9992)
@@ -570,34 +570,29 @@
/**
* {@inheritDoc}
*/
- public int getMarginLeft(final FoContext context,
- final int widthContainingBlock) {
- return propertyList.getMarginLeft(this, context, widthContainingBlock);
+ public int getMarginLeft(final FoContext context) {
+ return propertyList.getMarginLeft(this, context);
}
/**
* {@inheritDoc}
*/
- public int getMarginRight(final FoContext context,
- final int widthContainingBlock) {
- return propertyList.getMarginRight(this, context, widthContainingBlock);
+ public int getMarginRight(final FoContext context) {
+ return propertyList.getMarginRight(this, context);
}
/**
* {@inheritDoc}
*/
- public int getMarginTop(final FoContext context,
- final int widthContainingBlock) {
- return propertyList.getMarginTop(this, context, widthContainingBlock);
+ public int getMarginTop(final FoContext context) {
+ return propertyList.getMarginTop(this, context);
}
/**
* {@inheritDoc}
*/
- public int getMarginBottom(final FoContext context,
- final int widthContainingBlock) {
- return propertyList.getMarginBottom(this, context,
- widthContainingBlock);
+ public int getMarginBottom(final FoContext context) {
+ return propertyList.getMarginBottom(this, context);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-07-13 17:20:50 UTC (rev 9991)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-07-14 22:44:42 UTC (rev 9992)
@@ -505,24 +505,21 @@
* @param absoluteDirection One of WritingModeDT.DIRECTION_TOP,
* WritingModeDT.DIRECTION_BOTTOM, WritingModeDT.DIRECTION_LEFT,
* WritingModeDT.DIRECTION_RIGHT.
- * @param widthContainingBlock The width of the block that contains the
- * area whose margin is sought (used in percentage computations).
* @return The margin value, in millipoints.
*/
public int getAbsoluteMargin(final FObj fobj, final FoContext context,
- final AbsoluteCompass absoluteDirection,
- final int widthContainingBlock) {
+ final AbsoluteCompass absoluteDirection) {
// Try the specific property first (e.g. "margin-top")
final FoProperty propertyType = AbstractMargin.rawPropertyType(
absoluteDirection);
AbstractMargin property = (AbstractMargin) getProperty(propertyType);
if (property != null) {
- return property.getValue(context, fobj, widthContainingBlock);
+ return property.getValue(context, fobj);
}
// Now try the shorthand property
property = (AbstractMargin) getProperty(FoProperty.MARGIN);
if (property != null) {
- return property.getValue(context, fobj, widthContainingBlock);
+ return property.getValue(context, fobj);
}
// Return the default
return AbstractMargin.getValueNoInstance();
@@ -562,13 +559,10 @@
* @param fobj The FObj to which the property belongs.
* @param context An object that knows how to resolve FO Tree context
* issues.
- * @param widthContainingBlock The width of the containing block.
* @return The top margin property.
*/
- public int getMarginTop(final FObj fobj, final FoContext context,
- final int widthContainingBlock) {
- return getAbsoluteMargin(fobj, context, AbsoluteCompass.TOP,
- widthContainingBlock);
+ public int getMarginTop(final FObj fobj, final FoContext context) {
+ return getAbsoluteMargin(fobj, context, AbsoluteCompass.TOP);
}
/**
@@ -576,13 +570,10 @@
* @param fobj The FObj to which the property belongs.
* @param context An object that knows how to resolve FO Tree context
* issues.
- * @param widthContainingBlock The width of the containing block.
* @return The bottom margin property.
*/
- public int getMarginBottom(final FObj fobj, final FoContext context,
- final int widthContainingBlock) {
- return getAbsoluteMargin(fobj, context, AbsoluteCompass.BOTTOM,
- widthContainingBlock);
+ public int getMarginBottom(final FObj fobj, final FoContext context) {
+ return getAbsoluteMargin(fobj, context, AbsoluteCompass.BOTTOM);
}
/**
@@ -590,13 +581,10 @@
* @param fobj The FObj to which the property belongs.
* @param context An object that knows how to resolve FO Tree context
* issues.
- * @param widthContainingBlock The width of the containing block.
* @return The left margin property.
*/
- public int getMarginLeft(final FObj fobj, final FoContext context,
- final int widthContainingBlock) {
- return getAbsoluteMargin(fobj, context, AbsoluteCompass.LEFT,
- widthContainingBlock);
+ public int getMarginLeft(final FObj fobj, final FoContext context) {
+ return getAbsoluteMargin(fobj, context, AbsoluteCompass.LEFT);
}
/**
@@ -604,13 +592,10 @@
* @param fobj The FObj to which the property belongs.
* @param context An object that knows how to resolve FO Tree context
* issues.
- * @param widthContainingBlock The width of the containing block.
* @return The right margin property.
*/
- public int getMarginRight(final FObj fobj, final FoContext context,
- final int widthContainingBlock) {
- return getAbsoluteMargin(fobj, context, AbsoluteCompass.RIGHT,
- widthContainingBlock);
+ public int getMarginRight(final FObj fobj, final FoContext context) {
+ return getAbsoluteMargin(fobj, context, AbsoluteCompass.RIGHT);
}
/**
@@ -786,7 +771,7 @@
indent += AbstractIndent.getValueNoInstance(context, fobj,
direction, ipdContainingRA);
}
- indent += abstractMargin.getValue(context, fobj, ipdContainingRA);
+ indent += abstractMargin.getValue(context, fobj);
/* TODO: Do the padding and border-width values below actually
* qualify as "padding-corresponding" and "border-corresponding" as
* specified? Or do we need to look for the properties using just
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java 2007-07-13 17:20:50 UTC (rev 9991)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java 2007-07-14 22:44:42 UTC (rev 9992)
@@ -83,8 +83,7 @@
* {@inheritDoc}
*/
public int crX(final FoContext context) {
- final int pageWidth = getPageMaster().traitPageWidth();
- int xPosition = getPageMaster().getMarginLeft(context, pageWidth);
+ int xPosition = getPageMaster().getMarginLeft(context);
if (traitPrecedence() == false) {
xPosition += getPageMaster().getStartExtent();
}
@@ -95,19 +94,17 @@
* {@inheritDoc}
*/
public int crY(final FoContext context) {
- final int pageWidth = getPageMaster().traitPageWidth();
return getPageMaster().traitPageHeight()
- - getPageMaster().getMarginTop(context, pageWidth);
+ - getPageMaster().getMarginTop(context);
}
/**
* {@inheritDoc}
*/
public int crWidth(final FoContext context) {
- final int pageWidth = getPageMaster().traitPageWidth();
int width = getPageMaster().traitPageWidth()
- - getPageMaster().getMarginLeft(context, pageWidth)
- - getPageMaster().getMarginRight(context, pageWidth);
+ - getPageMaster().getMarginLeft(context)
+ - getPageMaster().getMarginRight(context);
if (traitPrecedence() == false) {
width -= getPageMaster().getStartExtent()
+ getPageMaster().getEndExtent();
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java 2007-07-13 17:20:50 UTC (rev 9991)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java 2007-07-14 22:44:42 UTC (rev 9992)
@@ -82,10 +82,8 @@
* {@inheritDoc}
*/
public int crX(final FoContext context) {
- final int pageWidth = getPageMaster().traitPageWidth();
- final int pageMarginLeft = getPageMaster().getMarginLeft(context,
- pageWidth);
- final int regionMarginLeft = this.getMarginLeft(context, pageWidth);
+ final int pageMarginLeft = getPageMaster().getMarginLeft(context);
+ final int regionMarginLeft = this.getMarginLeft(context);
return pageMarginLeft + regionMarginLeft;
}
@@ -93,11 +91,9 @@
* {@inheritDoc}
*/
public int crY(final FoContext context) {
- final int pageWidth = getPageMaster().traitPageWidth();
final int pageHeight = getPageMaster().traitPageHeight();
- final int pageMarginTop = getPageMaster().getMarginTop(context,
- pageWidth);
- final int regionMarginTop = this.getMarginTop(context, pageWidth);
+ final int pageMarginTop = getPageMaster().getMarginTop(context);
+ final int regionMarginTop = this.getMarginTop(context);
return pageHeight - pageMarginTop - regionMarginTop;
}
@@ -105,24 +101,22 @@
* {@inheritDoc}
*/
public int crWidth(final FoContext context) {
- final int pageWidth = getPageMaster().traitPageWidth();
return getPageMaster().traitPageWidth()
- - getPageMaster().getMarginLeft(context, pageWidth)
- - getPageMaster().getMarginRight(context, pageWidth)
- - this.getMarginLeft(context, pageWidth)
- - this.getMarginRight(context, pageWidth);
+ - getPageMaster().getMarginLeft(context)
+ - getPageMaster().getMarginRight(context)
+ - this.getMarginLeft(context)
+ - this.getMarginRight(context);
}
/**
* {@inheritDoc}
*/
public int crHeight(final FoContext context) {
- final int pageWidth = getPageMaster().traitPageWidth();
return getPageMaster().traitPageHeight()
- - getPageMaster().getMarginTop(context, pageWidth)
- - getPageMaster().getMarginBottom(context, pageWidth)
- - this.getMarginTop(context, pageWidth)
- - this.getMarginBottom(context, pageWidth);
+ - getPageMaster().getMarginTop(context)
+ - getPageMaster().getMarginBottom(context)
+ - this.getMarginTop(context)
+ - this.getMarginBottom(context);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java 2007-07-13 17:20:50 UTC (rev 9991)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java 2007-07-14 22:44:42 UTC (rev 9992)
@@ -296,7 +296,7 @@
public int getXPositionRAContent() {
/* TODO: Handle context better. */
final FoContext context = null;
- return getMarginLeft(context, traitPageWidth());
+ return getMarginLeft(context);
}
/**
@@ -308,7 +308,7 @@
/* TODO: Handle context better. */
final FoContext context = null;
return traitPageHeight()
- - getMarginTop(context, traitPageWidth());
+ - getMarginTop(context);
}
/**
@@ -319,9 +319,8 @@
public int getWidthRAContent() {
/* TODO: Handle context better. */
final FoContext context = null;
- return traitPageWidth()
- - getMarginLeft(context, traitPageWidth())
- - getMarginRight(context, traitPageWidth());
+ return traitPageWidth() - getMarginLeft(context)
+ - getMarginRight(context);
}
/**
@@ -332,9 +331,8 @@
public int getHeightRAContent() {
/* TODO: Handle context better. */
final FoContext context = null;
- return traitPageHeight()
- - getMarginTop(context, traitPageWidth())
- - getMarginBottom(context, traitPageWidth());
+ return traitPageHeight() - getMarginTop(context)
+ - getMarginBottom(context);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractMargin.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractMargin.java 2007-07-13 17:20:50 UTC (rev 9991)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractMargin.java 2007-07-14 22:44:42 UTC (rev 9992)
@@ -95,13 +95,11 @@
* Returns the value of this property.
* @param context An object that knows how to resolve FO context issues.
* @param fobj The FO for which this value is needed.
- * @param widthContainingBlock The width of the containing block.
* @return The value of this property.
*/
- public int getValue(final FoContext context,
- final FObj fobj, final int widthContainingBlock) {
+ public int getValue(final FoContext context, final FObj fobj) {
if (value().canEvalKeyword()) {
- return getKeywordValue(context, fobj, widthContainingBlock);
+ return getKeywordValue(context, fobj);
}
if (value().canEvalPercentage()) {
int base = 0;
@@ -109,7 +107,7 @@
final SimplePageMaster spm = (SimplePageMaster) fobj;
base = spm.traitPageHeight();
} else {
- base = widthContainingBlock;
+ base = context.widthContainingBlock();
}
final float percent = value().evalPercentage();
return Math.round(base * percent
@@ -132,31 +130,25 @@
* is a keyword.
* @param context An object that knows how to resolve FO context issues.
* @param fobj The FO for which this value is needed.
- * @param widthContainingBlock The width of the containing block.
* @return The value of this property.
*/
- private int getKeywordValue(final FoContext context,
- final FObj fobj, final int widthContainingBlock) {
+ private int getKeywordValue(final FoContext context, final FObj fobj) {
final FoValue foValue = this.convertValueToFoValue(value());
final AbsoluteCompass direction = this.getAbsoluteCompass();
switch (foValue) {
case INHERIT: {
final FObj effectiveParent = fobj.effectiveParent(context);
if (direction == AbsoluteCompass.LEFT) {
- return effectiveParent.getMarginLeft(context,
- widthContainingBlock);
+ return effectiveParent.getMarginLeft(context);
}
if (direction == AbsoluteCompass.RIGHT) {
- return effectiveParent.getMarginRight(
- context, widthContainingBlock);
+ return effectiveParent.getMarginRight(context);
}
if (direction == AbsoluteCompass.TOP) {
- return effectiveParent.getMarginTop(context,
- widthContainingBlock);
+ return effectiveParent.getMarginTop(context);
}
if (direction == AbsoluteCompass.BOTTOM) {
- return effectiveParent.getMarginBottom(context,
- widthContainingBlock);
+ return effectiveParent.getMarginBottom(context);
}
}
case AUTO: {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java 2007-07-13 17:20:50 UTC (rev 9991)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java 2007-07-14 22:44:42 UTC (rev 9992)
@@ -109,19 +109,15 @@
* @param context An object that knows how to resolve FO context issues.
* @param direction The direction for which the property value is needed.
* @param fobj The FO for which this value is needed.
- * @param widthContainingBlock The width of the containing block.
* @return The value of this property.
*/
public int getValue(final FoContext context,
- final AbsoluteCompass direction,
- final FObj fobj, final int widthContainingBlock) {
+ final AbsoluteCompass direction, final FObj fobj) {
if (value() instanceof ValueCollection) {
- return getCollectionValue(context, direction, fobj,
- widthContainingBlock);
+ return getCollectionValue(context, direction, fobj);
}
if (value().canEvalKeyword()) {
- return getKeywordValue(context, direction, fobj,
- widthContainingBlock);
+ return getKeywordValue(context, direction, fobj);
}
throw this.unexpectedRetrieval();
}
@@ -132,12 +128,10 @@
* @param context An object that knows how to resolve FO context issues.
* @param direction The direction for which the property value is needed.
* @param fobj The FO for which this value is needed.
- * @param widthContainingBlock The width of the containing block.
* @return The value of this property.
*/
private int getCollectionValue(final FoContext context,
- final AbsoluteCompass direction, final FObj fobj,
- final int widthContainingBlock) {
+ final AbsoluteCompass direction, final FObj fobj) {
final ValueCollection collection = (ValueCollection) value();
final int whichElement = PropertyCollection.whichElementForDirectional(
direction, collection.getCount());
@@ -148,7 +142,7 @@
final SimplePageMaster spm = (SimplePageMaster) fobj;
base = spm.traitPageHeight();
} else {
- base = widthContainingBlock;
+ base = context.widthContainingBlock();
}
final float percent = value.evalPercentage();
return Math.round(base * percent / WKConstants.PERCENT_CONVERSION);
@@ -165,31 +159,25 @@
* @param context An object that knows how to resolve FO context issues.
* @param direction The direction for which the property value is needed.
* @param fobj The FO for which this value is needed.
- * @param widthContainingBlock The width of the containing block.
* @return The value of this property.
*/
private int getKeywordValue(final FoContext context,
- final AbsoluteCompass direction,
- final FObj fobj, final int widthContainingBlock) {
+ final AbsoluteCompass direction, final FObj fobj) {
final FoValue foValue = this.convertValueToFoValue(value());
switch (foValue) {
case INHERIT: {
final FObj effectiveParent = fobj.effectiveParent(context);
if (direction == AbsoluteCompass.LEFT) {
- return effectiveParent.getMarginLeft(context,
- widthContainingBlock);
+ return effectiveParent.getMarginLeft(context);
}
if (direction == AbsoluteCompass.RIGHT) {
- return effectiveParent.getMarginRight(
- context, widthContainingBlock);
+ return effectiveParent.getMarginRight(context);
}
if (direction == AbsoluteCompass.TOP) {
- return effectiveParent.getMarginTop(context,
- widthContainingBlock);
+ return effectiveParent.getMarginTop(context);
}
if (direction == AbsoluteCompass.BOTTOM) {
- return effectiveParent.getMarginBottom(context,
- widthContainingBlock);
+ return effectiveParent.getMarginBottom(context);
}
}
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Padding.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Padding.java 2007-07-13 17:20:50 UTC (rev 9991)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Padding.java 2007-07-14 22:44:42 UTC (rev 9992)
@@ -109,19 +109,15 @@
* @param context An object that knows how to resolve FO context issues.
* @param direction The direction for which the property value is needed.
* @param fobj The FO for which this value is needed.
- * @param widthContainingBlock The width of the containing block.
* @return The value of this property.
*/
public int getValue(final FoContext context,
- final AbsoluteCompass direction,
- final FObj fobj, final int widthContainingBlock) {
+ final AbsoluteCompass direction, final FObj fobj) {
if (value() instanceof ValueCollection) {
- return getCollectionValue(context, direction, fobj,
- widthContainingBlock);
+ return getCollectionValue(context, direction, fobj);
}
if (value().canEvalKeyword()) {
- return getKeywordValue(context, direction, fobj,
- widthContainingBlock);
+ return getKeywordValue(context, direction, fobj);
}
throw this.unexpectedRetrieval();
}
@@ -132,12 +128,10 @@
* @param context An object that knows how to resolve FO context issues.
* @param direction The direction for which the property value is needed.
* @param fobj The FO for which this value is needed.
- * @param widthContainingBlock The width of the containing block.
* @return The value of this property.
*/
private int getCollectionValue(final FoContext context,
- final AbsoluteCompass direction, final FObj fobj,
- final int widthContainingBlock) {
+ final AbsoluteCompass direction, final FObj fobj) {
final ValueCollection collection = (ValueCollection) value();
final int whichElement = PropertyCollection.whichElementForDirectional(
direction, collection.getCount());
@@ -148,7 +142,7 @@
final SimplePageMaster spm = (SimplePageMaster) fobj;
base = spm.traitPageHeight();
} else {
- base = widthContainingBlock;
+ base = context.widthContainingBlock();
}
final float percent = value.evalPercentage();
return Math.round(base * percent / WKConstants.PERCENT_CONVERSION);
@@ -165,31 +159,25 @@
* @param context An object that knows how to resolve FO context issues.
* @param direction The direction for which the property value is needed.
* @param fobj The FO for which this value is needed.
- * @param widthContainingBlock The width of the containing block.
* @return The value of this property.
*/
private int getKeywordValue(final FoContext context,
- final AbsoluteCompass direction,
- final FObj fobj, final int widthContainingBlock) {
+ final AbsoluteCompass direction, final FObj fobj) {
final FoValue foValue = this.convertValueToFoValue(value());
switch (foValue) {
case INHERIT: {
final FObj effectiveParent = fobj.effectiveParent(context);
if (direction == AbsoluteCompass.LEFT) {
- return effectiveParent.getMarginLeft(context,
- widthContainingBlock);
+ return effectiveParent.getMarginLeft(context);
}
if (direction == AbsoluteCompass.RIGHT) {
- return effectiveParent.getMarginRight(
- context, widthContainingBlock);
+ return effectiveParent.getMarginRight(context);
}
if (direction == AbsoluteCompass.TOP) {
- return effectiveParent.getMarginTop(context,
- widthContainingBlock);
+ return effectiveParent.getMarginTop(context);
}
if (direction == AbsoluteCompass.BOTTOM) {
- return effectiveParent.getMarginBottom(context,
- widthContainingBlock);
+ return effectiveParent.getMarginBottom(context);
}
}
}
Modified: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/AbstractTestMargin.java
===================================================================
--- trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/AbstractTestMargin.java 2007-07-13 17:20:50 UTC (rev 9991)
+++ trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/AbstractTestMargin.java 2007-07-14 22:44:42 UTC (rev 9992)
@@ -52,8 +52,7 @@
*/
private int getPropertyValue(final AbstractMargin property,
final FObj testFobj) {
- final int testLength = property.getValue(STD_FO_CONTEXT, testFobj,
- 72000);
+ final int testLength = property.getValue(STD_FO_CONTEXT, testFobj);
return testLength;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-16 18:59:01
|
Revision: 9998
http://svn.sourceforge.net/foray/?rev=9998&view=rev
Author: victormote
Date: 2007-07-16 11:58:15 -0700 (Mon, 16 Jul 2007)
Log Message:
-----------
Fix errors in computation of space-before and space-after for MainRA, SpanRA, and NormalFlowRA.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/resource/fo-examples/basic/fonts.fo
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2007-07-15 01:13:29 UTC (rev 9997)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2007-07-16 18:58:15 UTC (rev 9998)
@@ -442,4 +442,18 @@
return 0;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitSpaceBeforeOptimum() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitSpaceAfterOptimum() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java 2007-07-15 01:13:29 UTC (rev 9997)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java 2007-07-16 18:58:15 UTC (rev 9998)
@@ -362,4 +362,18 @@
return 0;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitSpaceBeforeOptimum() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitSpaceAfterOptimum() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2007-07-15 01:13:29 UTC (rev 9997)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2007-07-16 18:58:15 UTC (rev 9998)
@@ -519,4 +519,18 @@
return 0;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitSpaceBeforeOptimum() {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int traitSpaceAfterOptimum() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-07-15 01:13:29 UTC (rev 9997)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-07-16 18:58:15 UTC (rev 9998)
@@ -1811,8 +1811,10 @@
final FoProperty relativePropertyEnum,
final RelativeCompass relativeDirection) {
/* The priority here comes from XSL-FO 1.1, Section 5.3.1:
- * 1) The absolute-direction property (margin-???), if explicitly set.
- * 2) The relative-direction property (space-before), if explicitly set.
+ * 1) The absolute-direction property (margin-top, for example), if
+ * explicitly set.
+ * 2) The relative-direction property (space-before, for example), if
+ * explicitly set.
* 3) The absolute-direction shorthand property (margin). */
/* First try the absolute-direction property. */
@@ -1827,7 +1829,7 @@
return absoluteProperty.getValue(context, fobj);
}
- /* Now try the relative property. */
+ /* Now try the relative-direction property. */
final AbstractRelativeSpace relativeProperty =
(AbstractRelativeSpace) getProperty(relativePropertyEnum);
if (relativeProperty != null) {
Modified: trunk/foray/resource/fo-examples/basic/fonts.fo
===================================================================
--- trunk/foray/resource/fo-examples/basic/fonts.fo 2007-07-15 01:13:29 UTC (rev 9997)
+++ trunk/foray/resource/fo-examples/basic/fonts.fo 2007-07-16 18:58:15 UTC (rev 9998)
@@ -9,8 +9,8 @@
page-width="8.5in"
margin-top=".5in"
margin-bottom=".5in"
- margin-left="2.5cm"
- margin-right="2.5cm">
+ margin-left="1in"
+ margin-right="1in">
<fo:region-body margin-top="1in" margin-bottom="1in"/>
<fo:region-before extent=".5in"/>
<fo:region-after extent=".5in"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-16 20:12:19
|
Revision: 10002
http://svn.sourceforge.net/foray/?rev=10002&view=rev
Author: victormote
Date: 2007-07-16 13:12:22 -0700 (Mon, 16 Jul 2007)
Log Message:
-----------
Conform to axsl changes removing the "margin" trait methods.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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-07-16 19:57:37 UTC (rev 10001)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-16 20:12:22 UTC (rev 10002)
@@ -1079,38 +1079,6 @@
}
/**
- * Returns the top margin for this area.
- * @return The top margin for this area.
- */
- public int getMarginTop() {
- return traitGeneratedBy().getMarginTop(this);
- }
-
- /**
- * Returns the bottom margin for this area.
- * @return The bottom margin for this area.
- */
- public int getMarginBottom() {
- return traitGeneratedBy().getMarginBottom(this);
- }
-
- /**
- * Returns the left margin for this area.
- * @return The left margin for this area.
- */
- public int getMarginLeft() {
- return traitGeneratedBy().getMarginLeft(this);
- }
-
- /**
- * Returns the right margin for this area.
- * @return The right margin for this area.
- */
- public int getMarginRight() {
- return traitGeneratedBy().getMarginRight(this);
- }
-
- /**
* {@inheritDoc}
*/
public abstract int pdAvailable();
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-16 19:57:37 UTC (rev 10001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-16 20:12:22 UTC (rev 10002)
@@ -568,28 +568,40 @@
public abstract Namespace getNamespace();
/**
- * {@inheritDoc}
+ * Returns the left margin of this object.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return The left margin, in millipoints, of this object.
*/
public int getMarginLeft(final FoContext context) {
return propertyList.getMarginLeft(this, context);
}
/**
- * {@inheritDoc}
+ * Returns the right margin of this object.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return The right margin, in millipoints, of this object.
*/
public int getMarginRight(final FoContext context) {
return propertyList.getMarginRight(this, context);
}
/**
- * {@inheritDoc}
+ * Returns the top margin of this object.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return The top margin, in millipoints, of this object.
*/
public int getMarginTop(final FoContext context) {
return propertyList.getMarginTop(this, context);
}
/**
- * {@inheritDoc}
+ * Returns the bottom margin of this object.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return The bottom margin, in millipoints, of this object.
*/
public int getMarginBottom(final FoContext context) {
return propertyList.getMarginBottom(this, context);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-16 20:41:06
|
Revision: 10004
http://svn.sourceforge.net/foray/?rev=10004&view=rev
Author: victormote
Date: 2007-07-16 13:41:06 -0700 (Mon, 16 Jul 2007)
Log Message:
-----------
Conform to axsl changes removing some block margin-related methods from Fo.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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-07-16 20:32:32 UTC (rev 10003)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-16 20:41:06 UTC (rev 10004)
@@ -807,24 +807,6 @@
}
/**
- * Returns the space-before conditionality for this area.
- * @return The space-before conditionality for this area.
- * @see Fo#traitSpaceBeforeConditionality(FoContext)
- */
- public Conditionality traitSpaceBeforeConditionality() {
- return traitGeneratedBy().traitSpaceBeforeConditionality(this);
- }
-
- /**
- * Returns the space-before precedence for this area.
- * @return The space-before precedence for this area.
- * @see Fo#traitSpaceBeforePrecedence()
- */
- public int traitSpaceBeforePrecedence() {
- return traitGeneratedBy().traitSpaceBeforePrecedence();
- }
-
- /**
* Returns the space-after minimum trait for this area.
* @return The space-after minimum trait for this area.
* @see Fo#traitSpaceAfterMinimum(FoContext)
@@ -852,24 +834,6 @@
}
/**
- * Returns the space-after conditionality for this area.
- * @return The space-after conditionality for this area.
- * @see Fo#traitSpaceAfterConditionality(FoContext)
- */
- public Conditionality traitSpaceAfterConditionality() {
- return traitGeneratedBy().traitSpaceAfterConditionality(this);
- }
-
- /**
- * Returns the space-after precedence for this area.
- * @return The space-after precedence for this area.
- * @see Fo#traitSpaceAfterPrecedence()
- */
- public int traitSpaceAfterPrecedence() {
- return traitGeneratedBy().traitSpaceAfterPrecedence();
- }
-
- /**
* Returns the space-start optimum trait for this area.
* @return The space-start optimum trait for this area.
* @see Fo#traitSpaceStartOptimum(FoContext)
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-16 20:32:32 UTC (rev 10003)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-16 20:41:06 UTC (rev 10004)
@@ -1139,14 +1139,16 @@
}
/**
- * {@inheritDoc}
+ * Returns the space-before conditionality for this area.
+ * @return The space-before conditionality for this area.
*/
public Conditionality traitSpaceBeforeConditionality() {
return traitGeneratedBy().traitHalfLeadingConditionality(this);
}
/**
- * {@inheritDoc}
+ * Returns the space-before precedence for this area.
+ * @return The space-before precedence for this area.
*/
public int traitSpaceBeforePrecedence() {
return traitGeneratedBy().traitHalfLeadingPrecedence(this);
@@ -1186,14 +1188,16 @@
}
/**
- * {@inheritDoc}
+ * Returns the space-after conditionality for this area.
+ * @return The space-after conditionality for this area.
*/
public Conditionality traitSpaceAfterConditionality() {
return traitGeneratedBy().traitHalfLeadingConditionality(this);
}
/**
- * {@inheritDoc}
+ * Returns the space-after precedence for this area.
+ * @return The space-after precedence for this area.
*/
public int traitSpaceAfterPrecedence() {
return traitGeneratedBy().traitHalfLeadingPrecedence(this);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-16 20:32:32 UTC (rev 10003)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-16 20:41:06 UTC (rev 10004)
@@ -106,6 +106,7 @@
import org.axsl.fo.fo.prop.CommonBorderPaddingBgPa;
import org.axsl.fo.fo.prop.CommonFontPa;
import org.axsl.fo.fo.prop.CommonHyphenationPa;
+import org.axsl.fo.fo.prop.CommonMarginBlockPa;
import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -128,7 +129,7 @@
public abstract class FObj extends FONode implements org.axsl.fo.Fo,
CommonAccessibilityPa, CommonAbsolutePositionPa,
CommonAuralPa, CommonBorderPaddingBgPa, CommonFontPa,
- CommonHyphenationPa, HyphenationLadderCountPa {
+ CommonHyphenationPa, CommonMarginBlockPa, HyphenationLadderCountPa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-16 21:39:56
|
Revision: 10007
http://svn.sourceforge.net/foray/?rev=10007&view=rev
Author: victormote
Date: 2007-07-16 14:39:07 -0700 (Mon, 16 Jul 2007)
Log Message:
-----------
Conform to axsl changes rolling up method parameters into new FoContext method.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractIndent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnBodyStart.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnLabelEnd.java
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/AbstractTestIndent.java
trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.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-07-16 21:06:10 UTC (rev 10006)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-16 21:39:07 UTC (rev 10007)
@@ -163,22 +163,19 @@
/**
* Returns the end-indent trait.
* @return The end-indent trait.
- * @see Fo#traitEndIndent(FoContext, int)
+ * @see Fo#traitEndIndent(FoContext)
*/
public int traitEndIndent() {
- final int percentBase = this.getContainingReferenceArea().crIpd();
- return traitGeneratedBy().traitEndIndent(this, percentBase);
+ return traitGeneratedBy().traitEndIndent(this);
}
/**
* Returns the start-indent trait.
* @return The start-indent trait.
- * @see Fo#traitStartIndent(FoContext, int)
+ * @see Fo#traitStartIndent(FoContext)
*/
public int traitStartIndent() {
- final Area containingRA = this.getContainingReferenceArea();
- final int percentBase = containingRA.crIpd();
- return traitGeneratedBy().traitStartIndent(this, percentBase);
+ return traitGeneratedBy().traitStartIndent(this);
}
/**
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-16 21:06:10 UTC (rev 10006)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-16 21:39:07 UTC (rev 10007)
@@ -774,4 +774,11 @@
return this.nearestArea().traitIsLast();
}
+ /**
+ * {@inheritDoc}
+ */
+ public int ipdContainingRefArea() {
+ return this.getContainingReferenceArea().crIpd();
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-16 21:06:10 UTC (rev 10006)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-16 21:39:07 UTC (rev 10007)
@@ -723,10 +723,8 @@
/**
* {@inheritDoc}
*/
- public int traitStartIndent(final FoContext context,
- final int ipdContainingRA) {
- return propertyList.getIndent(this, context, RelativeCompass.START,
- ipdContainingRA);
+ public int traitStartIndent(final FoContext context) {
+ return propertyList.getIndent(this, context, RelativeCompass.START);
}
/**
@@ -1269,10 +1267,8 @@
/**
* {@inheritDoc}
*/
- public int traitEndIndent(final FoContext context,
- final int ipdContainingRA) {
- return propertyList.getIndent(this, context, RelativeCompass.END,
- ipdContainingRA);
+ public int traitEndIndent(final FoContext context) {
+ return propertyList.getIndent(this, context, RelativeCompass.END);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-07-16 21:06:10 UTC (rev 10006)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-07-16 21:39:07 UTC (rev 10007)
@@ -740,14 +740,10 @@
* @param context An object that knows how to resolve FO Tree context
* issues.
* @param direction The direction for which the indent value is needed.
- * @param ipdContainingRA The inline-progression-dimension of the containing
- * reference area, in millipoints. This is used when the property value is
- * a percentage.
* @return The start-indent or end-indent value, in millipoints.
*/
public int getIndent(final FObj fobj, final FoContext context,
- final RelativeCompass direction,
- final int ipdContainingRA) {
+ final RelativeCompass direction) {
/* This algorithm is mostly documented at XSL-FO Recommendation 1.1,
* Section 5.3.2, but see also Sections 7.11.7 (start-indent property)
* and 7.11.8 (end-indent property). */
@@ -770,7 +766,7 @@
if (! fobj.traitIsReferenceArea()) {
/* Start with the inherited relative value. */
indent += AbstractIndent.getValueNoInstance(context, fobj,
- direction, ipdContainingRA);
+ direction);
}
indent += abstractMargin.getValue(context, fobj);
/* TODO: Do the padding and border-width values below actually
@@ -791,10 +787,9 @@
direction);
indent = (AbstractIndent) getProperty(rawPropertyType);
if (indent == null) {
- return AbstractIndent.getValueNoInstance(context, fobj, direction,
- ipdContainingRA);
+ return AbstractIndent.getValueNoInstance(context, fobj, direction);
}
- return indent.getValue(context, fobj, ipdContainingRA);
+ return indent.getValue(context, fobj);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractIndent.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractIndent.java 2007-07-16 21:06:10 UTC (rev 10006)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractIndent.java 2007-07-16 21:39:07 UTC (rev 10007)
@@ -104,23 +104,20 @@
* Returns the value of this property.
* @param context An object that knows how to resolve FO context issues.
* @param fobj The FO for which this value is needed.
- * @param ipdContainingRA The inline-progression-dimension of the containing
- * reference-area.
* @return The value of this property.
*/
- public int getValue(final FoContext context, final FObj fobj,
- final int ipdContainingRA) {
+ public int getValue(final FoContext context, final FObj fobj) {
final RelativeCompass direction = this.getRelativeCompass();
if (value().canEvalKeyword()) {
final FoValue keyword = this.convertValueToFoValue(value());
if (keyword == FoValue.INHERIT) {
- return getValueNoInstance(context, fobj, direction,
- ipdContainingRA);
+ return getValueNoInstance(context, fobj, direction);
}
}
if (value().canEvalPercentage()) {
final float percentage = value().evalPercentage();
- return Math.round(percentage * ipdContainingRA /
+ final int base = context.ipdContainingRefArea();
+ return Math.round(percentage * base /
WKConstants.PERCENT_CONVERSION);
}
if (value().canEvalLength()) {
@@ -152,19 +149,15 @@
* @param context An object that knows how to resolve FO context issues.
* @param fobj The FO for which this value is needed.
* @param direction The direction for which this value is needed.
- * @param ipdContainingRA The inline-progression-dimension of the containing
- * reference-area.
* @return The initial value for this property.
*/
public static int getValueNoInstance(final FoContext context,
- final FObj fobj, final RelativeCompass direction,
- final int ipdContainingRA) {
+ final FObj fobj, final RelativeCompass direction) {
final FObj parent = fobj.effectiveParent(context);
if (parent == null) {
return 0;
}
- return parent.getPropertyList().getIndent(parent, context, direction,
- ipdContainingRA);
+ return parent.getPropertyList().getIndent(parent, context, direction);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnBodyStart.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnBodyStart.java 2007-07-16 21:06:10 UTC (rev 10006)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnBodyStart.java 2007-07-16 21:39:07 UTC (rev 10007)
@@ -68,7 +68,7 @@
*/
public DtLength eval(final FObj fobj, final FoContext context) {
final FObj item = fobj.getNearestListItem(null);
- final int startIndent = item.traitStartIndent(context, 0);
+ final int startIndent = item.traitStartIndent(context);
/* TODO: We don't know how to compute this yet. */
final int startIntrusionAdjustment = 0;
final int provisionalDistanceBetweenStarts
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnLabelEnd.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnLabelEnd.java 2007-07-16 21:06:10 UTC (rev 10006)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnLabelEnd.java 2007-07-16 21:39:07 UTC (rev 10007)
@@ -71,7 +71,7 @@
final ListBlock listBlock = fobj.getNearestAncestorListBlock(null);
final int provisionalDistanceBetweenStarts
= listBlock.traitProvisionalDistanceBetweenStarts(context);
- final int startIndent = listBlock.traitStartIndent(context, 0);
+ final int startIndent = listBlock.traitStartIndent(context);
/* TODO: We don't know how to get this number yet. */
final int startIntrusionAdjustment = 0;
final int provisionalLabelSeparation
Modified: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java
===================================================================
--- trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java 2007-07-16 21:06:10 UTC (rev 10006)
+++ trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java 2007-07-16 21:39:07 UTC (rev 10007)
@@ -70,6 +70,9 @@
public boolean isLast() {
return false;
}
+ public int ipdContainingRefArea() {
+ return 6 * 72000;
+ }
};
/**
Modified: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/AbstractTestIndent.java
===================================================================
--- trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/AbstractTestIndent.java 2007-07-16 21:06:10 UTC (rev 10006)
+++ trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/AbstractTestIndent.java 2007-07-16 21:39:07 UTC (rev 10007)
@@ -52,8 +52,7 @@
*/
private int getPropertyValue(final AbstractIndent property,
final FObj testFobj) {
- final int testLength = property.getValue(STD_FO_CONTEXT, testFobj,
- 72000);
+ final int testLength = property.getValue(STD_FO_CONTEXT, testFobj);
return testLength;
}
Modified: trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java 2007-07-16 21:06:10 UTC (rev 10006)
+++ trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java 2007-07-16 21:39:07 UTC (rev 10007)
@@ -187,9 +187,8 @@
*/
public void render(final Block block) {
final FoContext context = null;
- final int containingIPD = 1;
- this.mifDoc.setBlockProp(block.traitStartIndent(context, containingIPD),
- block.traitEndIndent(context, containingIPD));
+ this.mifDoc.setBlockProp(block.traitStartIndent(context),
+ block.traitEndIndent(context));
}
// /**
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java 2007-07-16 21:06:10 UTC (rev 10006)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java 2007-07-16 21:39:07 UTC (rev 10007)
@@ -125,4 +125,11 @@
return this.wrappedContext.isLast();
}
+ /**
+ * {@inheritDoc}
+ */
+ public int ipdContainingRefArea() {
+ return this.wrappedContext.ipdContainingRefArea();
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-16 23:35:55
|
Revision: 10008
http://svn.sourceforge.net/foray/?rev=10008&view=rev
Author: victormote
Date: 2007-07-16 16:35:53 -0700 (Mon, 16 Jul 2007)
Log Message:
-----------
Conform to axsl changes rolling up method parameter into new FoContext method.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LeaderPatternWidth.java
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLeaderPatternWidth.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-16 21:39:07 UTC (rev 10007)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-16 23:35:53 UTC (rev 10008)
@@ -781,4 +781,11 @@
return this.getContainingReferenceArea().crIpd();
}
+ /**
+ * {@inheritDoc}
+ */
+ public int ipdParentArea() {
+ return this.ancestorArea().crIpd();
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-16 21:39:07 UTC (rev 10007)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-16 23:35:53 UTC (rev 10008)
@@ -225,8 +225,7 @@
* @see Fo#traitLeaderPatternWidth
*/
public int traitLeaderPatternWidth() {
- return traitGeneratedBy().traitLeaderPatternWidth(
- this, ancestorArea().crIpd());
+ return traitGeneratedBy().traitLeaderPatternWidth(this);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-16 21:39:07 UTC (rev 10007)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-16 23:35:53 UTC (rev 10008)
@@ -1599,9 +1599,8 @@
/**
* {@inheritDoc}
*/
- public int traitLeaderPatternWidth(final FoContext context,
- final int ipdCRParent) {
- return propertyList.getLeaderPatternWidth(this, context, ipdCRParent);
+ public int traitLeaderPatternWidth(final FoContext context) {
+ return propertyList.getLeaderPatternWidth(this, context);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-07-16 21:39:07 UTC (rev 10007)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-07-16 23:35:53 UTC (rev 10008)
@@ -2422,18 +2422,15 @@
* @param fobj The FObj to which the property belongs.
* @param context An object that knows how to resolve FO Tree context
* issues.
- * @param ipdCRParent The IPD of the content rectangle of the parent area.
* @return -1 for "use-font-metrics".
*/
- public int getLeaderPatternWidth(final FObj fobj, final FoContext context,
- final int ipdCRParent) {
+ public int getLeaderPatternWidth(final FObj fobj, final FoContext context) {
final LeaderPatternWidth property = (LeaderPatternWidth)
getProperty(FoProperty.LEADER_PATTERN_WIDTH);
if (property != null) {
- return property.getValue(context, fobj, ipdCRParent);
+ return property.getValue(context, fobj);
}
- return LeaderPatternWidth.getValueNoInstance(context, fobj,
- ipdCRParent);
+ return LeaderPatternWidth.getValueNoInstance(context, fobj);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LeaderPatternWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LeaderPatternWidth.java 2007-07-16 21:39:07 UTC (rev 10007)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LeaderPatternWidth.java 2007-07-16 23:35:53 UTC (rev 10008)
@@ -92,17 +92,14 @@
* Returns the value of this property.
* @param context An object that knows how to resolve FO context issues.
* @param fobj The FO for which this value is needed.
- * @param ipdCRParent The inline-progression-dimension of the
- * content-rectangle of the parent area.
* @return The value of this property.
*/
- public int getValue(final FoContext context, final FObj fobj,
- final int ipdCRParent) {
+ public int getValue(final FoContext context, final FObj fobj) {
if (value().canEvalKeyword()) {
final FoValue keyword = this.convertValueToFoValue(value());
switch (keyword) {
case INHERIT: {
- return getValueNoInstance(context, fobj, ipdCRParent);
+ return getValueNoInstance(context, fobj);
}
case USE_FONT_METRICS: {
return getValueFromFontMetrics(fobj);
@@ -111,7 +108,8 @@
}
if (value().canEvalPercentage()) {
final float percentage = value().evalPercentage();
- return Math.round(percentage * ipdCRParent /
+ final int base = context.ipdParentArea();
+ return Math.round(percentage * base /
WKConstants.PERCENT_CONVERSION);
}
if (value().canEvalLength()) {
@@ -124,17 +122,15 @@
* Returns the default (initial) value for this property.
* @param context An object that knows how to resolve FO context issues.
* @param fobj The FO for which this value is needed.
- * @param ipdCRParent The inline-progression-dimension of the
- * content-rectangle of the parent area.
* @return The initial value for this property.
*/
public static int getValueNoInstance(final FoContext context,
- final FObj fobj, final int ipdCRParent) {
+ final FObj fobj) {
final FObj parent = fobj.effectiveParent(context);
if (parent == null) {
return getValueFromFontMetrics(fobj);
}
- return parent.traitLeaderPatternWidth(context, ipdCRParent);
+ return parent.traitLeaderPatternWidth(context);
}
/**
Modified: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java
===================================================================
--- trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java 2007-07-16 21:39:07 UTC (rev 10007)
+++ trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java 2007-07-16 23:35:53 UTC (rev 10008)
@@ -73,6 +73,9 @@
public int ipdContainingRefArea() {
return 6 * 72000;
}
+ public int ipdParentArea() {
+ return 72000;
+ }
};
/**
Modified: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLeaderPatternWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLeaderPatternWidth.java 2007-07-16 21:39:07 UTC (rev 10007)
+++ trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLeaderPatternWidth.java 2007-07-16 23:35:53 UTC (rev 10008)
@@ -56,8 +56,7 @@
*/
private int getPropertyValue(final LeaderPatternWidth property,
final FObj testFobj) {
- final int testLength = property.getValue(STD_FO_CONTEXT, testFobj,
- 72000);
+ final int testLength = property.getValue(STD_FO_CONTEXT, testFobj);
return testLength;
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java 2007-07-16 21:39:07 UTC (rev 10007)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java 2007-07-16 23:35:53 UTC (rev 10008)
@@ -132,4 +132,11 @@
return this.wrappedContext.ipdContainingRefArea();
}
+ /**
+ * {@inheritDoc}
+ */
+ public int ipdParentArea() {
+ return this.wrappedContext.ipdParentArea();
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-17 17:13:57
|
Revision: 10011
http://svn.sourceforge.net/foray/?rev=10011&view=rev
Author: victormote
Date: 2007-07-17 10:07:16 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to CommonMarginInlinePa.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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-07-17 00:43:17 UTC (rev 10010)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-17 17:07:16 UTC (rev 10011)
@@ -36,7 +36,6 @@
import org.axsl.common.value.AbsoluteDirection;
import org.axsl.common.value.AlignmentBaseline;
import org.axsl.common.value.Baseline;
-import org.axsl.common.value.Conditionality;
import org.axsl.common.value.DisplayAlign;
import org.axsl.common.value.LineStackingStrategy;
import org.axsl.common.value.LinkType;
@@ -792,24 +791,6 @@
}
/**
- * Returns the space-start conditionality for this area.
- * @return The space-start conditionality for this area.
- * @see Fo#traitSpaceStartConditionality()
- */
- public Conditionality traitSpaceStartConditionality() {
- return traitGeneratedBy().traitSpaceStartConditionality();
- }
-
- /**
- * Returns the space-start precedence for this area.
- * @return The space-start precedence for this area.
- * @see Fo#traitSpaceStartPrecedence()
- */
- public int traitSpaceStartPrecedence() {
- return traitGeneratedBy().traitSpaceStartPrecedence();
- }
-
- /**
* Returns the space-end optimum trait for this area.
* @return The space-end optimum trait for this area.
* @see Fo#traitSpaceEndOptimum(FoContext)
@@ -819,24 +800,6 @@
}
/**
- * Returns the space-end conditionality for this area.
- * @return The space-end conditionality for this area.
- * @see Fo#traitSpaceEndConditionality()
- */
- public Conditionality traitSpaceEndConditionality() {
- return traitGeneratedBy().traitSpaceEndConditionality();
- }
-
- /**
- * Returns the space-end precedence for this area.
- * @return The space-end precedence for this area.
- * @see Fo#traitSpaceEndPrecedence()
- */
- public int traitSpaceEndPrecedence() {
- return traitGeneratedBy().traitSpaceEndPrecedence();
- }
-
- /**
* Returns the bp direction trait for this area.
* @return The bp direction trait for this area.
* @see Fo#traitBpDirection(FoContext)
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 00:43:17 UTC (rev 10010)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 17:07:16 UTC (rev 10011)
@@ -108,6 +108,7 @@
import org.axsl.fo.fo.prop.CommonFontPa;
import org.axsl.fo.fo.prop.CommonHyphenationPa;
import org.axsl.fo.fo.prop.CommonMarginBlockPa;
+import org.axsl.fo.fo.prop.CommonMarginInlinePa;
import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -130,7 +131,8 @@
public abstract class FObj extends FONode implements org.axsl.fo.Fo,
CommonAccessibilityPa, CommonAbsolutePositionPa,
CommonAuralPa, CommonBorderPaddingBgPa, CommonFontPa,
- CommonHyphenationPa, CommonMarginBlockPa, HyphenationLadderCountPa {
+ CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
+ HyphenationLadderCountPa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-17 19:04:34
|
Revision: 10013
http://svn.sourceforge.net/foray/?rev=10013&view=rev
Author: victormote
Date: 2007-07-17 12:04:35 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to CommonRelativePositionPa.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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-07-17 17:31:45 UTC (rev 10012)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-17 19:04:35 UTC (rev 10013)
@@ -41,7 +41,6 @@
import org.axsl.common.value.LinkType;
import org.axsl.common.value.ReferenceOrientation;
import org.axsl.common.value.RelativeAxis;
-import org.axsl.common.value.RelativePosition;
import org.axsl.common.value.TextAlign;
import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.common.value.WrapOption;
@@ -219,15 +218,6 @@
}
/**
- * Returns the relative-position for this area.
- * @return The relative-position for this area.
- * @see Fo#traitRelativePosition(FoContext)
- */
- public RelativePosition traitRelativePosition() {
- return traitGeneratedBy().traitRelativePosition(this);
- }
-
- /**
* Indicates whether this area is its parent's first child.
* @return True iff this area is its parent's first child.
*/
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 17:31:45 UTC (rev 10012)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 19:04:35 UTC (rev 10013)
@@ -109,6 +109,7 @@
import org.axsl.fo.fo.prop.CommonHyphenationPa;
import org.axsl.fo.fo.prop.CommonMarginBlockPa;
import org.axsl.fo.fo.prop.CommonMarginInlinePa;
+import org.axsl.fo.fo.prop.CommonRelativePositionPa;
import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -132,7 +133,7 @@
CommonAccessibilityPa, CommonAbsolutePositionPa,
CommonAuralPa, CommonBorderPaddingBgPa, CommonFontPa,
CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
- HyphenationLadderCountPa {
+ CommonRelativePositionPa, HyphenationLadderCountPa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-17 19:45:06
|
Revision: 10014
http://svn.sourceforge.net/foray/?rev=10014&view=rev
Author: victormote
Date: 2007-07-17 12:45:06 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2007-07-17 19:04:35 UTC (rev 10013)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2007-07-17 19:45:06 UTC (rev 10014)
@@ -238,14 +238,15 @@
* @return The adjustment to the start edge.
*/
public int getStartAdjust() {
- final TableCell tableCell = traitGeneratedBy();
- if (tableCell.traitBorderCollapse(this) == BorderModel.SEPARATE) {
- final int iSep = tableCell.traitBorderSeparationIpd(this);
- return iSep / 2 + tableCell.traitBorderStartWidth(this)
- + tableCell.traitPaddingStart(this);
+ final TableRA tableArea = this.ancestorTableArea();
+ final Table table = tableArea.traitGeneratedBy();
+ if (table.traitBorderCollapse(this) == BorderModel.SEPARATE) {
+ final int iSep = table.traitBorderSeparationIpd(this);
+ return iSep / 2 + table.traitBorderStartWidth(this)
+ + table.traitPaddingStart(this);
}
- return tableCell.traitBorderStartWidth(this) / 2
- + tableCell.traitPaddingStart(this);
+ return table.traitBorderStartWidth(this) / 2
+ + table.traitPaddingStart(this);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 19:04:35 UTC (rev 10013)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 19:45:06 UTC (rev 10014)
@@ -101,6 +101,9 @@
import org.axsl.fo.FoInlineContext;
import org.axsl.fo.FoTreeException;
import org.axsl.fo.fo.Marker;
+import org.axsl.fo.fo.prop.ActiveStatePa;
+import org.axsl.fo.fo.prop.AutoRestorePa;
+import org.axsl.fo.fo.prop.BorderCollapsePa;
import org.axsl.fo.fo.prop.CommonAbsolutePositionPa;
import org.axsl.fo.fo.prop.CommonAccessibilityPa;
import org.axsl.fo.fo.prop.CommonAuralPa;
@@ -133,7 +136,8 @@
CommonAccessibilityPa, CommonAbsolutePositionPa,
CommonAuralPa, CommonBorderPaddingBgPa, CommonFontPa,
CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
- CommonRelativePositionPa, HyphenationLadderCountPa {
+ CommonRelativePositionPa, ActiveStatePa, AutoRestorePa,
+ BorderCollapsePa, HyphenationLadderCountPa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-17 20:11:30
|
Revision: 10015
http://svn.sourceforge.net/foray/?rev=10015&view=rev
Author: victormote
Date: 2007-07-17 13:11:18 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 19:45:06 UTC (rev 10014)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 20:11:18 UTC (rev 10015)
@@ -104,6 +104,7 @@
import org.axsl.fo.fo.prop.ActiveStatePa;
import org.axsl.fo.fo.prop.AutoRestorePa;
import org.axsl.fo.fo.prop.BorderCollapsePa;
+import org.axsl.fo.fo.prop.BorderSeparationPa;
import org.axsl.fo.fo.prop.CommonAbsolutePositionPa;
import org.axsl.fo.fo.prop.CommonAccessibilityPa;
import org.axsl.fo.fo.prop.CommonAuralPa;
@@ -114,6 +115,7 @@
import org.axsl.fo.fo.prop.CommonMarginInlinePa;
import org.axsl.fo.fo.prop.CommonRelativePositionPa;
import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
+import org.axsl.fo.fo.prop.TableBorderPrecedencePa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
import org.axsl.font.FontUse;
@@ -137,7 +139,8 @@
CommonAuralPa, CommonBorderPaddingBgPa, CommonFontPa,
CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
CommonRelativePositionPa, ActiveStatePa, AutoRestorePa,
- BorderCollapsePa, HyphenationLadderCountPa {
+ BorderCollapsePa, BorderSeparationPa, HyphenationLadderCountPa,
+ TableBorderPrecedencePa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2007-07-17 19:45:06 UTC (rev 10014)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2007-07-17 20:11:18 UTC (rev 10015)
@@ -29,12 +29,14 @@
package org.foray.pioneer;
import org.axsl.area.AreaNode;
+import org.axsl.area.AreaTreeException;
+import org.axsl.area.TableArea;
import org.axsl.area.TableCellArea;
import org.axsl.area.TableRowContainer;
-import org.axsl.area.AreaTreeException;
import org.axsl.fo.Fo;
import org.axsl.fo.FoContext;
import org.axsl.fo.fo.GraftingPoint;
+import org.axsl.fo.fo.Table;
import org.axsl.fo.fo.TableCell;
/**
@@ -74,8 +76,10 @@
* @return The allocation height of the cell area.
*/
public int getHeight(final FoContext context) {
+ final TableArea tableArea = areaContainer.ancestorTableArea();
+ final Table table = tableArea.traitGeneratedBy();
return areaContainer.crBpd()
- + this.node.traitBorderSeparationBpd(context)
+ + table.traitBorderSeparationBpd(context)
- (this.node.traitBorderBeforeWidth(context)
+ this.node.traitBorderAfterWidth(context))
/ 2;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-17 20:45:40
|
Revision: 10017
http://svn.sourceforge.net/foray/?rev=10017&view=rev
Author: victormote
Date: 2007-07-17 13:45:38 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2007-07-17 20:28:52 UTC (rev 10016)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2007-07-17 20:45:38 UTC (rev 10017)
@@ -258,12 +258,12 @@
}
// The requirements do not match, so we need to create a new span area.
int numColumns = 0;
+ final RegionBody body = this.traitGeneratedBy();
if (fo.traitSpan(this) == Span.ALL) {
numColumns = 1;
} else {
- numColumns = fo.traitColumnCount(this);
+ numColumns = body.traitColumnCount(this);
}
- final RegionBody body = this.traitGeneratedBy();
final MainRA main = (MainRA) this.getParent();
final SpanRA spanArea = SpanRA.makeSpanArea(body, main, numColumns);
return spanArea;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 20:28:52 UTC (rev 10016)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 20:45:38 UTC (rev 10017)
@@ -108,6 +108,9 @@
import org.axsl.fo.fo.prop.CaptionSidePa;
import org.axsl.fo.fo.prop.CaseNamePa;
import org.axsl.fo.fo.prop.CaseTitlePa;
+import org.axsl.fo.fo.prop.ColorProfileNamePa;
+import org.axsl.fo.fo.prop.ColumnCountPa;
+import org.axsl.fo.fo.prop.ColumnGapPa;
import org.axsl.fo.fo.prop.CommonAbsolutePositionPa;
import org.axsl.fo.fo.prop.CommonAccessibilityPa;
import org.axsl.fo.fo.prop.CommonAuralPa;
@@ -143,7 +146,7 @@
CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
CommonRelativePositionPa, ActiveStatePa, AutoRestorePa,
BorderCollapsePa, BorderSeparationPa, CaptionSidePa, CaseNamePa,
- CaseTitlePa,
+ CaseTitlePa, ColorProfileNamePa, ColumnCountPa, ColumnGapPa,
HyphenationLadderCountPa, TableBorderPrecedencePa {
/** A static empty and immutable list of children, suitable for return by
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-17 21:20:38
|
Revision: 10019
http://svn.sourceforge.net/foray/?rev=10019&view=rev
Author: victormote
Date: 2007-07-17 14:20:33 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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-07-17 20:57:37 UTC (rev 10018)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-17 21:20:33 UTC (rev 10019)
@@ -1063,15 +1063,6 @@
}
/**
- * Returns the extent trait for this area.
- * @return The extent trait for this area.
- * @see Fo#traitExtent()
- */
- public int traitExtent() {
- return traitGeneratedBy().traitExtent();
- }
-
- /**
* Returns the whitespace-treatment trait for this area.
* @return The whitespace-treatment trait for this area.
* @see Fo#traitWhiteSpaceTreatment(FoContext)
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java 2007-07-17 20:57:37 UTC (rev 10018)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java 2007-07-17 21:20:33 UTC (rev 10019)
@@ -108,7 +108,7 @@
public int crBpd() {
if (this.traitGeneratedBy() instanceof RegionBefore
|| this.traitGeneratedBy() instanceof RegionAfter) {
- return traitGeneratedBy().traitExtent();
+ return this.traitExtent();
}
return ancestorArea().brBpd();
}
@@ -119,7 +119,7 @@
public int crIpd() {
if (this.traitGeneratedBy() instanceof RegionStart
|| this.traitGeneratedBy() instanceof RegionEnd) {
- return traitGeneratedBy().traitExtent();
+ return this.traitExtent();
}
return ancestorArea().brIpd();
}
@@ -406,4 +406,26 @@
return 0;
}
+ /**
+ * Returns the extent trait for this area.
+ * @return The extent trait for this area.
+ */
+ public int traitExtent() {
+ /* TODO: We can do better than this. */
+ final Region generatedBy = traitGeneratedBy();
+ if (generatedBy instanceof RegionBefore) {
+ return ((RegionBefore) generatedBy).traitExtent();
+ }
+ if (generatedBy instanceof RegionAfter) {
+ return ((RegionAfter) generatedBy).traitExtent();
+ }
+ if (generatedBy instanceof RegionStart) {
+ return ((RegionStart) generatedBy).traitExtent();
+ }
+ if (generatedBy instanceof RegionEnd) {
+ return ((RegionEnd) generatedBy).traitExtent();
+ }
+ throw new IllegalStateException("Invalid Region type.");
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2007-07-17 20:57:37 UTC (rev 10018)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2007-07-17 21:20:33 UTC (rev 10019)
@@ -507,4 +507,12 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitExtent() {
+ /* TODO: Eliminate the need for this in the parent interface. */
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 20:57:37 UTC (rev 10018)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 21:20:33 UTC (rev 10019)
@@ -123,7 +123,10 @@
import org.axsl.fo.fo.prop.DestinationPlacementOffsetPa;
import org.axsl.fo.fo.prop.DirectionPa;
import org.axsl.fo.fo.prop.EmptyCellsPa;
+import org.axsl.fo.fo.prop.ExtentPa;
+import org.axsl.fo.fo.prop.ExternalDestinationPa;
import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
+import org.axsl.fo.fo.prop.InternalDestinationPa;
import org.axsl.fo.fo.prop.TableBorderPrecedencePa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -150,8 +153,10 @@
CommonRelativePositionPa, ActiveStatePa, AutoRestorePa,
BorderCollapsePa, BorderSeparationPa, CaptionSidePa, CaseNamePa,
CaseTitlePa, ColorProfileNamePa, ColumnCountPa, ColumnGapPa,
- DestinationPlacementOffsetPa, DirectionPa, EmptyCellsPa,
- HyphenationLadderCountPa, TableBorderPrecedencePa {
+ DestinationPlacementOffsetPa, DirectionPa, EmptyCellsPa, ExtentPa,
+ ExternalDestinationPa,
+ HyphenationLadderCountPa, InternalDestinationPa,
+ TableBorderPrecedencePa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-17 22:40:27
|
Revision: 10021
http://svn.sourceforge.net/foray/?rev=10021&view=rev
Author: victormote
Date: 2007-07-17 15:36:38 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-17 21:33:49 UTC (rev 10020)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-17 22:36:38 UTC (rev 10021)
@@ -32,7 +32,6 @@
import org.axsl.common.value.LeaderAlignment;
import org.axsl.common.value.LeaderPattern;
import org.axsl.common.value.RuleStyle;
-import org.axsl.fo.Fo;
import org.axsl.fo.FoText;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
@@ -42,6 +41,7 @@
import org.axsl.fo.fo.Leader;
import org.axsl.fo.fo.PageNumber;
import org.axsl.fo.fo.PageNumberCitation;
+import org.axsl.fo.fo.prop.LeaderPa;
import org.axsl.galley.RenderVisitor;
import java.util.ArrayList;
@@ -208,7 +208,7 @@
* of zero (including the PDFRenderer) can eventually remove that special
* handling. We'll refrain from doing so until we are sure there are no
* unintended side-effects of this override logic.
- * @see Fo#traitLeaderPattern
+ * @see LeaderPa#traitLeaderPattern
*/
public LeaderPattern traitLeaderPattern() {
/* */
@@ -222,7 +222,7 @@
/**
* Pass-thru of the FOTree trait value.
* @return The leader pattern width, in millipoints.
- * @see Fo#traitLeaderPatternWidth
+ * @see LeaderPa#traitLeaderPatternWidth
*/
public int traitLeaderPatternWidth() {
return traitGeneratedBy().traitLeaderPatternWidth(this);
@@ -231,7 +231,7 @@
/**
* Pass-thru of the FOTree trait value.
* @return The leader alignment.
- * @see Fo#traitLeaderAlignment
+ * @see LeaderPa#traitLeaderAlignment
*/
public LeaderAlignment traitLeaderAlignment() {
return traitGeneratedBy().traitLeaderAlignment(this);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 21:33:49 UTC (rev 10020)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 22:36:38 UTC (rev 10021)
@@ -128,8 +128,12 @@
import org.axsl.fo.fo.prop.FloatPa;
import org.axsl.fo.fo.prop.FlowNamePa;
import org.axsl.fo.fo.prop.GlyphOrientationPa;
+import org.axsl.fo.fo.prop.HyphenationKeepPa;
import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
+import org.axsl.fo.fo.prop.IndicateDestinationPa;
import org.axsl.fo.fo.prop.InternalDestinationPa;
+import org.axsl.fo.fo.prop.LastLineEndIndentPa;
+import org.axsl.fo.fo.prop.LeaderPa;
import org.axsl.fo.fo.prop.TableBorderPrecedencePa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -158,7 +162,8 @@
CaseTitlePa, ColorProfileNamePa, ColumnCountPa, ColumnGapPa,
DestinationPlacementOffsetPa, DirectionPa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
- HyphenationLadderCountPa, InternalDestinationPa,
+ HyphenationKeepPa, HyphenationLadderCountPa, IndicateDestinationPa,
+ InternalDestinationPa, LastLineEndIndentPa, LeaderPa,
TableBorderPrecedencePa {
/** A static empty and immutable list of children, suitable for return by
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-17 22:53:35
|
Revision: 10022
http://svn.sourceforge.net/foray/?rev=10022&view=rev
Author: victormote
Date: 2007-07-17 15:53:37 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/BlockArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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-07-17 22:36:38 UTC (rev 10021)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-17 22:53:37 UTC (rev 10022)
@@ -37,7 +37,6 @@
import org.axsl.common.value.AlignmentBaseline;
import org.axsl.common.value.Baseline;
import org.axsl.common.value.DisplayAlign;
-import org.axsl.common.value.LineStackingStrategy;
import org.axsl.common.value.LinkType;
import org.axsl.common.value.ReferenceOrientation;
import org.axsl.common.value.RelativeAxis;
@@ -1283,14 +1282,6 @@
}
/**
- * Returns the line-stacking-strategy trait for this Area.
- * @return The line-stacking-strategy trait.
- */
- public LineStackingStrategy traitLineStackingStrategy() {
- return this.traitGeneratedBy().traitLineStackingStrategy(this);
- }
-
- /**
* Returns the text-altitude trait for this Area.
* @return The text-altitude trait.
*/
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BlockArea.java 2007-07-17 22:36:38 UTC (rev 10021)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockArea.java 2007-07-17 22:53:37 UTC (rev 10022)
@@ -28,6 +28,9 @@
package org.foray.area;
+import org.axsl.common.value.LineStackingStrategy;
+import org.axsl.fo.fo.Block;
+
/**
* Superclass for normal block-areas (NormalBlockArea) and line-areas
* (LineArea).
@@ -71,4 +74,19 @@
return false;
}
+ /**
+ * Returns the line-stacking-strategy trait for this Area.
+ * @return The line-stacking-strategy trait.
+ */
+ public LineStackingStrategy traitLineStackingStrategy() {
+ return this.traitGeneratedBy().traitLineStackingStrategy(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Block traitGeneratedBy() {
+ return (Block) this.getLinkage().getFONode();
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2007-07-17 22:36:38 UTC (rev 10021)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2007-07-17 22:53:37 UTC (rev 10022)
@@ -288,13 +288,6 @@
/**
* {@inheritDoc}
*/
- public Block traitGeneratedBy() {
- return (Block) this.getLinkage().getFONode();
- }
-
- /**
- * {@inheritDoc}
- */
public TableRA makeTableArea(final Table table,
final GraftingPoint graftingPoint) {
final TableRA newTable = TableRA.makeTableRA(table, this,
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 22:36:38 UTC (rev 10021)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 22:53:37 UTC (rev 10022)
@@ -134,6 +134,9 @@
import org.axsl.fo.fo.prop.InternalDestinationPa;
import org.axsl.fo.fo.prop.LastLineEndIndentPa;
import org.axsl.fo.fo.prop.LeaderPa;
+import org.axsl.fo.fo.prop.LineHeightShiftAdjustmentPa;
+import org.axsl.fo.fo.prop.LineStackingStrategyPa;
+import org.axsl.fo.fo.prop.LinefeedTreatmentPa;
import org.axsl.fo.fo.prop.TableBorderPrecedencePa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -164,7 +167,8 @@
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
HyphenationKeepPa, HyphenationLadderCountPa, IndicateDestinationPa,
InternalDestinationPa, LastLineEndIndentPa, LeaderPa,
- TableBorderPrecedencePa {
+ LinefeedTreatmentPa, LineHeightShiftAdjustmentPa,
+ LineStackingStrategyPa, TableBorderPrecedencePa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|