foray-commit Mailing List for FOray (Page 253)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(139) |
Apr
(98) |
May
(250) |
Jun
(394) |
Jul
(84) |
Aug
(13) |
Sep
(420) |
Oct
(186) |
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(108) |
Feb
(202) |
Mar
(291) |
Apr
(247) |
May
(374) |
Jun
(227) |
Jul
(231) |
Aug
(60) |
Sep
(31) |
Oct
(45) |
Nov
(18) |
Dec
|
| 2008 |
Jan
(38) |
Feb
(71) |
Mar
(142) |
Apr
|
May
(59) |
Jun
(6) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(12) |
Feb
(4) |
Mar
(88) |
Apr
(121) |
May
(17) |
Jun
(30) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2010 |
Jan
(11) |
Feb
(76) |
Mar
(11) |
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
(44) |
Sep
(14) |
Oct
(7) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(168) |
| 2017 |
Jan
(77) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(88) |
Mar
(118) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(141) |
| 2021 |
Jan
(170) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(62) |
Nov
(189) |
Dec
(162) |
| 2022 |
Jan
(201) |
Feb
(118) |
Mar
(8) |
Apr
|
May
(2) |
Jun
(47) |
Jul
(19) |
Aug
(14) |
Sep
(3) |
Oct
|
Nov
(28) |
Dec
(235) |
| 2023 |
Jan
(112) |
Feb
(23) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(70) |
Sep
(92) |
Oct
(20) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(14) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(10) |
Feb
(29) |
Mar
|
Apr
(162) |
May
(245) |
Jun
(83) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <vic...@us...> - 2006-06-13 19:02:36
|
Revision: 7561 Author: victormote Date: 2006-06-13 12:02:28 -0700 (Tue, 13 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7561&view=rev Log Message: ----------- Add wrapper implementation for non-text items. Added Paths: ----------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineNonText.java Added: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineNonText.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineNonText.java (rev 0) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineNonText.java 2006-06-13 19:02:28 UTC (rev 7561) @@ -0,0 +1,101 @@ +/* + * Copyright 2006 The FOray Project. + * http://www.foray.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * This work is in part derived from the following work(s), used with the + * permission of the licensor: + * Apache FOP, licensed by the Apache Software Foundation + * + */ + +/* $Id$ */ + +package org.foray.fotree; + +import org.axsl.foR.FOContext; + +/** + * Wraps an underlying "real" FOLineNonText along with the context to be used by + * that item for trait resolution. + */ +public class FOLineNonText implements org.axsl.foR.FOLineNonText { + + private org.axsl.foR.FOLineNonText realLineNonText; + private FOContext context; + + public FOLineNonText(org.axsl.foR.FOLineNonText realLineNonText, + FOContext context) { + this.realLineNonText = realLineNonText; + this.context = context; + } + + /** + * {@inheritDoc} + */ + public int inlineSizeOptimum(int lineLength) { + return this.realLineNonText.inlineSizeOptimum(this.context, lineLength); + } + + /** + * {@inheritDoc} + */ + public int inlineSizeOptimum(FOContext context, int lineLength) { + return this.realLineNonText.inlineSizeOptimum(context, lineLength); + } + + /** + * {@inheritDoc} + */ + public int inlineSizeMinimum(int lineLength) { + return this.realLineNonText.inlineSizeMinimum(this.context, lineLength); + } + + /** + * {@inheritDoc} + */ + public int inlineSizeMinimum(FOContext context, int lineLength) { + return this.realLineNonText.inlineSizeMinimum(context, lineLength); + } + + /** + * {@inheritDoc} + */ + public int inlineSizeMaximum(int lineLength) { + return this.realLineNonText.inlineSizeMaximum(this.context, lineLength); + } + + /** + * {@inheritDoc} + */ + public int inlineSizeMaximum(FOContext context, int lineLength) { + return this.realLineNonText.inlineSizeMaximum(context, lineLength); + } + + /** + * {@inheritDoc} + */ + public boolean isLastItemInBlock() { + return realLineNonText.isLastItemInBlock(); + } + + /** + * {@inheritDoc} + */ + public org.axsl.foR.FOLineNonText getContextWrapper(FOContext context) { + /* This *is* the wrapper. */ + return this; + } + +} Property changes on: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineNonText.java ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 19:01:14
|
Revision: 7560 Author: victormote Date: 2006-06-13 11:47:30 -0700 (Tue, 13 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7560&view=rev Log Message: ----------- Add wrapper implementation of new axsl FOLineText interface, and make FOText conform to it as well, so that it can be wrapped. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java Added Paths: ----------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java Added: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java (rev 0) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java 2006-06-13 18:47:30 UTC (rev 7560) @@ -0,0 +1,270 @@ +/* + * Copyright 2006 The FOray Project. + * http://www.foray.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * This work is in part derived from the following work(s), used with the + * permission of the licensor: + * Apache FOP, licensed by the Apache Software Foundation + * + */ + +/* $Id$ */ + +package org.foray.fotree; + +import org.axsl.foR.FOContext; +import org.axsl.fontR.FontUse; +import org.axsl.text.line.LineText; + +/** + * Wraps an underlying "real" FOLineText along with the context to be used by + * that item for trait resolution. + */ +public class FOLineText implements org.axsl.foR.FOLineText { + + private org.axsl.foR.FOLineText realLineText; + private FOContext context; + + public FOLineText(org.axsl.foR.FOLineText realLineText, FOContext context) { + this.realLineText = realLineText; + this.context = context; + } + + /** + * {@inheritDoc} + */ + public char[] inlineText() { + return realLineText.inlineText(context); + } + + /** + * {@inheritDoc} + */ + public char[] inlineText(FOContext context) { + return realLineText.inlineText(context); + } + + /** + * {@inheritDoc} + */ + public FontUse inlinePrimaryFont() { + return realLineText.inlinePrimaryFont(context); + + } + + /** + * {@inheritDoc} + */ + public FontUse inlinePrimaryFont(FOContext context) { + return realLineText.inlinePrimaryFont(context); + } + + /** + * {@inheritDoc} + */ + public FontUse inlineSecondaryFont(char c) { + return realLineText.inlineSecondaryFont(context, c); + } + + /** + * {@inheritDoc} + */ + public FontUse inlineSecondaryFont(FOContext context, char c) { + return realLineText.inlineSecondaryFont(context, c); + } + + /** + * {@inheritDoc} + */ + public int inlineFontSize() { + return realLineText.inlineFontSize(context); + } + + /** + * {@inheritDoc} + */ + public int inlineFontSize(FOContext context) { + return realLineText.inlineFontSize(context); + } + + /** + * {@inheritDoc} + */ + public int inlineLetterSpacingOptimum() { + return realLineText.inlineLetterSpacingOptimum(context); + } + + /** + * {@inheritDoc} + */ + public int inlineLetterSpacingOptimum(FOContext context) { + return realLineText.inlineLetterSpacingOptimum(context); + } + + /** + * {@inheritDoc} + */ + public boolean inlineWrapOption() { + return realLineText.inlineWrapOption(context); + } + + /** + * {@inheritDoc} + */ + public boolean inlineWrapOption(FOContext context) { + return realLineText.inlineWrapOption(context); + } + + /** + * {@inheritDoc} + */ + public boolean inlineHyphenate() { + return realLineText.inlineHyphenate(context); + } + + /** + * {@inheritDoc} + */ + public boolean inlineHyphenate(FOContext context) { + return realLineText.inlineHyphenate(context); + } + + /** + * {@inheritDoc} + */ + public String inlineLanguage() { + return realLineText.inlineLanguage(context); + } + + /** + * {@inheritDoc} + */ + public String inlineLanguage(FOContext context) { + return realLineText.inlineLanguage(context); + } + + /** + * {@inheritDoc} + */ + public String inlineCountry() { + return realLineText.inlineCountry(context); + } + + /** + * {@inheritDoc} + */ + public String inlineCountry(FOContext context) { + return realLineText.inlineCountry(context); + } + + /** + * {@inheritDoc} + */ + public int inlineHyphenationRemainCount() { + return realLineText.inlineHyphenationRemainCount(context); + } + + /** + * {@inheritDoc} + */ + public int inlineHyphenationRemainCount(FOContext context) { + return realLineText.inlineHyphenationRemainCount(context); + } + + /** + * {@inheritDoc} + */ + public int inlineHyphenationPushCount() { + return realLineText.inlineHyphenationPushCount(context); + } + + /** + * {@inheritDoc} + */ + public int inlineHyphenationPushCount(FOContext context) { + return realLineText.inlineHyphenationPushCount(context); + } + + /** + * {@inheritDoc} + */ + public char inlineHyphenationCharacter() { + return realLineText.inlineHyphenationCharacter(context); + } + + /** + * {@inheritDoc} + */ + public char inlineHyphenationCharacter(FOContext context) { + return realLineText.inlineHyphenationCharacter(context); + } + /** + * {@inheritDoc} + */ + public boolean inlineIsFauxSmallCaps() { + return realLineText.inlineIsFauxSmallCaps(context); + } + + /** + * {@inheritDoc} + */ + public boolean inlineIsFauxSmallCaps(FOContext context) { + return realLineText.inlineIsFauxSmallCaps(context); + } + + /** + * {@inheritDoc} + */ + public int inlineFauxSmallCapsFontSize() { + return realLineText.inlineFauxSmallCapsFontSize(context); + } + + /** + * {@inheritDoc} + */ + public int inlineFauxSmallCapsFontSize(FOContext context) { + return realLineText.inlineFauxSmallCapsFontSize(context); + } + + /** + * {@inheritDoc} + */ + public LineText nextContiguousLineText() { + return realLineText.nextContiguousLineText(); + } + + /** + * {@inheritDoc} + */ + public LineText previousContiguousLineText() { + return realLineText.previousContiguousLineText(); + } + + /** + * {@inheritDoc} + */ + public boolean isLastItemInBlock() { + return realLineText.isLastItemInBlock(); + } + + /** + * {@inheritDoc} + */ + public org.axsl.foR.FOLineText getContextWrapper(FOContext context) { + /* This *is* the wrapper. */ + return this; + } + +} Property changes on: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-06-13 14:57:18 UTC (rev 7559) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-06-13 18:47:30 UTC (rev 7560) @@ -28,6 +28,7 @@ import org.axsl.common.Constants; import org.axsl.foR.FOContext; +import org.axsl.foR.FOLineText; import org.axsl.foR.FONodeProxy; import org.axsl.foR.ProxyFactory; import org.axsl.foR.fo.Block; @@ -41,7 +42,7 @@ * a text node in the formatting object tree * */ -public class FOText extends FONode implements LineText, org.axsl.foR.FOText { +public class FOText extends FONode implements FOLineText, org.axsl.foR.FOText { private static final int IS_WORD_CHAR_FALSE = 0; private static final int IS_WORD_CHAR_TRUE = 1; @@ -506,86 +507,121 @@ } public char[] inlineText() { - /* TODO: Handle context better. */ - FOContext context = null; + return this.inlineText(null); + } + + public char[] inlineText(FOContext context) { return getAreaTreeText(context); } public FontUse inlinePrimaryFont() { - /* TODO: Handle context better. */ - FOContext context = null; - return effectiveParent(null).getPrimaryFont(context); + return this.inlinePrimaryFont(null); } + public FontUse inlinePrimaryFont(FOContext context) { + FObj effectiveParent = effectiveParent(context); + return effectiveParent.getPrimaryFont(context); + } + public FontUse inlineSecondaryFont(char c) { - /* TODO: Handle context better. */ - FOContext context = null; - return effectiveParent(null).getSecondaryFont(context, c); + return this.inlineSecondaryFont(null, c); } + public FontUse inlineSecondaryFont(FOContext context, char c) { + FObj effectiveParent = effectiveParent(context); + return effectiveParent.getSecondaryFont(context, c); + } + public int inlineFontSize() { - /* TODO: Handle context better. */ - FOContext context = null; - return effectiveParent(null).traitFontSize(context); + return this.inlineFontSize(null); } + public int inlineFontSize(FOContext context) { + FObj effectiveParent = effectiveParent(context); + return effectiveParent.traitFontSize(context); + } + public int inlineLetterSpacingOptimum() { - /* TODO: Handle context better. */ - FOContext context = null; - return effectiveParent(null).traitLetterSpacingOpt(context); + return this.inlineLetterSpacingOptimum(null); } + public int inlineLetterSpacingOptimum(FOContext context) { + FObj effectiveParent = effectiveParent(context); + return effectiveParent.traitLetterSpacingOpt(context); + } + public boolean inlineWrapOption() { - /* TODO: Handle context better. */ - FOContext context = null; - return (effectiveParent(null).traitWrapOption(context) + return this.inlineWrapOption(null); + } + + public boolean inlineWrapOption(FOContext context) { + FObj effectiveParent = effectiveParent(context); + return (effectiveParent.traitWrapOption(context) == Constants.FOVAL_WRAP); } public boolean inlineHyphenate() { - /* TODO: Handle context better. */ - FOContext context = null; - return effectiveParent(null).traitHyphenate(context); + return this.inlineHyphenate(null); } + public boolean inlineHyphenate(FOContext context) { + FObj effectiveParent = effectiveParent(context); + return effectiveParent.traitHyphenate(context); + } + public String inlineLanguage() { - /* TODO: Handle context better. */ - FOContext context = null; - return effectiveParent(null).traitLanguage(context); + return this.inlineLanguage(null); } + public String inlineLanguage(FOContext context) { + FObj effectiveParent = effectiveParent(context); + return effectiveParent.traitLanguage(context); + } + public String inlineCountry() { - /* TODO: Handle context better. */ - FOContext context = null; - return effectiveParent(null).traitCountry(context); + return this.inlineCountry(null); } + public String inlineCountry(FOContext context) { + FObj effectiveParent = effectiveParent(context); + return effectiveParent.traitCountry(context); + } + public int inlineHyphenationRemainCount() { - /* TODO: Handle context better. */ - FOContext context = null; - return effectiveParent(null).traitHyphenationRemainCharacterCount( - context); + return this.inlineHyphenationRemainCount(null); } + public int inlineHyphenationRemainCount(FOContext context) { + FObj effectiveParent = effectiveParent(context); + return effectiveParent.traitHyphenationRemainCharacterCount(context); + } + public int inlineHyphenationPushCount() { - /* TODO: Handle context better. */ - FOContext context = null; - return effectiveParent(null).traitHyphenationPushCharacterCount( - context); + return this.inlineHyphenationPushCount(null); } + public int inlineHyphenationPushCount(FOContext context) { + FObj effectiveParent = effectiveParent(context); + return effectiveParent.traitHyphenationPushCharacterCount(context); + } + public char inlineHyphenationCharacter() { - /* TODO: Handle context better. */ - FOContext context = null; - return effectiveParent(null).traitHyphenationCharacter( - context); + return this.inlineHyphenationCharacter(null); } + public char inlineHyphenationCharacter(FOContext context) { + FObj effectiveParent = effectiveParent(context); + return effectiveParent.traitHyphenationCharacter(context); + } + public boolean inlineIsFauxSmallCaps() { - /* TODO: Handle context better. */ - FOContext context = null; - FObj parent = this.effectiveParent(context); - if (parent.traitFontVariant(context) != Constants.FOVAL_SMALL_CAPS) { + return this.inlineIsFauxSmallCaps(null); + } + + public boolean inlineIsFauxSmallCaps(FOContext context) { + FObj effectiveParent = effectiveParent(context); + if (effectiveParent.traitFontVariant(context) + != Constants.FOVAL_SMALL_CAPS) { return false; } /* @@ -599,11 +635,14 @@ } public int inlineFauxSmallCapsFontSize() { - /* TODO: Handle context better. */ - FOContext context = null; - return this.effectiveParent(null).getFauxSmallCapFontSize(context); + return this.inlineFauxSmallCapsFontSize(null); } + public int inlineFauxSmallCapsFontSize(FOContext context) { + FObj effectiveParent = effectiveParent(context); + return effectiveParent.getFauxSmallCapFontSize(context); + } + public LineText nextContiguousLineText() { return getNextContiguousTextInBlock(); } @@ -944,4 +983,12 @@ return factory.makeProxy(this); } + public org.axsl.foR.FOLineText getContextWrapper(FOContext context) { + org.axsl.foR.fo.Marker marker = this.ancestorMarker(); + if (marker == null) { + return this; + } + return new org.foray.fotree.FOLineText(this, context); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 14:57:23
|
Revision: 7559 Author: victormote Date: 2006-06-13 07:57:18 -0700 (Tue, 13 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7559&view=rev Log Message: ----------- Add performance-related to-do item. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-13 04:55:11 UTC (rev 7558) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-13 14:57:18 UTC (rev 7559) @@ -68,6 +68,11 @@ * So the net effect is that we have forced a {@link RetrieveMarker} into * the key that tracks this content.</p> */ + /* TODO: Since the typical case presumably has the marker being used with + * only one retrieve-marker, a HashMap is probably overkill. We should + * probably use parallel arrays of size 1 for this information, and just + * do the array copy if it is needed. Alternatively, use parallel ArrayLists + * with an initial value of 1. */ private HashMap map = new HashMap(); public FOLinkageMarker(FONode foGenerator) throws AreaWException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 04:55:17
|
Revision: 7558 Author: victormote Date: 2006-06-12 21:55:11 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7558&view=rev Log Message: ----------- Fix more marker/retrieve-marker bugs. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-13 04:36:31 UTC (rev 7557) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-13 04:55:11 UTC (rev 7558) @@ -68,7 +68,8 @@ getAreaNodeParent().getChildren().add(this); // Root can't do this because the AreaTreeControl isn't registered. this.generatedBy = linkage(generatedBy, retrieveMarker); - FOLinkageNormal normalLinkage = this.getNormalLinkage(); + FOLinkageNormal normalLinkage = this.getNormalLinkage( + retrieveMarker); normalLinkage.registerGeneratedArea(this); } } @@ -134,6 +135,21 @@ return null; } + /* Use this overloaded version when we haven't yet gottent the + * RetrieveMarker instance stashed in the FOLinkageMarker, especially + * during AreaNode construction. */ + public FOLinkageNormal getNormalLinkage(RetrieveMarker retrieveMarker) { + if (this.generatedBy instanceof FOLinkageNormal) { + return (FOLinkageNormal) this.generatedBy; + } + if (this.generatedBy instanceof FOLinkageMarker) { + FOLinkageMarker linkageMarker = (FOLinkageMarker) this.generatedBy; + return linkageMarker.getNormalLinkage(retrieveMarker); + } + /* TODO: Consider throwing an Exception. This shouldn't happen. */ + return null; + } + protected org.axsl.areaW.AreaNode getPreviousChildOfGeneratedBy() { return this.getNormalLinkage().getPreviousGeneratedBy(this); } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-13 04:36:31 UTC (rev 7557) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-13 04:55:11 UTC (rev 7558) @@ -101,7 +101,7 @@ FOLinkageNormal normalLinkage = (FOLinkageNormal) entrySet.getValue(); if (normalLinkage.contains(areaNode)) { - return (RetrieveMarker) entrySet.getValue(); + return (RetrieveMarker) entrySet.getKey(); } } return null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 04:36:38
|
Revision: 7557 Author: victormote Date: 2006-06-12 21:36:31 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7557&view=rev Log Message: ----------- Fix bug: FOLinkageMarker getting created, but not getting stored and used. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-13 04:22:31 UTC (rev 7556) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-13 04:36:31 UTC (rev 7557) @@ -110,6 +110,7 @@ try { FOLinkageMarker markerLinkage = new FOLinkageMarker(foNode); markerLinkage.getNormalLinkage(retrieveMarker); + linkage = markerLinkage; } catch (AreaWException e) { /* Ignore this. It should never happen as we have already tested * for the condition that causes the exception, i.e. that foNode This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 04:22:39
|
Revision: 7556 Author: victormote Date: 2006-06-12 21:22:31 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7556&view=rev Log Message: ----------- 1. Push RetrieveMarker instance through the line-breaking system. 2. Conform to axsl changes regarding the same. Modified Paths: -------------- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java Modified: trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java =================================================================== --- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2006-06-13 04:22:14 UTC (rev 7555) +++ trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2006-06-13 04:22:31 UTC (rev 7556) @@ -100,15 +100,17 @@ public void handleLineBreakText(LineOutput lineOutput, LineText text, int startOffset, int sizeInChars, int sizeInline, boolean hasDiscretionaryHyphen, boolean hasFauxSmallCaps, - boolean isLastItemOnLine) + boolean isLastItemOnLine, Object context) throws TextException { checkLayoutTarget(lineOutput, text); LineArea lineArea = (LineArea) lineOutput; if (text instanceof FOText) { FOText foText = (FOText) text; + RetrieveMarker retrieveMarker = (RetrieveMarker) context; lineArea.makeTextArea(foText, sizeInline, startOffset, sizeInChars, - hasDiscretionaryHyphen, hasFauxSmallCaps, isLastItemOnLine); + hasDiscretionaryHyphen, hasFauxSmallCaps, isLastItemOnLine, + retrieveMarker); } else { throw new TextException("Line-breaking text must be " + "FOText."); @@ -116,10 +118,11 @@ } public void handleLineBreakNonText(LineOutput lineOutput, - LineNonText nonText, int sizeInline) throws TextException { + LineNonText nonText, int sizeInline, Object context) + throws TextException { checkLayoutTarget(lineOutput, nonText); LineArea lineArea = (LineArea) lineOutput; - RetrieveMarker retrieveMarker = lineArea.getRetrieveMarker(); + RetrieveMarker retrieveMarker = (RetrieveMarker) context; if (nonText instanceof InstreamForeignObject) { InstreamForeignObject ifo = (InstreamForeignObject) nonText; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 04:22:26
|
Revision: 7555 Author: victormote Date: 2006-06-12 21:22:14 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7555&view=rev Log Message: ----------- 1. Push RetrieveMarker instance through the line-breaking system. 2. Conform to axsl changes regarding the same. Modified Paths: -------------- trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java Modified: trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java =================================================================== --- trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java 2006-06-13 04:21:50 UTC (rev 7554) +++ trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java 2006-06-13 04:22:14 UTC (rev 7555) @@ -52,21 +52,11 @@ super(server, control, handler, fontConsumer); } - protected int findLineBreaks() throws TextException { - int status = 0; - for (int i = 0; i < content.size(); i++) { - this.currentLineContent = (LineContent) content.get(i); - int end = content.size() - 1; - status = processInput(this.currentLineContent, status, end); - } - return status; - } - /** * @throws TextException */ - protected int processInput(LineContent lineContent, int start, int end) - throws TextException { + protected int processInput(LineContent lineContent, int start, int end, + Object context) throws TextException { int status = 0; if (lineContent instanceof LineText) { LineText lineText = (LineText) lineContent; @@ -90,7 +80,8 @@ } if (shouldSwitch) { // Process this chunk. - status = processLineText(lineText, subsetStart, i - 1); + status = processLineText(lineText, subsetStart, i - 1, + context); // If it can't process the whole chunk, we need to exit. if (status != i) { return status; @@ -99,11 +90,11 @@ } inLowerCase = isLowerCase(c); } - return processLineText(lineText, subsetStart, end); + return processLineText(lineText, subsetStart, end, context); } - status = processLineText(lineText, start, end); + status = processLineText(lineText, start, end, context); } else if (lineContent instanceof LineNonText) { - status = processLineNonText((LineNonText) lineContent); + status = processLineNonText((LineNonText) lineContent, context); } else { throw new TextException("Invalid LineContent."); } @@ -118,7 +109,7 @@ * if there is not enough room on the line for it. * @throws TextException */ - protected int processLineNonText(LineNonText nonTextItem) + protected int processLineNonText(LineNonText nonTextItem, Object context) throws TextException { int lineLength = getCurrentLine().capacityTotal(); int itemSize = nonTextItem.inlineSizeOptimum(lineLength); @@ -128,7 +119,7 @@ // There is nothing on the line. Therefore it won't fit any // better on the next line. Put it on this one. handler.handleLineBreakNonText(getCurrentLine(), nonTextItem, - itemSize); + itemSize, context); getLogger().error("Content too large for any line."); return 1; } @@ -136,12 +127,13 @@ return 0; } // It fits on the line. Add it. - handler.handleLineBreakNonText(getCurrentLine(), nonTextItem, itemSize); + handler.handleLineBreakNonText(getCurrentLine(), nonTextItem, itemSize, + context); return 1; } protected abstract int processLineText(LineText lineText, int start, - int end) throws TextException; + int end, Object context) throws TextException; protected int currentLineWidthRemaining() throws TextException { return getCurrentLine().capacityTotal() @@ -149,9 +141,9 @@ } public int addLineContent(LineContent content, int start, int end, - LineOutput output) throws TextException { + LineOutput output, Object context) throws TextException { this.currentOutput = output; - return processInput(content, start, end); + return processInput(content, start, end, context); } protected LineOutput getCurrentLine() { Modified: trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java =================================================================== --- trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2006-06-13 04:21:50 UTC (rev 7554) +++ trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2006-06-13 04:22:14 UTC (rev 7555) @@ -41,33 +41,6 @@ import java.util.ArrayList; -/** - * LineBreaker subclasses provide line-breaking logic to clients. - * <p>To use a LineBreaker, first get an instance from the appropriate - * LineBreakServer. This is usually done through the - * {@link TextServer#provideLineBreaker(LineBreakControl, LineBreakHandler, - * FontConsumer)} - * method, but could - * conceivably be accomplished directly from the - * {@link LineBreakServer#provideLineBreaker(LineBreakControl, LineBreakHandler, - * FontConsumer)} method.</p> - * - * <p>After obtaining an instance, recursively access the addLineContent, - * providing the instance with each item that should be included in the block - * of content to be broken into lines. After this is complete, run - * {@link #getResults()}, which performs the computations needed to - * determine the line breaks and returns the results.</p> - * - * <p>Note that LineBreaker subclasses are not expected to normalize or - * otherwise modify the text that is presented to them. For example, some - * typesetting systems have provisions to normalize linefeed characters a - * certain way, or to condense contiguous whitespace into one space. - * Although a LineBreaker subclass could perform these services, it is not - * part of the general contract. Also, LineBreaker subclasses do not provide - * any special treatment for the tab character. If tab characters are presented - * to it, it will treat them like any other character, which is likely not the - * intent of the author.</p> - */ public abstract class LineBreaker implements org.axsl.text.line.LineBreaker { /** The "parent" LineBreakServer. */ @@ -146,7 +119,7 @@ * send all of their input to the text-processing system before processing * actually starts. * ("Eager" clients should use {@link #processLineContent(LineContent, int, - * int, LineOutput)}.) + * int, LineOutput, Object)}.) * @param contentItem The LineContent implementation that should be laid * out. */ @@ -176,12 +149,12 @@ * successfully added to the line. */ public int processLineContent(LineContent contentItem, int start, int end, - LineOutput output) throws TextException { + LineOutput output, Object context) throws TextException { validateEagerContent(contentItem, output); content.add(contentItem); this.currentOutput = output; this.currentLineContent = contentItem; - return addLineContent(contentItem, start, end, output); + return addLineContent(contentItem, start, end, output, context); } /** @@ -205,20 +178,9 @@ } protected abstract int addLineContent(LineContent contentItem, int start, - int end, LineOutput output) throws TextException; + int end, LineOutput output, Object context) throws TextException; - public int getResults() throws TextException { - return findLineBreaks(); - } - /** - * The actual computation of the line-breaks. In this method, implementing - * classes should compute line contents and then send them to a - * {@link LineBreakHandler}. - */ - protected abstract int findLineBreaks() throws TextException; - - /** * {@inheritDoc} */ public int getCharWidth(LineText lineText, int codePoint) { Modified: trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java =================================================================== --- trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2006-06-13 04:21:50 UTC (rev 7554) +++ trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2006-06-13 04:22:14 UTC (rev 7555) @@ -102,8 +102,8 @@ super(server, control, handler, fontConsumer); } - protected int processLineText(LineText lineText, int start, int end) - throws TextException { + protected int processLineText(LineText lineText, int start, int end, + Object context) throws TextException { this.currentLineText = lineText; this.currentChars = currentLineText.inlineText(); String language = lineText.inlineLanguage(); @@ -141,7 +141,7 @@ charCount++; } if (forcesLineBreak(codePoint)) { - createLineContent(start, i, finalWidth, false); + createLineContent(start, i, finalWidth, false, context); return i + 1; } if (allowsLineBreak(codePoint)) { @@ -170,7 +170,8 @@ finalWidth += spaceWidth; finalWidth += wordWidth; finalWidth += getHyphenWidth(lineText); - createLineContent(start, ret - 1, finalWidth, true); + createLineContent(start, ret - 1, finalWidth, true, + context); return ret; } } @@ -180,26 +181,28 @@ finalWidth += spaceWidth; finalWidth += wordWidth; finalWidth -= charWidth; - createLineContent(start, i - charCount, finalWidth, false); + createLineContent(start, i - charCount, finalWidth, false, + context); /* Return the index at the start of this character*/ return i - charCount + 1; } // Break the line at the end of the previous word. - createLineContent(start, wordStart - 1, finalWidth, false); + createLineContent(start, wordStart - 1, finalWidth, false, + context); return wordStart; } /* We have now read through each character. */ /* If this ends with white space, place remaining contents on this * line. */ if (previousCharacter == CONNECTOR) { - return remainingContentOnThisLine(startIndex, endIndex); + return remainingContentOnThisLine(startIndex, endIndex, context); } /* Otherwise the word may continue into the next text. See if the * entire word fits. */ if (finalWidth + spaceWidth + wordWidth + sizeFirstWordNextText(lineText, startIndex, endIndex) <= currentLineWidthRemaining()) { - return remainingContentOnThisLine(startIndex, endIndex); + return remainingContentOnThisLine(startIndex, endIndex, context); } /* TODO: If the entire words doesn't fit, see if it can be @@ -207,7 +210,7 @@ /* If nothing else works, the content doesn't fit on this line. * Break the line at the end of the previous word. */ - createLineContent(start, wordStart - 1, finalWidth, false); + createLineContent(start, wordStart - 1, finalWidth, false, context); return wordStart; } @@ -218,11 +221,11 @@ * it is one past endIndex, indicating that all has been laid out. * @throws TextException */ - private int remainingContentOnThisLine(int startIndex, int endIndex) - throws TextException { + private int remainingContentOnThisLine(int startIndex, int endIndex, + Object context) throws TextException { finalWidth += spaceWidth; finalWidth += wordWidth; - createLineContent(startIndex, endIndex, finalWidth, false); + createLineContent(startIndex, endIndex, finalWidth, false, context); return endIndex + 1; } @@ -322,7 +325,7 @@ * @param sizeInline The size, in millipoints, of the content being created. */ private void createLineContent(int startIndex, int endIndex, int sizeInline, - boolean isHyphenated) throws TextException { + boolean isHyphenated, Object context) throws TextException { LineText lineText = (LineText) this.currentLineContent; boolean everythingWritten = endIndex >= lineText.inlineText().length; boolean isLastItemOnLine = true; @@ -335,7 +338,7 @@ } handler.handleLineBreakText(this.currentOutput, lineText, startIndex, endIndex - startIndex + 1, sizeInline, isHyphenated, - inLowerCase, isLastItemOnLine); + inLowerCase, isLastItemOnLine, context); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 04:22:07
|
Revision: 7554 Author: victormote Date: 2006-06-12 21:21:50 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7554&view=rev Log Message: ----------- 1. Push RetrieveMarker instance through the line-breaking system. 2. Conform to axsl changes regarding the same. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InstreamForeignObjectPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/LeaderPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberCitationPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java 2006-06-13 04:21:37 UTC (rev 7553) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java 2006-06-13 04:21:50 UTC (rev 7554) @@ -64,7 +64,7 @@ // Not enough room on the page for this. return Status.AREA_FULL_NONE; } - return layoutInlineContent(node, lineArea); + return layoutInlineContent(node, lineArea, retrieveMarker); } } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-06-13 04:21:37 UTC (rev 7553) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-06-13 04:21:50 UTC (rev 7554) @@ -154,7 +154,8 @@ * was <em>not</em> successfully added to the line. */ protected int addTextItemToLine(LineArea lineArea, LineText lineText, - int start, int end) throws AreaWException { + int start, int end, RetrieveMarker retrieveMarker) + throws AreaWException { LineBreaker lb = layout.getLineBreaker(); if (lb == null) { lb = lineArea.getTextServer().provideLineBreaker(null, layout, @@ -163,7 +164,7 @@ int status = 0; try { status = lb.processLineContent(lineText, start, end, - lineArea.asLineOutput()); + lineArea.asLineOutput(), retrieveMarker); } catch (TextException e) { FObj generatedBy = lineArea.traitGeneratedBy(); throw new AreaWException("Error in text layout:\n" @@ -180,7 +181,8 @@ * @return For non-text items, returns 1 for success or 0 if the item did * not fit onto the current line. */ - protected int addNonTextItemToLine(LineArea lineArea, LineNonText nonText) + protected int addNonTextItemToLine(LineArea lineArea, LineNonText nonText, + RetrieveMarker retrieveMarker) throws AreaWException { LineBreaker lb = layout.getLineBreaker(); if (lb == null) { @@ -190,7 +192,7 @@ int status = 0; try { status = lb.processLineContent(nonText, -1, -1, - lineArea.asLineOutput()); + lineArea.asLineOutput(), retrieveMarker); } catch (TextException e) { FObj generatedBy = lineArea.traitGeneratedBy(); throw new AreaWException("Error in non-text layout:\n" @@ -200,7 +202,8 @@ return status; } - protected int layoutInlineContent(FObj node, LineArea lineArea) + protected int layoutInlineContent(FObj node, LineArea lineArea, + RetrieveMarker retrieveMarker) throws AreaWException { if (! (node instanceof LineNonText)) { return -1000; @@ -210,7 +213,7 @@ if (lineArea == null) { return Status.AREA_FULL_SOME; } - if (addNonTextItemToLine(lineArea, nonText) == 1) { + if (addNonTextItemToLine(lineArea, nonText, retrieveMarker) == 1) { // It fit on the line. return Status.OK; } @@ -224,7 +227,7 @@ if (lineArea == null) { return Status.AREA_FULL_SOME; } - if (addNonTextItemToLine(lineArea, nonText) == 1) { + if (addNonTextItemToLine(lineArea, nonText, retrieveMarker) == 1) { return Status.OK; } getLogger().error(node.getName() + " does not fit on line:\n" Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-06-13 04:21:37 UTC (rev 7553) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-06-13 04:21:50 UTC (rev 7554) @@ -53,7 +53,8 @@ setProgress(0); } int progressAtStart = getProgress(); - int progressAtEnd = addText(node, area, progressAtStart); + int progressAtEnd = addText(node, area, progressAtStart, + retrieveMarker); setProgress(progressAtEnd); if (progressAtEnd == -1) { return Status.OK; @@ -70,15 +71,15 @@ * laid out. If the first six characters have been laid out (indices 0-5), * then 6 should be returned. */ - private int addText(LineText lineText, Area area, int start) - throws AreaWException { + private int addText(LineText lineText, Area area, int start, + RetrieveMarker retrieveMarker) throws AreaWException { int end = lineText.inlineText().length; LineArea la = this.activeLineArea(area); if (la == null) { return start; } NormalBlockArea ba = la.ancestorWritableNormalBlockArea(); - start = addTextItemToLine(la, lineText, start, end); + start = addTextItemToLine(la, lineText, start, end, retrieveMarker); while (start != -1) { BlockPL blockPL = this.layout.getBlockPL(ba); blockPL.getCurrentLineArea(ba).verticalAlign(); @@ -88,7 +89,7 @@ if (la == null) { return start; } - start = addTextItemToLine(la, lineText, start, end); + start = addTextItemToLine(la, lineText, start, end, retrieveMarker); } return -1; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InstreamForeignObjectPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InstreamForeignObjectPL.java 2006-06-13 04:21:37 UTC (rev 7553) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InstreamForeignObjectPL.java 2006-06-13 04:21:50 UTC (rev 7554) @@ -53,7 +53,7 @@ // Not enough room on the page for this. return Status.AREA_FULL_NONE; } - return layoutInlineContent(node, lineArea); + return layoutInlineContent(node, lineArea, retrieveMarker); } } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/LeaderPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/LeaderPL.java 2006-06-13 04:21:37 UTC (rev 7553) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/LeaderPL.java 2006-06-13 04:21:50 UTC (rev 7554) @@ -52,7 +52,7 @@ // Not enough room on the page for this. return Status.AREA_FULL_NONE; } - return layoutInlineContent(node, lineArea); + return layoutInlineContent(node, lineArea, retrieveMarker); } } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberCitationPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberCitationPL.java 2006-06-13 04:21:37 UTC (rev 7553) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberCitationPL.java 2006-06-13 04:21:50 UTC (rev 7554) @@ -52,7 +52,7 @@ // Not enough room on the page for this. return Status.AREA_FULL_NONE; } - return layoutInlineContent(node, lineArea); + return layoutInlineContent(node, lineArea, retrieveMarker); } } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberPL.java 2006-06-13 04:21:37 UTC (rev 7553) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberPL.java 2006-06-13 04:21:50 UTC (rev 7554) @@ -52,7 +52,7 @@ // Not enough room on the page for this. return Status.AREA_FULL_NONE; } - return layoutInlineContent(node, lineArea); + return layoutInlineContent(node, lineArea, retrieveMarker); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 04:21:44
|
Revision: 7553 Author: victormote Date: 2006-06-12 21:21:37 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7553&view=rev Log Message: ----------- 1. Push RetrieveMarker instance through the line-breaking system. 2. Conform to axsl changes regarding the same. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2006-06-13 03:19:56 UTC (rev 7552) +++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2006-06-13 04:21:37 UTC (rev 7553) @@ -86,10 +86,11 @@ */ public org.axsl.areaW.TextArea makeTextArea(FOText foText, int ipd, int startOffset, int sizeInChars, boolean hasDiscretionaryHyphen, - boolean hasFauxSmallCaps, boolean isLastItemOnLine) { + boolean hasFauxSmallCaps, boolean isLastItemOnLine, + RetrieveMarker retrieveMarker) { return LineArea.makeTextArea(foText, this, ipd, startOffset, sizeInChars, hasDiscretionaryHyphen, hasFauxSmallCaps, - isLastItemOnLine, this); + isLastItemOnLine, this, retrieveMarker); } public void render(RenderVisitor visitor) { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2006-06-13 03:19:56 UTC (rev 7552) +++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2006-06-13 04:21:37 UTC (rev 7553) @@ -283,10 +283,11 @@ */ public org.axsl.areaW.TextArea makeTextArea(FOText foText, int ipd, int startOffset, int sizeInChars, boolean hasDiscretionaryHyphen, - boolean hasFauxSmallCaps, boolean isLastItemOnLine) { + boolean hasFauxSmallCaps, boolean isLastItemOnLine, + RetrieveMarker retrieveMarker) { return LineArea.makeTextArea(foText, this, ipd, startOffset, sizeInChars, hasDiscretionaryHyphen, hasFauxSmallCaps, - isLastItemOnLine, this); + isLastItemOnLine, this, retrieveMarker); } public void render(RenderVisitor visitor) { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-06-13 03:19:56 UTC (rev 7552) +++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-06-13 04:21:37 UTC (rev 7553) @@ -812,7 +812,7 @@ Area parentArea, int ipd, int startOffset, int sizeInChars, boolean hasDiscretionaryHyphen, boolean hasFauxSmallCaps, boolean isLastItemOnLine, - FOContext context) { + FOContext context, RetrieveMarker retrieveMarker) { /* If the raw text is empty, don't create the TextArea. */ if (sizeInChars < 1) { @@ -833,7 +833,6 @@ } /* Go ahead and create*/ - RetrieveMarker retrieveMarker = parentArea.getRetrieveMarker(); return new TextArea(foText, parentArea, retrieveMarker, startOffset, sizeInChars, ipd, hasDiscretionaryHyphen, hasFauxSmallCaps); } @@ -871,10 +870,11 @@ */ public org.axsl.areaW.TextArea makeTextArea(FOText foText, int ipd, int startOffset, int sizeInChars, boolean hasDiscretionaryHyphen, - boolean hasFauxSmallCaps, boolean isLastItemOnLine) { + boolean hasFauxSmallCaps, boolean isLastItemOnLine, + RetrieveMarker retrieveMarker) { return LineArea.makeTextArea(foText, this, ipd, startOffset, sizeInChars, hasDiscretionaryHyphen, hasFauxSmallCaps, - isLastItemOnLine, this); + isLastItemOnLine, this, retrieveMarker); } public LineOutput asLineOutput() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 03:20:01
|
Revision: 7552 Author: victormote Date: 2006-06-12 20:19:56 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7552&view=rev Log Message: ----------- Fixes to marker/retrieve-marker logic. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-13 03:19:48 UTC (rev 7551) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-13 03:19:56 UTC (rev 7552) @@ -461,7 +461,6 @@ } public RetrieveMarker getRetrieveMarker() { - /* TODO: Remove the Marker from the parameters here, as unnecessary. */ return this.generatedBy.getRetrieveMarker(this); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 03:19:53
|
Revision: 7551 Author: victormote Date: 2006-06-12 20:19:48 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7551&view=rev Log Message: ----------- Fixes to marker/retrieve-marker logic. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2006-06-13 00:23:54 UTC (rev 7550) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2006-06-13 03:19:48 UTC (rev 7551) @@ -55,29 +55,41 @@ * @return This node's effective parent. */ public FObj effectiveParent(FOContext context) { + /* If either this or its parent is a Marker, we want to return that + * Marker's surrogate RetrieveMarker's parent. */ + if (this instanceof Marker) { + return effectiveMarkerParent(context); + } TreeNode parent = this.getParent(); if (parent instanceof Marker) { - if (context == null) { - /* TODO: Consider throwing an Exception. This should NOT - * happen. */ - return realParent(); - } - RetrieveMarker retrieve = context.getRetrieveMarker(); - if (retrieve == null) { - /* TODO: Consider throwing an Exception. This should NOT - * happen. */ - return realParent(); - } - if (retrieve instanceof org.foray.fotree.fo.obj.RetrieveMarker) { - return (org.foray.fotree.fo.obj.RetrieveMarker) retrieve; - } else { - /* Hopefully this never happens. */ - return realParent(); - } + return effectiveMarkerParent(context); } return realParent(); } + private FObj effectiveMarkerParent(FOContext context) { + if (context == null) { + /* TODO: Consider throwing an Exception. This should NOT + * happen. */ + return realParent(); + } + RetrieveMarker retrieve = context.getRetrieveMarker(); + if (retrieve == null) { + /* TODO: Consider throwing an Exception. This should NOT + * happen. */ + return realParent(); + } + org.foray.fotree.fo.obj.RetrieveMarker forayRetrieve = null; + if (retrieve instanceof org.foray.fotree.fo.obj.RetrieveMarker) { + forayRetrieve = (org.foray.fotree.fo.obj.RetrieveMarker) retrieve; + } else { + /* Hopefully this never happens. */ + return realParent(); + } + /* We don't want to return the RetrieveMarker, but rather its parent. */ + return forayRetrieve.realParent(); + } + /** * Return this node's real parent, cast as an FObj. * @return This node's real parent. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 00:24:01
|
Revision: 7550 Author: victormote Date: 2006-06-12 17:23:54 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7550&view=rev Log Message: ----------- Fix to the factory method for FOLinkage items. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-13 00:13:20 UTC (rev 7549) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-13 00:23:54 UTC (rev 7550) @@ -32,7 +32,6 @@ import org.axsl.foR.FOContext; import org.axsl.foR.FONode; import org.axsl.foR.FObj; -import org.axsl.foR.fo.Marker; import org.axsl.foR.fo.RetrieveMarker; import org.axsl.fontR.FontConsumer; import org.axsl.text.TextServer; @@ -68,7 +67,7 @@ // AreaTree has no parent with which to register getAreaNodeParent().getChildren().add(this); // Root can't do this because the AreaTreeControl isn't registered. - this.generatedBy = linkage(generatedBy); + this.generatedBy = linkage(generatedBy, retrieveMarker); FOLinkageNormal normalLinkage = this.getNormalLinkage(); normalLinkage.registerGeneratedArea(this); } @@ -96,7 +95,8 @@ this.children.remove(areaNode); } - public static FOLinkage linkage(FONode foNode) { + public static FOLinkage linkage(FONode foNode, + RetrieveMarker retrieveMarker) { if (foNode == null) { return null; } @@ -104,12 +104,12 @@ if (linkage != null) { return linkage; } - Marker marker = foNode.ancestorMarker(); - if (marker == null) { + if (retrieveMarker == null) { linkage = new FOLinkageNormal(foNode); } else { try { - linkage = new FOLinkageMarker(foNode); + FOLinkageMarker markerLinkage = new FOLinkageMarker(foNode); + markerLinkage.getNormalLinkage(retrieveMarker); } catch (AreaWException e) { /* Ignore this. It should never happen as we have already tested * for the condition that causes the exception, i.e. that foNode Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-13 00:13:20 UTC (rev 7549) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-13 00:23:54 UTC (rev 7550) @@ -80,7 +80,7 @@ * These registration steps must take place after the AreaTreeControl * has been stored. */ - this.generatedBy = linkage(root); + this.generatedBy = linkage(root, null); this.getNormalLinkage().registerGeneratedArea(this); } @@ -178,7 +178,7 @@ */ public Area firstNormalAreaReturned(String id) { FObj fobj = retrieveId(id); - FOLinkage linkage = linkage(fobj); + FOLinkage linkage = linkage(fobj, null); if (linkage instanceof FOLinkageNormal) { FOLinkageNormal normalLinkage = (FOLinkageNormal) linkage; return normalLinkage.firstNormalAreaReturned(); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-06-13 00:13:20 UTC (rev 7549) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-06-13 00:23:54 UTC (rev 7550) @@ -332,7 +332,7 @@ public org.axsl.areaW.SpanRA startingReferenceArea(FObj lastFObj, FObj nextFObj) throws AreaWException { if (lastFObj != null) { - FOLinkage linkage = linkage(lastFObj); + FOLinkage linkage = linkage(lastFObj, null); FOLinkageNormal normalLinkage = null; if (linkage instanceof FOLinkageNormal) { normalLinkage = (FOLinkageNormal) linkage; Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-13 00:13:20 UTC (rev 7549) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-13 00:23:54 UTC (rev 7550) @@ -565,7 +565,7 @@ private FOLinkageNormal markerParentLinkage(Marker marker) { FObj parent = marker.parentFO(); - FOLinkage proxy = linkage(parent); + FOLinkage proxy = linkage(parent, null); if (proxy instanceof FOLinkageNormal) { return (FOLinkageNormal) proxy; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 00:13:24
|
Revision: 7549 Author: victormote Date: 2006-06-12 17:13:20 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7549&view=rev Log Message: ----------- 1. Change AreaNode constructors to take a RetrieveMarker as a parameter. 2. Conform to axsl changes regarding the same in factory methods. Modified Paths: -------------- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java Modified: trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java =================================================================== --- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2006-06-13 00:13:05 UTC (rev 7548) +++ trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2006-06-13 00:13:20 UTC (rev 7549) @@ -39,6 +39,7 @@ import org.axsl.foR.fo.PageNumberCitation; import org.axsl.foR.fo.PageSequence; import org.axsl.foR.fo.Region; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.SimplePageMaster; import org.axsl.layout.Layout; import org.axsl.text.TextException; @@ -118,22 +119,25 @@ LineNonText nonText, int sizeInline) throws TextException { checkLayoutTarget(lineOutput, nonText); LineArea lineArea = (LineArea) lineOutput; + RetrieveMarker retrieveMarker = lineArea.getRetrieveMarker(); if (nonText instanceof InstreamForeignObject) { InstreamForeignObject ifo = (InstreamForeignObject) nonText; - lineArea.makeForeignObjectArea(ifo, sizeInline); + lineArea.makeForeignObjectArea(ifo, sizeInline, retrieveMarker); } else if (nonText instanceof ExternalGraphic) { ExternalGraphic graphic = (ExternalGraphic) nonText; - lineArea.makeExternalGraphicArea(graphic, sizeInline); + lineArea.makeExternalGraphicArea(graphic, sizeInline, + retrieveMarker); } else if (nonText instanceof Leader) { Leader leader = (Leader) nonText; - lineArea.makeLeaderArea(leader, sizeInline); + lineArea.makeLeaderArea(leader, sizeInline, retrieveMarker); } else if (nonText instanceof PageNumberCitation) { PageNumberCitation citation = (PageNumberCitation) nonText; - lineArea.makePageNumberCitationArea(citation, sizeInline); + lineArea.makePageNumberCitationArea(citation, sizeInline, + retrieveMarker); } else if (nonText instanceof PageNumber) { PageNumber pageNumber = (PageNumber) nonText; - lineArea.makePageNumberArea(pageNumber, sizeInline); + lineArea.makePageNumberArea(pageNumber, sizeInline, retrieveMarker); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 00:13:17
|
Revision: 7548 Author: victormote Date: 2006-06-12 17:13:05 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7548&view=rev Log Message: ----------- 1. Change AreaNode constructors to take a RetrieveMarker as a parameter. 2. Conform to axsl changes regarding the same in factory methods. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-06-13 00:12:23 UTC (rev 7547) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-06-13 00:13:05 UTC (rev 7548) @@ -154,13 +154,13 @@ ContainerRA areaContainer = null; if (node instanceof TableBody) { areaContainer = tableArea.makeTableBodyContainer( - (TableBody) node); + (TableBody) node, retrieveMarker); } else if (node instanceof TableHeader) { areaContainer = tableArea.makeTableHeaderContainer( - (TableHeader) node); + (TableHeader) node, retrieveMarker); } else if (node instanceof TableFooter) { areaContainer = tableArea.makeTableFooterContainer( - (TableFooter) node); + (TableFooter) node, retrieveMarker); } areaContainerRef = new WeakReference(areaContainer); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java 2006-06-13 00:12:23 UTC (rev 7547) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java 2006-06-13 00:13:05 UTC (rev 7548) @@ -51,7 +51,8 @@ setProgress(0); } - BlockContainerRA blockContainer = area.makeBlockContainerArea(node); + BlockContainerRA blockContainer = area.makeBlockContainerArea(node, + retrieveMarker); for (int i = this.getProgress(); i < node.getChildCount(); i++) { FONode fo = node.getFONodeChildAt(i); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-06-13 00:12:23 UTC (rev 7547) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-06-13 00:13:05 UTC (rev 7548) @@ -100,7 +100,7 @@ setProgress(0); } - blockArea = area.makeNormalBlockArea(node); + blockArea = area.makeNormalBlockArea(node, retrieveMarker); for (int i = getProgress(); i < node.getChildCount(); i++) { FONode fo = node.getFONodeChildAt(i); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java 2006-06-13 00:12:23 UTC (rev 7547) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java 2006-06-13 00:13:05 UTC (rev 7548) @@ -57,7 +57,7 @@ } } - ListBlockArea blockArea = area.makeListBlockArea(node); + ListBlockArea blockArea = area.makeListBlockArea(node, retrieveMarker); int numChildren = node.childrenFO().size(); for (int i = listBlockPL.getProgress(); i < numChildren; i++) { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java 2006-06-13 00:12:23 UTC (rev 7547) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java 2006-06-13 00:13:05 UTC (rev 7548) @@ -66,7 +66,8 @@ layout.completeCurrentLineInBlock(area); - ListItemArea group = listBlockArea.makeListItemArea(node); + ListItemArea group = listBlockArea.makeListItemArea(node, + retrieveMarker); /* Now lay out the list-item-label inside the new block-area. */ ListItemLabel label = (ListItemLabel)node.childrenFO().get(0); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2006-06-13 00:12:23 UTC (rev 7547) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2006-06-13 00:13:05 UTC (rev 7548) @@ -124,7 +124,8 @@ } TableRowContainer tableRow = (TableRowContainer) area; - TableCellArea cellArea = tableRow.makeTableCellArea(node); + TableCellArea cellArea = tableRow.makeTableCellArea(node, + retrieveMarker); areaContainer = cellArea; Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-06-13 00:12:23 UTC (rev 7547) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-06-13 00:13:05 UTC (rev 7548) @@ -86,7 +86,7 @@ } // Hack alert! - TableArea areaContainer = area.makeTableArea(node); + TableArea areaContainer = area.makeTableArea(node, retrieveMarker); boolean addedHeader = false; boolean addedFooter = false; Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java 2006-06-13 00:12:23 UTC (rev 7547) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java 2006-06-13 00:13:05 UTC (rev 7548) @@ -148,7 +148,8 @@ } AbstractTableContainer container = (AbstractTableContainer) area; - TableRowContainer areaContainer = container.makeTableRowContainer(node); + TableRowContainer areaContainer = container.makeTableRowContainer(node, + retrieveMarker); /* Set a reasonable starting BPD for this row. */ this.largestCellHeight = node.traitBPDimensionMin(area, area.crBPD()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-13 00:12:58
|
Revision: 7547 Author: victormote Date: 2006-06-12 17:12:23 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7547&view=rev Log Message: ----------- 1. Change AreaNode constructors to take a RetrieveMarker as a parameter. 2. Conform to axsl changes regarding the same in factory methods. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java trunk/foray/foray-areatree/src/java/org/foray/area/AbstractNormalBlockArea.java trunk/foray/foray-areatree/src/java/org/foray/area/AbstractPlaceholder.java trunk/foray/foray-areatree/src/java/org/foray/area/AbstractTableContainer.java trunk/foray/foray-areatree/src/java/org/foray/area/Area.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaFixed.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/BasicLinkArea.java trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java trunk/foray/foray-areatree/src/java/org/foray/area/BlockArea.java trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java trunk/foray/foray-areatree/src/java/org/foray/area/ContainerRA.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/GenericContainer.java trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.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/MarkerContentArea.java trunk/foray/foray-areatree/src/java/org/foray/area/NonArea.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/SVGArea.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-areatree/src/java/org/foray/area/TextArea.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -38,10 +38,6 @@ public abstract class AbstractInlineArea extends AreaFlexible implements GeneralInlineArea { - public AbstractInlineArea(FONode generatedBy, Area parentArea) { - super(generatedBy, parentArea); - } - public AbstractInlineArea(FONode generatedBy, Area parentArea, RetrieveMarker retrieveMarker) { super(generatedBy, parentArea, retrieveMarker); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AbstractNormalBlockArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractNormalBlockArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractNormalBlockArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; /** * Abstract superclass for all of the areas that are normal-block areas, @@ -35,8 +36,9 @@ implements org.axsl.areaR.AbstractNormalBlockArea, org.axsl.areaW.AbstractNormalBlockArea { - public AbstractNormalBlockArea(FObj parentFObj, Area parentArea) { - super(parentFObj, parentArea); + public AbstractNormalBlockArea(FObj parentFObj, Area parentArea, + RetrieveMarker retrieveMarker) { + super(parentFObj, parentArea, retrieveMarker); } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AbstractPlaceholder.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractPlaceholder.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractPlaceholder.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -26,6 +26,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; /** * Marks a place in the AreaTree, but does not have any area itself. @@ -33,8 +34,9 @@ */ public abstract class AbstractPlaceholder extends Area { - public AbstractPlaceholder(FObj generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public AbstractPlaceholder(FObj generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AbstractTableContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractTableContainer.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractTableContainer.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -26,17 +26,20 @@ import org.axsl.areaW.TableRowContainer; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.TableRow; public abstract class AbstractTableContainer extends GenericContainer implements org.axsl.areaW.AbstractTableContainer { - public AbstractTableContainer(FObj generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public AbstractTableContainer(FObj generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } - public TableRowContainer makeTableRowContainer(TableRow node) { - return new org.foray.area.TableRowContainer(node, this); + public TableRowContainer makeTableRowContainer(TableRow node, + RetrieveMarker retrieveMarker) { + return new org.foray.area.TableRowContainer(node, this, retrieveMarker); } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -55,10 +55,6 @@ * @param generatedBy * @param parentArea */ - public Area(FONode generatedBy, AreaNode parentArea) { - super(generatedBy, parentArea); - } - public Area(FONode generatedBy, AreaNode parentArea, RetrieveMarker retrieveMarker) { super(generatedBy, parentArea, retrieveMarker); @@ -1168,22 +1164,27 @@ return true; } - public TableArea makeTableArea(Table table) { - return new org.foray.area.TableRA(table, this); + public TableArea makeTableArea(Table table, + RetrieveMarker retrieveMarker) { + return new org.foray.area.TableRA(table, this, retrieveMarker); } - public NormalBlockArea makeNormalBlockArea(Block block) { - return new org.foray.area.NormalBlockArea(block, this); + public NormalBlockArea makeNormalBlockArea(Block block, + RetrieveMarker retrieveMarker) { + return new org.foray.area.NormalBlockArea(block, this, retrieveMarker); } public BlockContainerRA makeBlockContainerArea( - BlockContainer blockContainer) { - return new org.foray.area.BlockContainerRA(blockContainer, this); + BlockContainer blockContainer, RetrieveMarker retrieveMarker) { + return new org.foray.area.BlockContainerRA(blockContainer, this, + retrieveMarker); } - public ListBlockArea makeListBlockArea(ListBlock listBlock) { - return new org.foray.area.ListBlockArea(listBlock, this); + public ListBlockArea makeListBlockArea(ListBlock listBlock, + RetrieveMarker retrieveMarker) { + return new org.foray.area.ListBlockArea(listBlock, this, + retrieveMarker); } public int traitTop() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaFixed.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaFixed.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaFixed.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; import java.util.List; @@ -37,8 +38,9 @@ */ public abstract class AreaFixed extends Area { - public AreaFixed(FObj generatedBy, AreaNode parentArea) { - super(generatedBy, parentArea); + public AreaFixed(FObj generatedBy, AreaNode parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -52,10 +52,6 @@ */ private int anteriorSpace; - public AreaFlexible(FONode generatedBy, AreaNode parentArea) { - this(generatedBy, parentArea, null); - } - public AreaFlexible(FONode generatedBy, AreaNode parentArea, RetrieveMarker retrieveMarker) { super(generatedBy, parentArea, retrieveMarker); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -59,11 +59,8 @@ * @param generatedBy The FObj instance that generated this Area. * @param parentArea The Area instance that is the newly-constructed Area's * parent in the AreaTree. + * @param retrieveMarker TODO */ - public AreaNode(FONode generatedBy, AreaNode parentArea) { - this(generatedBy, parentArea, null); - } - public AreaNode(FONode generatedBy, AreaNode parentArea, RetrieveMarker retrieveMarker) { super(parentArea); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BasicLinkArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/BasicLinkArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BasicLinkArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -26,6 +26,7 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.foR.fo.BasicLink; +import org.axsl.foR.fo.RetrieveMarker; /** * Areas generated by the fo:basic-link object. @@ -34,8 +35,9 @@ implements org.axsl.areaR.BasicLinkArea, org.axsl.areaW.BasicLinkArea { - public BasicLinkArea(BasicLink generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public BasicLinkArea(BasicLink generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } public int crIPD() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -37,7 +37,7 @@ org.axsl.areaW.BeforeFloatRA { public BeforeFloatRA(FObj generatedBy, RegionRABody parentArea) { - super(generatedBy, parentArea); + super(generatedBy, parentArea, null); } public int crBPD() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/BlockArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; /** * Superclass for normal block-areas (NormalBlockArea) and line-areas @@ -32,8 +33,9 @@ */ public abstract class BlockArea extends AreaFlexible { - public BlockArea(FObj parentFObj, Area parentArea) { - super(parentFObj, parentArea); + public BlockArea(FObj parentFObj, Area parentArea, + RetrieveMarker retrieveMarker) { + super(parentFObj, parentArea, retrieveMarker); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -28,6 +28,7 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.common.Constants; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; /** * The container area for the contents of a block-container FO. @@ -35,8 +36,9 @@ public class BlockContainerRA extends ContainerRA implements BlockContainerArea, org.axsl.areaW.BlockContainerRA { - public BlockContainerRA(FObj generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public BlockContainerRA(FObj generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } public boolean isAbsolutelyPositioned() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ContainerRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/ContainerRA.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/ContainerRA.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -26,6 +26,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; /** * Abstract superclass for areas that are primarily for collection and @@ -36,8 +37,9 @@ public abstract class ContainerRA extends AreaFlexible implements org.axsl.areaW.ContainerRA { - public ContainerRA(FObj generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public ContainerRA(FObj generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } public Area getOverflowArea(Area childRequesting) throws AreaWException { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -26,6 +26,7 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.foR.fo.ExternalGraphic; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.graphicR.Graphic; @@ -34,8 +35,8 @@ org.axsl.areaW.ExternalGraphicArea { public ExternalGraphicArea(ExternalGraphic generatedBy, Area parentArea, - int width) { - super(generatedBy, parentArea); + RetrieveMarker retrieveMarker, int width) { + super(generatedBy, parentArea, retrieveMarker); setProgressionDimension(width); // Adjust the bpd of the parent line-area. parentArea.setMinimumProgressionDimension(viewportBPD()); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -35,7 +35,7 @@ implements org.axsl.areaR.FootnoteArea, org.axsl.areaW.FootnoteRA { public FootnoteRA(FObj generatedBy, RegionRABody parentArea) { - super(generatedBy, parentArea); + super(generatedBy, parentArea, null); } public int crBPD() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -27,6 +27,7 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.foR.ForeignXML; import org.axsl.foR.fo.InstreamForeignObject; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.svg.SVGElement; public class ForeignObjectArea extends AbstractInlineArea @@ -34,8 +35,8 @@ org.axsl.areaW.ForeignObjectArea { public ForeignObjectArea(InstreamForeignObject generatedBy, - Area parentArea, int width) { - super(generatedBy, parentArea); + Area parentArea, RetrieveMarker retrieveMarker, int width) { + super(generatedBy, parentArea, retrieveMarker); setProgressionDimension(width); // Adjust the bpd of the parent line-area. parentArea.setMinimumProgressionDimension(viewportBPD()); @@ -43,7 +44,7 @@ // Create the reference area for the content. ForeignXML foreign = generatedBy.getForeignXML(); if (foreign instanceof SVGElement) { - new SVGArea((SVGElement) foreign, this); + new SVGArea((SVGElement) foreign, this, retrieveMarker); } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/GenericContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/GenericContainer.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/GenericContainer.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; public abstract class GenericContainer extends ContainerRA implements org.axsl.areaW.GenericContainer { @@ -32,8 +33,9 @@ int xPosition = 0; int yPosition = 0; - public GenericContainer(FObj generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public GenericContainer(FObj generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } public void setXPosition(int xPosition) { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -32,6 +32,7 @@ import org.axsl.foR.fo.Leader; import org.axsl.foR.fo.PageNumber; import org.axsl.foR.fo.PageNumberCitation; +import org.axsl.foR.fo.RetrieveMarker; /** * Areas generated by the fo:inline object. @@ -40,8 +41,9 @@ implements org.axsl.areaR.InlineArea, org.axsl.areaW.InlineArea { - public InlineArea(Inline generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public InlineArea(Inline generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } /** @@ -52,28 +54,31 @@ } public org.axsl.areaW.ForeignObjectArea makeForeignObjectArea( - InstreamForeignObject ifo, int ipd) { - return LineArea.makeForeignObjectArea(ifo, this, ipd); + InstreamForeignObject ifo, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makeForeignObjectArea(ifo, this, ipd, retrieveMarker); } public org.axsl.areaW.ExternalGraphicArea makeExternalGraphicArea( - ExternalGraphic ifo, int ipd) { - return LineArea.makeExternalGraphicArea(ifo, this, ipd); + ExternalGraphic ifo, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makeExternalGraphicArea(ifo, this, ipd, retrieveMarker); } public org.axsl.areaW.LeaderArea makeLeaderArea( - Leader leader, int ipd) { - return LineArea.makeLeaderArea(leader, this, ipd); + Leader leader, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makeLeaderArea(leader, this, ipd, retrieveMarker); } public org.axsl.areaW.PageNumberArea makePageNumberArea( - PageNumber pageNumber, int ipd) { - return LineArea.makePageNumberArea(pageNumber, this, ipd); + PageNumber pageNumber, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makePageNumberArea(pageNumber, this, ipd, + retrieveMarker); } public org.axsl.areaW.PageNumberCitationArea makePageNumberCitationArea( - PageNumberCitation citation, int ipd) { - return LineArea.makePageNumberCitationArea(citation, this, ipd); + PageNumberCitation citation, int ipd, + RetrieveMarker retrieveMarker) { + return LineArea.makePageNumberCitationArea(citation, this, ipd, + retrieveMarker); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -31,6 +31,7 @@ import org.axsl.foR.fo.Leader; import org.axsl.foR.fo.PageNumber; import org.axsl.foR.fo.PageNumberCitation; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.areaR.RenderVisitor; import org.axsl.common.Constants; @@ -63,8 +64,8 @@ org.axsl.areaW.LeaderArea { public LeaderArea(Leader generatedBy, Area parentArea, - int initialProgressionDimension) { - super(generatedBy, parentArea); + RetrieveMarker retrieveMarker, int initialProgressionDimension) { + super(generatedBy, parentArea, retrieveMarker); setProgressionDimension(initialProgressionDimension); } @@ -250,28 +251,31 @@ } public org.axsl.areaW.ForeignObjectArea makeForeignObjectArea( - InstreamForeignObject ifo, int ipd) { - return LineArea.makeForeignObjectArea(ifo, this, ipd); + InstreamForeignObject ifo, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makeForeignObjectArea(ifo, this, ipd, retrieveMarker); } public org.axsl.areaW.ExternalGraphicArea makeExternalGraphicArea( - ExternalGraphic ifo, int ipd) { - return LineArea.makeExternalGraphicArea(ifo, this, ipd); + ExternalGraphic ifo, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makeExternalGraphicArea(ifo, this, ipd, retrieveMarker); } public org.axsl.areaW.LeaderArea makeLeaderArea( - Leader leader, int ipd) { - return LineArea.makeLeaderArea(leader, this, ipd); + Leader leader, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makeLeaderArea(leader, this, ipd, retrieveMarker); } public org.axsl.areaW.PageNumberArea makePageNumberArea( - PageNumber pageNumber, int ipd) { - return LineArea.makePageNumberArea(pageNumber, this, ipd); + PageNumber pageNumber, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makePageNumberArea(pageNumber, this, ipd, + retrieveMarker); } public org.axsl.areaW.PageNumberCitationArea makePageNumberCitationArea( - PageNumberCitation citation, int ipd) { - return LineArea.makePageNumberCitationArea(citation, this, ipd); + PageNumberCitation citation, int ipd, + RetrieveMarker retrieveMarker) { + return LineArea.makePageNumberCitationArea(citation, this, ipd, + retrieveMarker); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -49,8 +49,9 @@ // Whether the line has already had the leader sizes adjusted. private boolean optimized = false; - public LineArea(FObj generatedBy, NormalBlockArea parentArea) { - super(generatedBy, parentArea); + public LineArea(FObj generatedBy, NormalBlockArea parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); /* The progression dimension used is exactly equal to the size of the * em-box, i.e. exactly equal to the font-size. */ this.setProgressionDimension(this.traitFontSize()); @@ -776,29 +777,35 @@ } public static org.axsl.areaW.ForeignObjectArea makeForeignObjectArea( - InstreamForeignObject ifo, Area parentArea, int ipd) { - return new ForeignObjectArea(ifo, parentArea, ipd); + InstreamForeignObject ifo, Area parentArea, int ipd, + RetrieveMarker retrieveMarker) { + return new ForeignObjectArea(ifo, parentArea, retrieveMarker, ipd); } public static org.axsl.areaW.ExternalGraphicArea makeExternalGraphicArea( - ExternalGraphic ifo, Area parentArea, int ipd) { - return new ExternalGraphicArea(ifo, parentArea, ipd); + ExternalGraphic ifo, Area parentArea, int ipd, + RetrieveMarker retrieveMarker) { + return new ExternalGraphicArea(ifo, parentArea, retrieveMarker, ipd); } public static org.axsl.areaW.LeaderArea makeLeaderArea( - Leader leader, Area parentArea, int ipd) { - return new LeaderArea(leader, parentArea, ipd); + Leader leader, Area parentArea, int ipd, + RetrieveMarker retrieveMarker) { + return new LeaderArea(leader, parentArea, retrieveMarker, ipd); } public static org.axsl.areaW.PageNumberArea makePageNumberArea( - PageNumber pageNumber, Area parentArea, int ipd) { - return new PageNumberArea(pageNumber, parentArea, ipd); + PageNumber pageNumber, Area parentArea, int ipd, + RetrieveMarker retrieveMarker) { + return new PageNumberArea(pageNumber, parentArea, retrieveMarker, ipd); } public static org.axsl.areaW.PageNumberCitationArea makePageNumberCitationArea( - PageNumberCitation citation, Area parentArea, int ipd) { - return new PageNumberCitationArea(citation, parentArea, ipd); + PageNumberCitation citation, Area parentArea, int ipd, + RetrieveMarker retrieveMarker) { + return new PageNumberCitationArea(citation, parentArea, retrieveMarker, + ipd); } public static org.axsl.areaW.TextArea makeTextArea(FOTextContent foText, @@ -832,28 +839,31 @@ } public org.axsl.areaW.ForeignObjectArea makeForeignObjectArea( - InstreamForeignObject ifo, int ipd) { - return LineArea.makeForeignObjectArea(ifo, this, ipd); + InstreamForeignObject ifo, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makeForeignObjectArea(ifo, this, ipd, retrieveMarker); } public org.axsl.areaW.ExternalGraphicArea makeExternalGraphicArea( - ExternalGraphic ifo, int ipd) { - return LineArea.makeExternalGraphicArea(ifo, this, ipd); + ExternalGraphic ifo, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makeExternalGraphicArea(ifo, this, ipd, retrieveMarker); } public org.axsl.areaW.LeaderArea makeLeaderArea( - Leader leader, int ipd) { - return LineArea.makeLeaderArea(leader, this, ipd); + Leader leader, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makeLeaderArea(leader, this, ipd, retrieveMarker); } public org.axsl.areaW.PageNumberArea makePageNumberArea( - PageNumber pageNumber, int ipd) { - return LineArea.makePageNumberArea(pageNumber, this, ipd); + PageNumber pageNumber, int ipd, RetrieveMarker retrieveMarker) { + return LineArea.makePageNumberArea(pageNumber, this, ipd, + retrieveMarker); } public org.axsl.areaW.PageNumberCitationArea makePageNumberCitationArea( - PageNumberCitation citation, int ipd) { - return LineArea.makePageNumberCitationArea(citation, this, ipd); + PageNumberCitation citation, int ipd, + RetrieveMarker retrieveMarker) { + return LineArea.makePageNumberCitationArea(citation, this, ipd, + retrieveMarker); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -27,16 +27,19 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.foR.fo.ListBlock; import org.axsl.foR.fo.ListItem; +import org.axsl.foR.fo.RetrieveMarker; public class ListBlockArea extends AbstractNormalBlockArea implements org.axsl.areaR.ListBlockArea, org.axsl.areaW.ListBlockArea { - public ListBlockArea(ListBlock parentFObj, Area parentArea) { - super(parentFObj, parentArea); + public ListBlockArea(ListBlock parentFObj, Area parentArea, + RetrieveMarker retrieveMarker) { + super(parentFObj, parentArea, retrieveMarker); } - public org.axsl.areaW.ListItemArea makeListItemArea(ListItem listItem) { - return new ListItemArea(listItem, this); + public org.axsl.areaW.ListItemArea makeListItemArea(ListItem listItem, + RetrieveMarker retrieveMarker) { + return new ListItemArea(listItem, this, retrieveMarker); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -25,12 +25,14 @@ package org.foray.area; import org.axsl.foR.fo.ListItem; +import org.axsl.foR.fo.RetrieveMarker; public class ListItemArea extends NormalBlockArea implements org.axsl.areaW.ListItemArea { - public ListItemArea(ListItem parentFObj, Area parentArea) { - super(parentFObj, parentArea); + public ListItemArea(ListItem parentFObj, Area parentArea, + RetrieveMarker retrieveMarker) { + super(parentFObj, parentArea, retrieveMarker); } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -45,7 +45,7 @@ private boolean isNewSpanArea; public MainRA(RegionBody generatedBy, RegionRABody parentArea) { - super(generatedBy, parentArea); + super(generatedBy, parentArea, null); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/MarkerContentArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/MarkerContentArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/MarkerContentArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -40,7 +40,7 @@ public MarkerContentArea(RetrieveMarker generatedBy, Area parentArea, Marker marker) { - super(generatedBy, parentArea); + super(generatedBy, parentArea, generatedBy); this.marker = marker; } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NonArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/NonArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/NonArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -33,7 +33,7 @@ public abstract class NonArea extends AreaNode { public NonArea(FObj generatedBy, AreaNode parentArea) { - super(generatedBy, parentArea); + super(generatedBy, parentArea, null); } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -31,6 +31,7 @@ import org.axsl.foR.fo.ListItemBody; import org.axsl.foR.fo.ListItemLabel; import org.axsl.foR.fo.RegionBody; +import org.axsl.foR.fo.RetrieveMarker; /** * This class represents a Block Area. @@ -46,8 +47,9 @@ implements org.axsl.areaR.NormalBlockArea, org.axsl.areaW.NormalBlockArea{ - public NormalBlockArea(FObj parentFObj, Area parentArea) { - super(parentFObj, parentArea); + public NormalBlockArea(FObj parentFObj, Area parentArea, + RetrieveMarker retrieveMarker) { + super(parentFObj, parentArea, retrieveMarker); } /** @@ -71,7 +73,7 @@ return null; } } - return new LineArea(traitGeneratedBy(), this); + return new LineArea(traitGeneratedBy(), this, this.getRetrieveMarker()); } public Area getOverflowArea(Area childRequesting) throws AreaWException { @@ -92,9 +94,11 @@ overflowColumn = (NormalFlowRA) span.getChildren().get(0); } if (overflowColumn != null) { - return new NormalBlockArea(this.traitGeneratedBy(), overflowColumn); + return new NormalBlockArea(this.traitGeneratedBy(), overflowColumn, + this.getRetrieveMarker()); } - return new NormalBlockArea(this.traitGeneratedBy(), overflow); + return new NormalBlockArea(this.traitGeneratedBy(), overflow, + this.getRetrieveMarker()); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -38,7 +38,7 @@ org.axsl.areaW.NormalFlowRA { public NormalFlowRA(FObj generatedBy, SpanRA parentArea) { - super(generatedBy, parentArea); + super(generatedBy, parentArea, null); } public Area getOverflowArea(Area childRequesting) throws AreaWException { @@ -47,7 +47,7 @@ // If parent SpanArea can create another column if (overflowArea instanceof NormalFlowRA) { return new NormalBlockArea(childRequesting.traitGeneratedBy(), - this); + this, childRequesting.getRetrieveMarker()); } // If a new page was created if (overflowArea instanceof MainRA) { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -26,6 +26,7 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; /** * The normal inline-area created by an fo:page-number object. @@ -35,8 +36,8 @@ org.axsl.areaW.PageNumberArea { public PageNumberArea(FObj generatedBy, Area parentArea, - int width) { - super(generatedBy, parentArea); + RetrieveMarker retrieveMarker, int width) { + super(generatedBy, parentArea, retrieveMarker); setProgressionDimension(width); } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -26,14 +26,15 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; public class PageNumberCitationArea extends AbstractInlineArea implements org.axsl.areaR.PageNumberCitationArea, org.axsl.areaW.PageNumberCitationArea { public PageNumberCitationArea(FObj generatedBy, Area parentArea, - int width) { - super(generatedBy, parentArea); + RetrieveMarker retrieveMarker, int width) { + super(generatedBy, parentArea, retrieveMarker); setProgressionDimension(width); } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -60,7 +60,7 @@ private ArrayList markers = null; PageRA(SimplePageMaster spm, PageCollection areaTree) { - super(spm, areaTree); + super(spm, areaTree, null); markers = new ArrayList(); createRegions(); } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -39,7 +39,7 @@ org.axsl.areaW.RegionArea { public RegionRA(Region generatedBy, PageRA parentArea) { - super(generatedBy, parentArea); + super(generatedBy, parentArea, null); } public int getYPosition() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -45,7 +45,7 @@ public RegionRABody(RegionBody generatedBy, PageRA parentArea, int xPosition, int yPosition) { - super(generatedBy, parentArea); + super(generatedBy, parentArea, null); // create the primary reference areas beforeFloatReferenceArea = new BeforeFloatRA(generatedBy, this); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SVGArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/SVGArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/SVGArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -26,6 +26,7 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.areaW.AreaWException; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.svg.SVGElement; import org.w3c.dom.svg.SVGDocument; @@ -41,8 +42,9 @@ * @param generatedBy {@inheritDoc} * @param parentArea {@inheritDoc} */ - public SVGArea(SVGElement generatedBy, ForeignObjectArea parentArea) { - super(generatedBy, parentArea); + public SVGArea(SVGElement generatedBy, ForeignObjectArea parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } public SVGDocument getSVGDocument() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -48,7 +48,7 @@ private boolean isBalanced = false; public SpanRA(RegionBody generatedBy, MainRA parentArea, int numColumns) { - super(generatedBy, parentArea); + super(generatedBy, parentArea, null); for (int columnIndex = 0; columnIndex < numColumns; columnIndex++) { new NormalFlowRA(generatedBy, this); } @@ -217,15 +217,17 @@ throws AreaWException { LineArea newLineArea = null; if (canAddLineArea(blockArea)) { - newLineArea = new LineArea(blockArea.traitGeneratedBy(), blockArea); + newLineArea = new LineArea(blockArea.traitGeneratedBy(), blockArea, + blockArea.getRetrieveMarker()); } else { MainRA main = (MainRA) this.getParent(); MainRA newMain = (MainRA) main.getOverflowArea(this); NormalFlowRA nf = newMain.addSpanArea(newMain.traitColumnCount()); NormalBlockArea newBlockArea = new NormalBlockArea( - blockArea.traitGeneratedBy(), nf); + blockArea.traitGeneratedBy(), nf, + blockArea.getRetrieveMarker()); newLineArea = new LineArea(blockArea.traitGeneratedBy(), - newBlockArea); + newBlockArea, newBlockArea.getRetrieveMarker()); } balanceColumns(); return newLineArea; Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableBodyContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableBodyContainer.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableBodyContainer.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -26,13 +26,15 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; public class TableBodyContainer extends AbstractTableContainer implements org.axsl.areaR.TableBodyContainer, org.axsl.areaW.TableBodyContainer { - public TableBodyContainer(FObj generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public TableBodyContainer(FObj generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } public void setXPosition(int xPosition) { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -27,6 +27,7 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.areaR.TableCellArea; import org.axsl.common.Constants; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.TableCell; public class TableCellRA extends ContainerRA implements TableCellArea, @@ -41,8 +42,9 @@ private int centeringPaddingLeft = 0; private int centeringPaddingRight = 0; - public TableCellRA(TableCell generatedBy, TableRowContainer parentArea) { - super(generatedBy, parentArea); + public TableCellRA(TableCell generatedBy, TableRowContainer parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); /* Do not set any area dimensions here. The IPD is controlled by the * table and columns. The BPD is controlled by the TableRowContainer, * which get input from each cell about the BPD of its contents.*/ Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableFooterContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableFooterContainer.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableFooterContainer.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -26,13 +26,15 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; public class TableFooterContainer extends AbstractTableContainer implements org.axsl.areaR.TableFooterContainer, org.axsl.areaW.TableFooterContainer { - public TableFooterContainer(FObj generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public TableFooterContainer(FObj generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } public void setXPosition(int xPosition) { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableHeaderContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableHeaderContainer.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableHeaderContainer.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -26,13 +26,15 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; public class TableHeaderContainer extends AbstractTableContainer implements org.axsl.areaR.TableHeaderContainer, org.axsl.areaW.TableHeaderContainer { - public TableHeaderContainer(FObj generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public TableHeaderContainer(FObj generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } public void setXPosition(int xPosition) { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -29,6 +29,7 @@ import org.axsl.areaW.TableFooterContainer; import org.axsl.areaW.TableHeaderContainer; import org.axsl.foR.FOContext; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.Table; import org.axsl.foR.fo.TableBody; import org.axsl.foR.fo.TableColumn; @@ -42,8 +43,9 @@ private int[] resolvedColumnWidth = null; - public TableRA(Table generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public TableRA(Table generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); int numColumns = generatedBy.numberOfColumns(); resolvedColumnWidth = new int[numColumns]; /* Not sure this is right. */ @@ -95,19 +97,22 @@ } public org.axsl.areaW.TableBodyContainer makeTableBodyContainer( - TableBody tableBody) { - return new org.foray.area.TableBodyContainer(tableBody, this); + TableBody tableBody, RetrieveMarker retrieveMarker) { + return new org.foray.area.TableBodyContainer(tableBody, this, + retrieveMarker); } public TableHeaderContainer makeTableHeaderContainer( - TableHeader tableHeader) { - return new org.foray.area.TableHeaderContainer(tableHeader, this); + TableHeader tableHeader, RetrieveMarker retrieveMarker) { + return new org.foray.area.TableHeaderContainer(tableHeader, this, + retrieveMarker); } public TableFooterContainer makeTableFooterContainer( - TableFooter tableFooter) { - return new org.foray.area.TableFooterContainer(tableFooter, this); + TableFooter tableFooter, RetrieveMarker retrieveMarker) { + return new org.foray.area.TableFooterContainer(tableFooter, this, + retrieveMarker); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -27,6 +27,7 @@ import org.axsl.areaR.RenderVisitor; import org.axsl.areaW.TableCellArea; import org.axsl.common.Constants; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.TableCell; import org.axsl.foR.fo.TableRow; @@ -39,8 +40,9 @@ implements org.axsl.areaR.TableRowContainer, org.axsl.areaW.TableRowContainer { - public TableRowContainer(TableRow generatedBy, Area parentArea) { - super(generatedBy, parentArea); + public TableRowContainer(TableRow generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); } /* @@ -60,8 +62,9 @@ return super.crOriginBPDOffset(); } - public TableCellArea makeTableCellArea(TableCell node) { - return new TableCellRA(node, this); + public TableCellArea makeTableCellArea(TableCell node, + RetrieveMarker retrieveMarker) { + return new TableCellRA(node, this, retrieveMarker); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2006-06-12 23:26:56 UTC (rev 7546) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2006-06-13 00:12:23 UTC (rev 7547) @@ -112,6 +112,7 @@ this.hasFauxSmallCaps = hasFauxSmallCaps; setProgressionDimension(progressionDimensionUsed); } + /** * <p>Computes and returns the text that should actually be used in the * output document. Note that it may be different from the char array that This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 23:27:01
|
Revision: 7546 Author: victormote Date: 2006-06-12 16:26:56 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7546&view=rev Log Message: ----------- Prime the pump by dropping the appropriate RetrieveMarker instance into the layout pipeline. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java 2006-06-12 23:23:29 UTC (rev 7545) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java 2006-06-12 23:26:56 UTC (rev 7546) @@ -26,7 +26,6 @@ import org.axsl.areaW.Area; import org.axsl.areaW.AreaWException; -import org.axsl.areaW.MarkerContentArea; import org.axsl.areaW.PageArea; import org.axsl.foR.FONode; import org.axsl.foR.fo.Marker; @@ -56,15 +55,13 @@ if (bestMarker == null) { return Status.OK; } - MarkerContentArea markerArea = area.makeMarkerContentArea(node, - bestMarker); MarkerPL markerPL = (MarkerPL) this.getLayoutProxy(bestMarker); // Necessary because the marker may get used multiple times. markerPL.resetProgress(); markerPL.setProgress(0); for (int i = 0; i < bestMarker.getChildren().size(); i++) { FONode fo = (FONode) bestMarker.getChildren().get(i); - getLayoutProxy(fo).layout(markerArea, retrieveMarker); + getLayoutProxy(fo).layout(area, node); } return Status.OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 23:23:56
|
Revision: 7545 Author: victormote Date: 2006-06-12 16:23:29 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7545&view=rev Log Message: ----------- Get the layout system to pass around the needed RetrieveMarker instance. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjMixedPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InstreamForeignObjectPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/LeaderPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/MarkerPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberCitationPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -33,6 +33,7 @@ import org.axsl.foR.FObj; import org.axsl.foR.fo.AbstractFlow; import org.axsl.foR.fo.Region; +import org.axsl.foR.fo.RetrieveMarker; import java.util.ArrayList; @@ -78,15 +79,17 @@ this.progressSnapshot = progressSnapshot; } - public int layout(Area area) throws AreaWException { - return layout(area, null); + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { + return layout(area, null, retrieveMarker); } public AbstractFlow getFO() { return (AbstractFlow) this.getFONode(); } - public int layout(Area area, Region region) throws AreaWException { + public int layout(Area area, Region region, RetrieveMarker retrieveMarker) + throws AreaWException { if (getProgress() == FONodePL.START) { setProgress(0); } @@ -117,7 +120,7 @@ ArrayList())); } - set_status(getLayoutProxy(fo).layout(currentArea)); + set_status(getLayoutProxy(fo).layout(currentArea, retrieveMarker)); if (Status.isIncomplete(get_status())) { if ((prevChildMustKeepWithNext) Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -36,6 +36,7 @@ import org.axsl.foR.FONode; import org.axsl.foR.fo.AbstractTableBody; import org.axsl.foR.fo.Marker; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.Table; import org.axsl.foR.fo.TableBody; import org.axsl.foR.fo.TableFooter; @@ -111,7 +112,8 @@ return (AbstractTableBody) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { AbstractTableBody node = getReal(); TableArea tableArea = (TableArea) area; Table table = node.getNearestTable(area); @@ -170,7 +172,7 @@ Object child = node.childrenFO().get(i); if (child instanceof Marker) { MarkerPL markerPL = (MarkerPL) getLayoutProxy((FONode) child); - markerPL.layout(area); + markerPL.layout(area, retrieveMarker); continue; } if (!(child instanceof TableRow)) { @@ -211,7 +213,7 @@ } } rowPL.bIgnoreKeepTogether = (bRowStartsArea && startsAC(area)); - int status = rowPL.layout(areaContainer); + int status = rowPL.layout(areaContainer, retrieveMarker); if (Status.isIncomplete(status)) { // BUG!!! don't distinguish between break-before and after! if (Status.isPageBreak(status)) { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -29,6 +29,7 @@ import org.axsl.areaW.BlockContainerRA; import org.axsl.foR.FONode; import org.axsl.foR.fo.BlockContainer; +import org.axsl.foR.fo.RetrieveMarker; /** * @@ -43,7 +44,8 @@ return (BlockContainer) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { BlockContainer node = getFO(); if (getProgress() == FONodePL.START) { setProgress(0); @@ -54,7 +56,7 @@ for (int i = this.getProgress(); i < node.getChildCount(); i++) { FONode fo = node.getFONodeChildAt(i); FObjPL fobjPL = (FObjPL) getLayoutProxy(fo); - fobjPL.layout(blockContainer); + fobjPL.layout(blockContainer, retrieveMarker); } return Status.OK; Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -31,6 +31,7 @@ import org.axsl.foR.FONode; import org.axsl.foR.FObj; import org.axsl.foR.fo.Block; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.fontR.FontConsumer; /** @@ -61,7 +62,8 @@ return (Block) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { Block node = this.getFO(); if (! breakStatusBeforeChecked) { breakStatusBeforeChecked = true; @@ -103,7 +105,7 @@ for (int i = getProgress(); i < node.getChildCount(); i++) { FONode fo = node.getFONodeChildAt(i); FONodePL nodePL = this.getLayoutProxy(fo); - int status = nodePL.layout(blockArea); + int status = nodePL.layout(blockArea, retrieveMarker); if (Status.isIncomplete(status)) { setProgress(i); if (status == Status.AREA_FULL_NONE) { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -28,6 +28,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.fo.Character; +import org.axsl.foR.fo.RetrieveMarker; /** * Concrete class for FObj instances that do not need layout. @@ -42,8 +43,9 @@ return (Character) this.getFONode(); } - public int layout(Area area) throws AreaWException { - return layoutChildren(area); + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { + return layoutChildren(area, retrieveMarker); } } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -29,6 +29,7 @@ import org.axsl.areaW.TableArea; import org.axsl.foR.FONode; import org.axsl.foR.extension.ContinuedLabel; +import org.axsl.foR.fo.RetrieveMarker; /** * @@ -51,7 +52,8 @@ * @return Value indicating where all, some or none of the content * was placed in the current parent area. */ - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { ContinuedLabel label = getFO(); if (getProgress() == FONodePL.START) { setProgress(0); @@ -65,7 +67,7 @@ FONode fo = (FONode)label.getChildren().get(i); int status; if (Status.isIncomplete(status - = getLayoutProxy(fo).layout(area))) { + = getLayoutProxy(fo).layout(area, retrieveMarker))) { setProgress(i); return status; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -29,6 +29,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.fo.ExternalGraphic; +import org.axsl.foR.fo.RetrieveMarker; /** * @@ -43,7 +44,8 @@ return (ExternalGraphic) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { ExternalGraphic node = getFO(); if (getProgress() == FONodePL.START) { setProgress(0); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -32,6 +32,7 @@ import org.axsl.areaW.TableRowContainer; import org.axsl.foR.FONode; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.TableCell; import org.axsl.text.TextException; import org.axsl.text.line.LineBreaker; @@ -131,6 +132,7 @@ * During the layout process, at least one {@link TableCellArea} should be * created, which is then passed to layout for the children of the * {@link TableCell} now being laid out. + * @param retrieveMarker TODO * @return An integer representing the status of this layout. * When laying out FOText, this marks the index to the last character that * was successfully laid out plus one, that is, it marks the next character @@ -140,7 +142,8 @@ * should be laid out. * @throws AreaWException */ - public abstract int layout(Area area) throws AreaWException; + public abstract int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException; public Log getLogger() { return layout.getLogger(); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -30,6 +30,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.FOText; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.text.line.LineText; /** @@ -45,7 +46,8 @@ return (FOText) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { FOText node = this.getFO(); if (getProgress() == FONodePL.START) { setProgress(0); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjMixedPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjMixedPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjMixedPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -30,6 +30,7 @@ import org.axsl.foR.FONode; import org.axsl.foR.FObj; import org.axsl.foR.FObjMixed; +import org.axsl.foR.fo.RetrieveMarker; /** * @@ -44,14 +45,15 @@ return (FObjMixed) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { FObjMixed node = getFObjMixed(); if (getProgress() == FONodePL.START) { setProgress(0); } for (int i = getProgress(); i < node.childrenFO().size(); i++) { FONode fo = (FONode) node.childrenFO().get(i); - int status = getLayoutProxy(fo).layout(area); + int status = getLayoutProxy(fo).layout(area, retrieveMarker); if (Status.isIncomplete((status))) { setProgress(i); return status; Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -25,10 +25,10 @@ package org.foray.pioneer; import org.axsl.areaW.Area; - import org.axsl.areaW.AreaWException; import org.axsl.foR.FONode; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; import java.util.ArrayList; import java.util.List; @@ -87,7 +87,8 @@ return ((FObj) this.getFONode()).getChildren(); } - protected int layoutChildren(Area area) throws AreaWException { + protected int layoutChildren(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { FONode node = this.getFONode(); int start = getProgress(); if (start == FONodePL.START) { @@ -96,7 +97,7 @@ for (int i = start; i < node.childrenFO().size(); i++) { FONode fo = (FONode)node.childrenFO().get(i); FONodePL nodePL = this.getLayoutProxy(fo); - int status = nodePL.layout(area); + int status = nodePL.layout(area, retrieveMarker); if (Status.isIncomplete(status)) { return status; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -24,12 +24,12 @@ package org.foray.pioneer; +import org.axsl.areaW.AreaWException; import org.axsl.areaW.NormalFlowRA; import org.axsl.areaW.PageCollection; - -import org.axsl.areaW.AreaWException; import org.axsl.foR.FObj; import org.axsl.foR.fo.Flow; +import org.axsl.foR.fo.RetrieveMarker; import java.util.List; @@ -39,7 +39,8 @@ super(flow, layout); } - public int layout(PageCollection pc) throws AreaWException { + public int layout(PageCollection pc, RetrieveMarker retrieveMarker) + throws AreaWException { List children = getChildren(); for (int i = 0; i < children.size(); i++) { FObj lastFObj = null; @@ -50,7 +51,7 @@ org.axsl.areaW.SpanRA span = pc.startingReferenceArea(lastFObj, nextFObj); NormalFlowRA nf = span.normalFlowForNextFO(nextFObj); - this.getLayoutProxy(nextFObj).layout(nf); + this.getLayoutProxy(nextFObj).layout(nf, retrieveMarker); } return 0; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -33,6 +33,7 @@ import org.axsl.foR.FONode; import org.axsl.foR.fo.FootnoteBody; import org.axsl.foR.fo.PageSequence; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.StaticContent; /** @@ -48,7 +49,8 @@ return (FootnoteBody) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { FootnoteBody node = getFO(); if (getProgress() == FONodePL.START) { setProgress(0); @@ -59,7 +61,7 @@ for (int i = getProgress(); i < numChildren; i++) { FONode fo = node.getFONodeChildAt(i); FONodePL foNodePL = getLayoutProxy(fo); - int status = foNodePL.layout(referenceArea); + int status = foNodePL.layout(referenceArea, retrieveMarker); if (Status.isIncomplete((status))) { resetProgress(); return status; @@ -68,12 +70,12 @@ return Status.OK; } - public boolean layoutFootnote(PageArea p) { + public boolean layoutFootnote(PageArea p, RetrieveMarker retrieveMarker) { RegionRABody bac = p.getWritableRegionBody(); FootnoteRA footArea = bac.getWritableFootnoteRA(); try { - layoutFootnoteSeparator(bac, footArea); - int status = layout(footArea); + layoutFootnoteSeparator(bac, footArea, retrieveMarker); + int status = layout(footArea, retrieveMarker); if (Status.isIncomplete(status)) { // add as a pending footnote return false; @@ -84,8 +86,8 @@ return true; } - private void layoutFootnoteSeparator(RegionRABody bac, FootnoteRA footArea) - throws AreaWException { + private void layoutFootnoteSeparator(RegionRABody bac, FootnoteRA footArea, + RetrieveMarker retrieveMarker) throws AreaWException { /* TODO: It seems like this logic should be done once when the * PageCollection is first started, and cached there for reuse. */ if (footArea.hasChildren()) { @@ -98,7 +100,7 @@ } StaticContentPL staticPL = (StaticContentPL) getLayoutProxy(separator); - staticPL.layout(footArea); + staticPL.layout(footArea, retrieveMarker); } } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -31,6 +31,7 @@ import org.axsl.foR.fo.Footnote; import org.axsl.foR.fo.FootnoteBody; import org.axsl.foR.fo.Inline; +import org.axsl.foR.fo.RetrieveMarker; /** * @@ -45,7 +46,8 @@ return (Footnote) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { Footnote node = getFO(); if (getProgress() == FONodePL.START) { setProgress(0); @@ -54,7 +56,7 @@ /* Layout the Inline. */ Inline inline = node.getInline(); FObjMixedPL inlinePL = (FObjMixedPL) getLayoutProxy(inline); - int status = inlinePL.layout(area); + int status = inlinePL.layout(area, retrieveMarker); if (Status.isIncomplete(status)) { return status; } @@ -65,7 +67,7 @@ PageArea page = area.getWritablePage(); /* If the footnote cannot be entirely laid out on the current page, * it will be added to the list of pending footnotes. */ - fbPL.layoutFootnote(page); + fbPL.layoutFootnote(page, retrieveMarker); return Status.OK; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InstreamForeignObjectPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InstreamForeignObjectPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InstreamForeignObjectPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -30,6 +30,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.fo.InstreamForeignObject; +import org.axsl.foR.fo.RetrieveMarker; public class InstreamForeignObjectPL extends FObjPL { @@ -44,7 +45,8 @@ return (InstreamForeignObject) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { InstreamForeignObject node = getFO(); LineArea lineArea = activeLineArea(area); if (lineArea == null) { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/LeaderPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/LeaderPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/LeaderPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -29,6 +29,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.fo.Leader; +import org.axsl.foR.fo.RetrieveMarker; /** * Concrete class for FObj instances that do not need layout. @@ -43,7 +44,8 @@ return (Leader) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { Leader node = getFO(); LineArea lineArea = activeLineArea(area); if (lineArea == null) { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -30,6 +30,7 @@ import org.axsl.areaW.NormalBlockArea; import org.axsl.foR.fo.ListBlock; import org.axsl.foR.fo.ListItem; +import org.axsl.foR.fo.RetrieveMarker; /** * @@ -44,7 +45,8 @@ return (ListBlock) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { ListBlock node = getFO(); ListBlockPL listBlockPL = (ListBlockPL) getLayoutProxy(node); if (listBlockPL.getProgress() == FONodePL.START) { @@ -61,7 +63,7 @@ for (int i = listBlockPL.getProgress(); i < numChildren; i++) { ListItem listItem = (ListItem)node.childrenFO().get(i); ListItemPL listItemPL = (ListItemPL) getLayoutProxy(listItem); - int status = listItemPL.layout(blockArea); + int status = listItemPL.layout(blockArea, retrieveMarker); if (Status.isIncomplete(status)) { if (status == Status.AREA_FULL_NONE && i > 0) { status = Status.AREA_FULL_SOME; Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -29,6 +29,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.FObj; import org.axsl.foR.fo.ListItemBody; +import org.axsl.foR.fo.RetrieveMarker; /** * @@ -43,7 +44,8 @@ return (ListItemBody) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { ListItemBody node = getFO(); if (getProgress() == FONodePL.START) { setProgress(0); @@ -60,7 +62,7 @@ for (int i = getProgress(); i < numChildren; i++) { FObj fo = (FObj)node.childrenFO().get(i); - int status = getLayoutProxy(fo).layout(area); + int status = getLayoutProxy(fo).layout(area, retrieveMarker); if (Status.isIncomplete((status))) { setProgress(i); if ((i == 0) && (status == Status.AREA_FULL_NONE)) { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -29,6 +29,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.fo.Block; import org.axsl.foR.fo.ListItemLabel; +import org.axsl.foR.fo.RetrieveMarker; /** * @@ -43,7 +44,8 @@ return (ListItemLabel) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { ListItemLabel node = getFO(); int numChildren = node.childrenFO().size(); @@ -64,7 +66,7 @@ int status; BlockPL blockPL = (BlockPL) getLayoutProxy(block); - status = blockPL.layout(area); + status = blockPL.layout(area, retrieveMarker); return status; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -32,6 +32,7 @@ import org.axsl.foR.fo.ListItem; import org.axsl.foR.fo.ListItemBody; import org.axsl.foR.fo.ListItemLabel; +import org.axsl.foR.fo.RetrieveMarker; /** * @@ -46,15 +47,17 @@ return (ListItem) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { if (! (area instanceof NormalBlockArea)) { throw new AreaWException("Illegal parent area for fo:list-item"); } NormalBlockArea blockArea = (NormalBlockArea) area; - return layout(blockArea); + return layout(blockArea, retrieveMarker); } - public int layout(NormalBlockArea area) throws AreaWException { + public int layout(NormalBlockArea area, RetrieveMarker retrieveMarker) + throws AreaWException { ListItem node = getFO(); ListBlockArea listBlockArea = (ListBlockArea) area; if (getProgress() == FONodePL.START) { @@ -73,7 +76,7 @@ if (getProgress() == 0) { ListItemLabelPL labelPL = (ListItemLabelPL) this.getLayoutProxy(label); - status = labelPL.layout(group); + status = labelPL.layout(group, retrieveMarker); if (Status.isIncomplete(status)) { return status; } @@ -83,7 +86,7 @@ /* Now create a BlockArea to contain the list-item-body. */ ListItemBody body = (ListItemBody)node.childrenFO().get(1); ListItemBodyPL bodyPL = (ListItemBodyPL) getLayoutProxy(body); - status = bodyPL.layout(group); + status = bodyPL.layout(group, retrieveMarker); if (Status.isIncomplete(status)) { layout.completeCurrentLineInBlock(group); setProgress(1); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/MarkerPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/MarkerPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/MarkerPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -25,6 +25,7 @@ package org.foray.pioneer; import org.axsl.foR.fo.Marker; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.areaW.Area; @@ -38,7 +39,7 @@ return (Marker) this.getFONode(); } - public int layout(Area area) { + public int layout(Area area, RetrieveMarker retrieveMarker) { Marker node = getReal(); // no layout action desired area.getWritablePage().registerMarker(node); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -27,6 +27,7 @@ import org.axsl.areaW.Area; import org.axsl.areaW.AreaWException; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; /** * Concrete class for FObj instances that do not need layout. @@ -37,7 +38,8 @@ super(realFObj, layout); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { return Status.OK; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberCitationPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberCitationPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberCitationPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -29,6 +29,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.fo.PageNumberCitation; +import org.axsl.foR.fo.RetrieveMarker; /** * @@ -43,7 +44,8 @@ return (PageNumberCitation) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { PageNumberCitation node = getFO(); LineArea lineArea = activeLineArea(area); if (lineArea == null) { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -29,6 +29,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.fo.PageNumber; +import org.axsl.foR.fo.RetrieveMarker; /** * @@ -43,7 +44,8 @@ return (PageNumber) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { PageNumber node = getFO(); LineArea lineArea = activeLineArea(area); if (lineArea == null) { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -182,7 +182,7 @@ */ RegionRABody bodyArea = currentPage.getWritableRegionBody(); FlowPL flowPL = (FlowPL) flow.getProxy(); - flowPL.layout(bodyArea); + flowPL.layout(bodyArea, null); this.formatStaticContent(currentPage); currentPage.layoutComplete(); status = flowPL.getStatus(); @@ -194,7 +194,7 @@ for (int i = 0; i < this.pendingFootnotes.size(); i++) { FootnoteBody fb = (FootnoteBody) this.pendingFootnotes.get(i); FootnoteBodyPL fbPL = ((FootnoteBodyPL) fb.getProxy()); - if (! fbPL.layoutFootnote(pageArea)) { + if (! fbPL.layoutFootnote(pageArea, null)) { // footnotes are too large to fit on empty page } } @@ -221,7 +221,7 @@ } /* TODO: Remove the following ugly, ugly cast after moduls are * settled down. */ - staticPL.layout((Area)area); + staticPL.layout((Area)area, null); } public int checkBreakBefore(FObj node, Area area) { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -45,7 +45,8 @@ return (RetrieveMarker) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { /* RetrieveMarker can only exist in static content, so we don't care * about tracking or setting progress at all. It either fits or it * doesn't. */ @@ -63,7 +64,7 @@ markerPL.setProgress(0); for (int i = 0; i < bestMarker.getChildren().size(); i++) { FONode fo = (FONode) bestMarker.getChildren().get(i); - getLayoutProxy(fo).layout(markerArea); + getLayoutProxy(fo).layout(markerArea, retrieveMarker); } return Status.OK; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -28,6 +28,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.StaticContent; public class StaticContentPL extends AbstractFlowPL { @@ -36,14 +37,15 @@ super(sc, layout); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { StaticContent node = (StaticContent) this.getFONode(); int numChildren = node.childrenFO().size(); for (int i = 0; i < numChildren; i++) { FObj fo = (FObj)node.childrenFO().get(i); - int status = getLayoutProxy(fo).layout(area); + int status = getLayoutProxy(fo).layout(area, retrieveMarker); if (Status.isIncomplete((status))) { /* in fact all should be laid out and clip, error etc depending * on 'overflow' */ Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -31,6 +31,7 @@ import org.axsl.common.Constants; import org.axsl.foR.FOContext; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.TableCell; public class TableCellPL extends FObjPL { @@ -110,7 +111,8 @@ return (TableCell) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { TableCell node = getReal(); if (getProgress() == FONodePL.BREAK_AFTER) { return Status.OK; @@ -134,7 +136,7 @@ // need to pass already processed content. setProgress(i); - int status = getLayoutProxy(fo).layout(cellArea); + int status = getLayoutProxy(fo).layout(cellArea, retrieveMarker); if (Status.isIncomplete(status)) { if ((i == 0) && (status == Status.AREA_FULL_NONE)) { return Status.AREA_FULL_NONE; Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -33,6 +33,7 @@ import org.axsl.foR.FOContext; import org.axsl.foR.FONode; import org.axsl.foR.fo.Marker; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.Table; import org.axsl.foR.fo.TableBody; import org.axsl.foR.fo.TableFooter; @@ -53,7 +54,8 @@ return (Table) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { Table node = getTableFO(); if (getProgress() == FONodePL.BREAK_AFTER) { return Status.OK; @@ -99,7 +101,7 @@ FONode fo = (FONode)node.childrenFO().get(i); if (fo instanceof Marker) { MarkerPL markerPL = (MarkerPL) getLayoutProxy(fo); - markerPL.layout(area); + markerPL.layout(area, retrieveMarker); continue; } if (fo instanceof TableHeader) { @@ -129,7 +131,7 @@ th = node.getTableHeader(); TableHeaderPL thPL = (TableHeaderPL) this.getLayoutProxy(th); - status = thPL.layout(areaContainer); + status = thPL.layout(areaContainer, retrieveMarker); th = node.getTableHeader(); TableHeaderPL headerPL = (TableHeaderPL) this.getLayoutProxy(th); @@ -146,7 +148,7 @@ tf = node.getTableFooter(); TableFooterPL tfPL = (TableFooterPL) this.getLayoutProxy(tf); - status = tfPL.layout(areaContainer); + status = tfPL.layout(areaContainer, retrieveMarker); tf = node.getTableFooter(); TableFooterPL footerPL = (TableFooterPL) this.getLayoutProxy(tf); @@ -157,7 +159,8 @@ footerPL.resetProgress(); } - status = getLayoutProxy(fo).layout(areaContainer); + status = getLayoutProxy(fo).layout(areaContainer, + retrieveMarker); if (Status.isIncomplete((status))) { setProgress(i); if (this.bodyCount == 0 @@ -204,7 +207,7 @@ && node.traitTableOmitFooterAtBreak(area)) { TableFooter tf = node.getTableFooter(); TableFooterPL tfPL = (TableFooterPL) getLayoutProxy(tf); - int status = tfPL.layout(areaContainer); + int status = tfPL.layout(areaContainer, retrieveMarker); if (Status.isIncomplete(status)) { // this is a problem since we need to remove a row // from the last table body and place it on the Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java 2006-06-12 22:55:53 UTC (rev 7544) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java 2006-06-12 23:23:29 UTC (rev 7545) @@ -31,6 +31,7 @@ import org.axsl.common.Constants; import org.axsl.foR.FOContext; import org.axsl.foR.Keep; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.foR.fo.TableCell; import org.axsl.foR.fo.TableColumn; import org.axsl.foR.fo.TableRow; @@ -122,7 +123,8 @@ return (TableRow) this.getFONode(); } - public int layout(Area area) throws AreaWException { + public int layout(Area area, RetrieveMarker retrieveMarker) + throws AreaWException { TableRow node = getReal(); TableColumn[] columns = node.getNearestTable(area).getTableColumns(); if (getProgress() == FONodePL.BREAK_AFTER) { @@ -192,7 +194,7 @@ int rowSpan = cell.traitNumberRowsSpanned(); - int status = cellPL.layout(areaContainer); + int status = cellPL.layout(areaContainer, retrieveMarker); if (Status.isIncomplete(status)) { if ((node.traitKeepTogetherWithinColumn(area) == Keep.ALWAYS && bIgnoreKeepTogether == false) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 22:55:58
|
Revision: 7544 Author: victormote Date: 2006-06-12 15:55:53 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7544&view=rev Log Message: ----------- Force FObjPL subclasses to implement layout(Area area). Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java 2006-06-12 22:54:05 UTC (rev 7543) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java 2006-06-12 22:55:53 UTC (rev 7544) @@ -42,10 +42,6 @@ super(realFObj, layout); } - public int layout(Area area) throws AreaWException { - return Status.OK; - } - public void resetProgress() { super.resetProgress(); List children = getChildren(); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java 2006-06-12 22:54:05 UTC (rev 7543) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java 2006-06-12 22:55:53 UTC (rev 7544) @@ -24,6 +24,8 @@ package org.foray.pioneer; +import org.axsl.areaW.Area; +import org.axsl.areaW.AreaWException; import org.axsl.foR.FObj; /** @@ -35,4 +37,8 @@ super(realFObj, layout); } + public int layout(Area area) throws AreaWException { + return Status.OK; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 22:54:14
|
Revision: 7543 Author: victormote Date: 2006-06-12 15:54:05 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7543&view=rev Log Message: ----------- Steps toward creation of the FOLinkageMarker for marker content. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java trunk/foray/foray-areatree/src/java/org/foray/area/Area.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2006-06-12 22:37:53 UTC (rev 7542) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2006-06-12 22:54:05 UTC (rev 7543) @@ -28,6 +28,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.common.Constants; import org.axsl.foR.FONode; +import org.axsl.foR.fo.RetrieveMarker; /** * Common superclass for all areas generated by inline formatting objects. @@ -41,6 +42,11 @@ super(generatedBy, parentArea); } + public AbstractInlineArea(FONode generatedBy, Area parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); + } + /** * {@inheritDoc} */ Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-06-12 22:37:53 UTC (rev 7542) +++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-06-12 22:54:05 UTC (rev 7543) @@ -59,6 +59,11 @@ super(generatedBy, parentArea); } + public Area(FONode generatedBy, AreaNode parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); + } + public int traitBackgroundRepeat() { return this.traitGeneratedBy().traitBackgroundRepeat(this); } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2006-06-12 22:37:53 UTC (rev 7542) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2006-06-12 22:54:05 UTC (rev 7543) @@ -26,6 +26,7 @@ import org.axsl.common.Constants; import org.axsl.foR.FONode; +import org.axsl.foR.fo.RetrieveMarker; import java.util.List; @@ -52,7 +53,12 @@ private int anteriorSpace; public AreaFlexible(FONode generatedBy, AreaNode parentArea) { - super(generatedBy, parentArea); + this(generatedBy, parentArea, null); + } + + public AreaFlexible(FONode generatedBy, AreaNode parentArea, + RetrieveMarker retrieveMarker) { + super(generatedBy, parentArea, retrieveMarker); initializeProgressionDimension(); initializeAnteriorSpace(); } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 22:37:53 UTC (rev 7542) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 22:54:05 UTC (rev 7543) @@ -61,6 +61,11 @@ * parent in the AreaTree. */ public AreaNode(FONode generatedBy, AreaNode parentArea) { + this(generatedBy, parentArea, null); + } + + public AreaNode(FONode generatedBy, AreaNode parentArea, + RetrieveMarker retrieveMarker) { super(parentArea); if (! (this instanceof AreaTree)) { // AreaTree has no parent with which to register Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-06-12 22:37:53 UTC (rev 7542) +++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-06-12 22:54:05 UTC (rev 7543) @@ -36,6 +36,7 @@ import org.axsl.foR.fo.Leader; import org.axsl.foR.fo.PageNumber; import org.axsl.foR.fo.PageNumberCitation; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.fontR.Font; import org.axsl.text.line.LineOutput; @@ -825,8 +826,9 @@ } /* Go ahead and create*/ - return new TextArea(foText, parentArea, startOffset, sizeInChars, ipd, - hasDiscretionaryHyphen, hasFauxSmallCaps); + RetrieveMarker retrieveMarker = parentArea.getRetrieveMarker(); + return new TextArea(foText, parentArea, retrieveMarker, startOffset, + sizeInChars, ipd, hasDiscretionaryHyphen, hasFauxSmallCaps); } public org.axsl.areaW.ForeignObjectArea makeForeignObjectArea( Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2006-06-12 22:37:53 UTC (rev 7542) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2006-06-12 22:54:05 UTC (rev 7543) @@ -31,6 +31,7 @@ import org.axsl.foR.FONode; import org.axsl.foR.FOTextContent; import org.axsl.foR.FObj; +import org.axsl.foR.fo.RetrieveMarker; import org.axsl.fontR.Font; import org.axsl.fontR.FontUse; @@ -99,10 +100,10 @@ boolean hasFauxSmallCaps = false; public TextArea(FOTextContent generatedBy, Area parentArea, - int backingOffset, int backingSize, + RetrieveMarker retrieveMarker, int backingOffset, int backingSize, int progressionDimensionUsed, boolean hasDiscretionaryHyphen, boolean hasFauxSmallCaps) { - super(generatedBy, parentArea); + super(generatedBy, parentArea, retrieveMarker); this.backingOffset = backingOffset; this.backingSize = backingSize; this.resolvedLetterSpacing = parentArea.traitLetterSpacingOpt(); @@ -111,7 +112,6 @@ this.hasFauxSmallCaps = hasFauxSmallCaps; setProgressionDimension(progressionDimensionUsed); } - /** * <p>Computes and returns the text that should actually be used in the * output document. Note that it may be different from the char array that This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 22:38:02
|
Revision: 7542 Author: victormote Date: 2006-06-12 15:37:53 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7542&view=rev Log Message: ----------- Steps toward using the generic FOLinkage. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 21:44:44 UTC (rev 7541) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 22:37:53 UTC (rev 7542) @@ -26,11 +26,13 @@ import org.foray.common.OrderedTreeNode; +import org.axsl.areaW.AreaWException; import org.axsl.areaW.PageArea; import org.axsl.common.Constants; import org.axsl.foR.FOContext; import org.axsl.foR.FONode; import org.axsl.foR.FObj; +import org.axsl.foR.fo.Marker; import org.axsl.foR.fo.RetrieveMarker; import org.axsl.fontR.FontConsumer; import org.axsl.text.TextServer; @@ -65,7 +67,8 @@ getAreaNodeParent().getChildren().add(this); // Root can't do this because the AreaTreeControl isn't registered. this.generatedBy = linkage(generatedBy); - this.getNormalLinkage().registerGeneratedArea(this); + FOLinkageNormal normalLinkage = this.getNormalLinkage(); + normalLinkage.registerGeneratedArea(this); } } @@ -91,15 +94,27 @@ this.children.remove(areaNode); } - public static FOLinkageNormal linkage(FONode foNode) { + public static FOLinkage linkage(FONode foNode) { if (foNode == null) { return null; } - FOLinkageNormal linkage = (FOLinkageNormal) foNode.getResult(); - if (linkage == null) { + FOLinkage linkage = (FOLinkage) foNode.getResult(); + if (linkage != null) { + return linkage; + } + Marker marker = foNode.ancestorMarker(); + if (marker == null) { linkage = new FOLinkageNormal(foNode); - foNode.setResult(linkage); + } else { + try { + linkage = new FOLinkageMarker(foNode); + } catch (AreaWException e) { + /* Ignore this. It should never happen as we have already tested + * for the condition that causes the exception, i.e. that foNode + * has no ancestor marker. */ + } } + foNode.setResult(linkage); return linkage; } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 21:44:44 UTC (rev 7541) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 22:37:53 UTC (rev 7542) @@ -178,8 +178,13 @@ */ public Area firstNormalAreaReturned(String id) { FObj fobj = retrieveId(id); - FOLinkageNormal proxy = linkage(fobj); - return proxy.firstNormalAreaReturned(); + FOLinkage linkage = linkage(fobj); + if (linkage instanceof FOLinkageNormal) { + FOLinkageNormal normalLinkage = (FOLinkageNormal) linkage; + return normalLinkage.firstNormalAreaReturned(); + } + /* Hopefully we can't reference ids in static content, right? */ + return null; } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2006-06-12 21:44:44 UTC (rev 7541) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2006-06-12 22:37:53 UTC (rev 7542) @@ -24,7 +24,6 @@ package org.foray.area; -import org.axsl.areaW.Area; import org.axsl.foR.FONode; import org.axsl.foR.fo.RetrieveMarker; Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-06-12 21:44:44 UTC (rev 7541) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-06-12 22:37:53 UTC (rev 7542) @@ -332,8 +332,14 @@ public org.axsl.areaW.SpanRA startingReferenceArea(FObj lastFObj, FObj nextFObj) throws AreaWException { if (lastFObj != null) { - Area lastArea = (Area) linkage(lastFObj) - .getLastAreaGeneratedBy(); + FOLinkage linkage = linkage(lastFObj); + FOLinkageNormal normalLinkage = null; + if (linkage instanceof FOLinkageNormal) { + normalLinkage = (FOLinkageNormal) linkage; + } else { + throw new AreaWException("retrieve-marker in flow"); + } + Area lastArea = normalLinkage.getLastAreaGeneratedBy(); SpanRA lastSpan = lastArea.ancestorSpanRA(); return lastSpan.spanForNextFO(nextFObj); } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-12 21:44:44 UTC (rev 7541) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-12 22:37:53 UTC (rev 7542) @@ -530,9 +530,11 @@ * @return True if the first area returned by marker is on this page. */ private boolean startsHere(Marker marker) { - FObj parent = marker.parentFO(); - FOLinkageNormal proxy = linkage(parent); - Area firstArea = (Area) proxy.firstNormalAreaReturned(); + FOLinkageNormal normalLinkage = this.markerParentLinkage(marker); + if (normalLinkage == null) { + return false; + } + Area firstArea = normalLinkage.firstNormalAreaReturned(); if (firstArea == null) { return false; } @@ -547,9 +549,11 @@ * @return True if the last area returned by marker is on this page. */ private boolean endsHere(Marker marker) { - FObj parent = marker.parentFO(); - FOLinkageNormal proxy = linkage(parent); - Area lastArea = (Area) proxy.lastNormalAreaReturned(); + FOLinkageNormal normalLinkage = this.markerParentLinkage(marker); + if (normalLinkage == null) { + return false; + } + Area lastArea = normalLinkage.lastNormalAreaReturned(); if (lastArea == null) { return false; } @@ -559,6 +563,16 @@ return false; } + private FOLinkageNormal markerParentLinkage(Marker marker) { + FObj parent = marker.parentFO(); + FOLinkage proxy = linkage(parent); + if (proxy instanceof FOLinkageNormal) { + return (FOLinkageNormal) proxy; + } + /* This would mean nested markers. Should never happen. */ + return null; + } + public SimplePageMaster getPageMaster() { // Cast verified at construction. return (SimplePageMaster) this.traitGeneratedBy(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 21:44:50
|
Revision: 7541 Author: victormote Date: 2006-06-12 14:44:44 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7541&view=rev Log Message: ----------- Conform to axsl changes: Remove need to know which Marker generated the Areas. The AreaTree should already know this. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 21:44:36 UTC (rev 7540) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 21:44:44 UTC (rev 7541) @@ -31,7 +31,6 @@ import org.axsl.foR.FOContext; import org.axsl.foR.FONode; import org.axsl.foR.FObj; -import org.axsl.foR.fo.Marker; import org.axsl.foR.fo.RetrieveMarker; import org.axsl.fontR.FontConsumer; import org.axsl.text.TextServer; @@ -110,7 +109,7 @@ } if (this.generatedBy instanceof FOLinkageMarker) { FOLinkageMarker linkageMarker = (FOLinkageMarker) this.generatedBy; - RetrieveMarker retrieveMarker = this.getRetrieveMarker(null); + RetrieveMarker retrieveMarker = this.getRetrieveMarker(); return linkageMarker.getNormalLinkage(retrieveMarker); } /* TODO: Consider throwing an Exception. This shouldn't happen. */ @@ -444,8 +443,9 @@ return nearest.crIPD(); } - public RetrieveMarker getRetrieveMarker(Marker marker) { - return null; + public RetrieveMarker getRetrieveMarker() { + /* TODO: Remove the Marker from the parameters here, as unnecessary. */ + return this.generatedBy.getRetrieveMarker(this); } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java 2006-06-12 21:44:36 UTC (rev 7540) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java 2006-06-12 21:44:44 UTC (rev 7541) @@ -26,6 +26,7 @@ import org.axsl.foR.FONode; import org.axsl.foR.FONodeResult; +import org.axsl.foR.fo.RetrieveMarker; /** * Abstract superclass for classes that handle the linkage between the FO Tree @@ -44,4 +45,6 @@ return this.foGenerator; } + public abstract RetrieveMarker getRetrieveMarker(AreaNode areaNode); + } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 21:44:36 UTC (rev 7540) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 21:44:44 UTC (rev 7541) @@ -31,6 +31,8 @@ import org.axsl.foR.fo.RetrieveMarker; import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; /** * <p>Handles linkage to the FO Tree for the specialized case of fo:marker @@ -92,4 +94,17 @@ return newLinkage; } + public RetrieveMarker getRetrieveMarker(AreaNode areaNode) { + Iterator iterator = this.map.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry entrySet = (Map.Entry) iterator.next(); + FOLinkageNormal normalLinkage = + (FOLinkageNormal) entrySet.getValue(); + if (normalLinkage.contains(areaNode)) { + return (RetrieveMarker) entrySet.getValue(); + } + } + return null; + } + } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2006-06-12 21:44:36 UTC (rev 7540) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2006-06-12 21:44:44 UTC (rev 7541) @@ -25,8 +25,8 @@ package org.foray.area; import org.axsl.areaW.Area; -import org.axsl.areaW.AreaNode; import org.axsl.foR.FONode; +import org.axsl.foR.fo.RetrieveMarker; import java.util.ArrayList; @@ -50,7 +50,7 @@ } public void registerGeneratedArea(AreaNode areaNode) { - AreaNode parent = areaNode.getWritableParent(); + AreaNode parent = areaNode.getAreaNodeParent(); if (parent != null) { /* * If the parent was generated by the same FObj, then we shouldn't @@ -188,4 +188,18 @@ return null; } + public RetrieveMarker getRetrieveMarker(AreaNode areaNode) { + return null; + } + + public boolean contains(AreaNode areaNode) { + for (int i = 0; i < this.generatedAreas.size(); i++) { + Object object = this.generatedAreas.get(i); + if (object == areaNode) { + return true; + } + } + return false; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 21:44:41
|
Revision: 7540 Author: victormote Date: 2006-06-12 14:44:36 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7540&view=rev Log Message: ----------- Conform to axsl changes: Remove need to know which Marker generated the Areas. The AreaTree should already know this. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2006-06-12 20:57:14 UTC (rev 7539) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2006-06-12 21:44:36 UTC (rev 7540) @@ -30,7 +30,6 @@ import org.axsl.foR.FOContext; import org.axsl.foR.FONodeProxy; import org.axsl.foR.FONodeResult; -import org.axsl.foR.FOTreeException; import org.axsl.foR.fo.RetrieveMarker; import javax.swing.tree.TreeNode; @@ -59,13 +58,14 @@ TreeNode parent = this.getParent(); if (parent instanceof Marker) { if (context == null) { + /* TODO: Consider throwing an Exception. This should NOT + * happen. */ return realParent(); } - Marker marker = (Marker) parent; - RetrieveMarker retrieve; - try { - retrieve = context.getRetrieveMarker(marker); - } catch (FOTreeException e) { + RetrieveMarker retrieve = context.getRetrieveMarker(); + if (retrieve == null) { + /* TODO: Consider throwing an Exception. This should NOT + * happen. */ return realParent(); } if (retrieve instanceof org.foray.fotree.fo.obj.RetrieveMarker) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 20:57:23
|
Revision: 7539 Author: victormote Date: 2006-06-12 13:57:14 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7539&view=rev Log Message: ----------- Allow generatedBy to be any FOLinkage subclass. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 20:37:10 UTC (rev 7538) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 20:57:14 UTC (rev 7539) @@ -50,7 +50,7 @@ /* * The "generated-by" trait, as defined in Section 6.1.1. */ - protected FOLinkageNormal generatedBy; + protected FOLinkage generatedBy; /** * Constructor. @@ -66,7 +66,7 @@ getAreaNodeParent().getChildren().add(this); // Root can't do this because the AreaTreeControl isn't registered. this.generatedBy = linkage(generatedBy); - this.generatedBy.registerGeneratedArea(this); + this.getNormalLinkage().registerGeneratedArea(this); } } @@ -85,7 +85,7 @@ // Remove from the Area Tree getAreaNodeParent().removeChild(this); // Remove from the FO-Area Tree cross-reference. - this.generatedBy.unregisterGeneratedArea(this); + this.getNormalLinkage().unregisterGeneratedArea(this); } public void removeChild(org.axsl.areaW.AreaNode areaNode) { @@ -104,19 +104,32 @@ return linkage; } + public FOLinkageNormal getNormalLinkage() { + if (this.generatedBy instanceof FOLinkageNormal) { + return (FOLinkageNormal) this.generatedBy; + } + if (this.generatedBy instanceof FOLinkageMarker) { + FOLinkageMarker linkageMarker = (FOLinkageMarker) this.generatedBy; + RetrieveMarker retrieveMarker = this.getRetrieveMarker(null); + return linkageMarker.getNormalLinkage(retrieveMarker); + } + /* TODO: Consider throwing an Exception. This shouldn't happen. */ + return null; + } + protected org.axsl.areaW.AreaNode getPreviousChildOfGeneratedBy() { - return generatedBy.getPreviousGeneratedBy(this); + return this.getNormalLinkage().getPreviousGeneratedBy(this); } protected org.axsl.areaW.AreaNode getNextChildOfGeneratedBy() { - return generatedBy.getNextGeneratedBy(this); + return this.getNormalLinkage().getNextGeneratedBy(this); } protected boolean isFirstChildOfGeneratedBy() { - return generatedBy.isFirstGeneratedBy(this); + return this.getNormalLinkage().isFirstGeneratedBy(this); } protected boolean isLastChildOfGeneratedBy() { - return generatedBy.isLastGeneratedBy(this); + return this.getNormalLinkage().isLastGeneratedBy(this); } public AreaTree getAreaTree() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 20:37:10 UTC (rev 7538) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 20:57:14 UTC (rev 7539) @@ -81,7 +81,7 @@ * has been stored. */ this.generatedBy = linkage(root); - this.generatedBy.registerGeneratedArea(this); + this.getNormalLinkage().registerGeneratedArea(this); } public org.axsl.areaW.PageCollection makePageCollection( @@ -115,7 +115,7 @@ } public Root getRoot() { - FOLinkageNormal linkage = this.generatedBy; + FOLinkageNormal linkage = this.getNormalLinkage(); /* Cast verified at construction. */ return (Root) linkage.getFONode(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 20:37:17
|
Revision: 7538 Author: victormote Date: 2006-06-12 13:37:10 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7538&view=rev Log Message: ----------- Make linkage creation and retrieval method static. It is really a convenience method. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 17:46:37 UTC (rev 7537) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 20:37:10 UTC (rev 7538) @@ -92,7 +92,7 @@ this.children.remove(areaNode); } - protected FOLinkageNormal linkage(FONode foNode) { + public static FOLinkageNormal linkage(FONode foNode) { if (foNode == null) { return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 17:46:42
|
Revision: 7537 Author: victormote Date: 2006-06-12 10:46:37 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7537&view=rev Log Message: ----------- Handle null input better. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 17:42:27 UTC (rev 7536) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 17:46:37 UTC (rev 7537) @@ -80,6 +80,9 @@ } public FOLinkageNormal getNormalLinkage(RetrieveMarker retrieveMarker) { + if (retrieveMarker == null) { + return null; + } Object object = this.map.get(retrieveMarker); if (object != null) { return (FOLinkageNormal) object; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |