foray-commit Mailing List for FOray (Page 262)
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-05-31 17:27:24
|
Revision: 7336 Author: victormote Date: 2006-05-31 10:27:05 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7336&view=rev Log Message: ----------- Conform to axsl change: Add method returning child item cast as an FONode. 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-05-31 16:51:34 UTC (rev 7335) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2006-05-31 17:27:05 UTC (rev 7336) @@ -99,4 +99,11 @@ } } + /** + * {@inheritDoc} + */ + public org.axsl.foR.FONode getFONodeChildAt(int childIndex) { + return (FONode) super.getChildAt(childIndex); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 16:51:48
|
Revision: 7335 Author: victormote Date: 2006-05-31 09:51:34 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7335&view=rev Log Message: ----------- Add some validation code. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCell.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCell.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCell.java 2006-05-31 16:37:48 UTC (rev 7334) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCell.java 2006-05-31 16:51:34 UTC (rev 7335) @@ -106,4 +106,19 @@ return true; } + public void end() throws FOTreeException { + if (this.children.size() < 1) { + this.throwException(getFullName() + + " must have at least one child"); + } + /* The content model requires that all children be %block content. */ + for (int i = 0; i < this.children.size(); i++) { + FObj fobj = (FObj) this.children.get(i); + if (! fobj.isContentBlock()) { + this.throwException(fobj.getContextMessage(), + "Child of " + getFullName() + " must be %block."); + } + } + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 16:38:10
|
Revision: 7334 Author: victormote Date: 2006-05-31 09:37:48 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7334&view=rev Log Message: ----------- Add some documentation. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java Added Paths: ----------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/package.html Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-05-31 00:17:29 UTC (rev 7333) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-05-31 16:37:48 UTC (rev 7334) @@ -25,14 +25,16 @@ package org.foray.pioneer; import org.axsl.areaW.Area; -import org.axsl.areaW.LineArea; -import org.axsl.areaW.NormalBlockArea; - import org.axsl.areaW.AreaNode; import org.axsl.areaW.AreaWException; import org.axsl.areaW.FOLinkage; +import org.axsl.areaW.LineArea; +import org.axsl.areaW.NormalBlockArea; +import org.axsl.areaW.TableCellArea; +import org.axsl.areaW.TableRowContainer; import org.axsl.foR.FONode; import org.axsl.foR.FObj; +import org.axsl.foR.fo.TableCell; import org.axsl.text.TextException; import org.axsl.text.line.LineBreaker; import org.axsl.text.line.LineNonText; @@ -121,6 +123,25 @@ return this.layout.getLayoutProxy(node); } + /** + * Each FONodePL subclass implements this method on a manner appropriate + * for its content. + * @param area The Area in which the contents to be laid out by this should + * be placed. + * For example, for {@link TableCellPL} layout method, <code>area</code> + * should be a {@link TableRowContainer}. + * 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. + * @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 + * to be laid out. + * For FObj subclasses, this indicates the index to the last child that was + * successfully laid out plus one, that is, it marks the next child that + * should be laid out. + * @throws AreaWException + */ public abstract int layout(Area area) throws AreaWException; public Log getLogger() { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-31 00:17:29 UTC (rev 7333) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-31 16:37:48 UTC (rev 7334) @@ -77,7 +77,24 @@ import java.util.ArrayList; /** - * Class to manage the layout logic. + * <p>The LayoutStrategy implementation for the Pioneer layout strategy. + * The Pioneer layout strategy is an "eager" layout strategy, which is to + * say that it is built more for speed and simplicity than for full + * conformance with the XSL-FO standard. + * The general flow of the Pioneer layout strategy is as follows:</p> + * + * <ul> + * <li>Each parent FO lays its children FOs out within Areas that it creates + * for them, successively traversing deeper into the FOTree until the leaves + * are reached.</li> + * <li>The process of creating new LineAreas is managed by the layout system + * (as opposed to the AreaTree).</li> + * <li>When LineAreas can no longer be created, the status of the item being + * laid out is recorded and control is returned back up the FOTree until the + * PageSequence is reached.</li> + * <li>A new page is created.</li> + * <li>Using the status markers as guides, layout control is returned to the + * place where it previously left off.</li> */ public class PioneerLS extends LayoutStrategy { Added: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/package.html =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/package.html (rev 0) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/package.html 2006-05-31 16:37:48 UTC (rev 7334) @@ -0,0 +1,8 @@ +<html> +<title>Package org.foray.pioneer</title> +<body> +<p>Classes for the Pioneer layout strategy. Pioneer is an "eager" layout +strategy, that is, it generally lays content out immediately and then +presses forward.</p> +</body> +</html> Property changes on: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/package.html ___________________________________________________________________ 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-05-31 00:17:33
|
Revision: 7333 Author: victormote Date: 2006-05-30 17:17:29 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7333&view=rev Log Message: ----------- Extract method for clarity and possible move. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-05-31 00:05:41 UTC (rev 7332) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-05-31 00:17:29 UTC (rev 7333) @@ -72,18 +72,10 @@ } public boolean layoutFootnote(PageArea p) { + RegionRABody bac = p.getWritableRegionBody(); + FootnoteRA footArea = bac.getWritableFootnoteRA(); try { - RegionRABody bac = p.getWritableRegionBody(); - FootnoteRA footArea = bac.getWritableFootnoteRA(); - if (!footArea.hasChildren()) { - PageSequence pageSeq = bac.getWritablePage().getPageSequence(); - StaticContent separator = pageSeq.getFootnoteSeparator(); - if (separator != null) { - StaticContentPL staticPL - = (StaticContentPL) getLayoutProxy(separator); - staticPL.layout(footArea); - } - } + layoutFootnoteSeparator(bac, footArea); int status = layout(footArea); if (Status.isIncomplete(status)) { // add as a pending footnote @@ -95,4 +87,21 @@ return true; } + private void layoutFootnoteSeparator(RegionRABody bac, FootnoteRA footArea) + 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()) { + return; + } + PageSequence pageSeq = bac.getWritablePage().getPageSequence(); + StaticContent separator = pageSeq.getFootnoteSeparator(); + if (separator == null) { + return; + } + StaticContentPL staticPL = (StaticContentPL) + getLayoutProxy(separator); + staticPL.layout(footArea); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 00:05:52
|
Revision: 7332 Author: victormote Date: 2006-05-30 17:05:41 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7332&view=rev Log Message: ----------- Remove method that seems to do nothing, and which is an AreaTree responsibility in any case. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-05-30 23:46:58 UTC (rev 7331) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-05-31 00:05:41 UTC (rev 7332) @@ -36,8 +36,6 @@ import org.axsl.foR.fo.PageSequence; import org.axsl.foR.fo.StaticContent; -import java.util.List; - /** * */ @@ -77,7 +75,6 @@ try { RegionRABody bac = p.getWritableRegionBody(); FootnoteRA footArea = bac.getWritableFootnoteRA(); - int oldHeight = footArea.crBPD(); if (!footArea.hasChildren()) { PageSequence pageSeq = bac.getWritablePage().getPageSequence(); StaticContent separator = pageSeq.getFootnoteSeparator(); @@ -85,10 +82,6 @@ StaticContentPL staticPL = (StaticContentPL) getLayoutProxy(separator); staticPL.layout(footArea); - int diff = footArea.crBPD() - oldHeight; - Area ar = bac.getWritableMainRA(); - decreaseMaxHeight(ar, diff); - oldHeight = footArea.crBPD(); } } int status = layout(footArea); @@ -96,23 +89,10 @@ // add as a pending footnote return false; } - Area ar = bac.getWritableMainRA(); - decreaseMaxHeight(ar, footArea.crBPD() - oldHeight); } catch (AreaWException exception) { return false; } return true; } - protected void decreaseMaxHeight(Area ar, int change) { - List children = ar.getChildren(); - for (int i = 0; i < children.size(); i++) { - Object obj = children.get(i); - if (obj instanceof Area) { - Area childArea = (Area)obj; - decreaseMaxHeight(childArea, change); - } - } - } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 23:47:08
|
Revision: 7331 Author: victormote Date: 2006-05-30 16:46:58 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7331&view=rev Log Message: ----------- Remove unneeded parameter. Modified Paths: -------------- 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/PioneerLS.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-05-30 23:10:18 UTC (rev 7330) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-05-30 23:46:58 UTC (rev 7331) @@ -73,8 +73,7 @@ return Status.OK; } - public boolean layoutFootnote(PageArea p, Area area) { -// FootnoteBody fb = getFO(); + public boolean layoutFootnote(PageArea p) { try { RegionRABody bac = p.getWritableRegionBody(); FootnoteRA footArea = bac.getWritableFootnoteRA(); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java 2006-05-30 23:10:18 UTC (rev 7330) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java 2006-05-30 23:46:58 UTC (rev 7331) @@ -69,7 +69,7 @@ FootnoteBodyPL fbPL = ((FootnoteBodyPL) getLayoutProxy(fbody)); PageArea page = area.getWritablePage(); - fbPL.layoutFootnote(page, area); + fbPL.layoutFootnote(page); } return Status.OK; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 23:10:18 UTC (rev 7330) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 23:46:58 UTC (rev 7331) @@ -153,7 +153,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, null)) { + if (! fbPL.layoutFootnote(pageArea)) { // footnotes are too large to fit on empty page } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 23:10:28
|
Revision: 7330 Author: victormote Date: 2006-05-30 16:10:18 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7330&view=rev Log Message: ----------- Conform to axsl changes: Allow the AreaTree to overflow to a new page if the client app wants it to. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-30 23:10:09 UTC (rev 7329) +++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-30 23:10:18 UTC (rev 7330) @@ -50,16 +50,10 @@ } /** - * Create a new line area to add inline objects. - * This should be called after getting the current line area - * and discovering that the inline object will not fit inside the current - * line. This method will create a new line area to place the inline - * object into. - * This will return null if the new line cannot fit into the block area. - * - * @return the new current line area, which will be empty. + * {@inheritDoc} */ - public org.axsl.areaW.LineArea createNextLineArea() { + public org.axsl.areaW.LineArea createNextLineArea(boolean allowOverflow) + throws AreaWException { /* The size of the next line does not need to consider the half-leading * that follows the line. That half-leading will be automatically * handled if the line is actually created, but can safely be ignored @@ -68,7 +62,13 @@ + this.traitHalfLeadingOpt(); if (sizeNextLineArea > this.progressionDimensionAvailable()) { - return null; + if (allowOverflow) { + NormalBlockArea newArea = (NormalBlockArea) + this.getOverflowArea(this); + return newArea.createNextLineArea(allowOverflow); + } else { + return null; + } } return new LineArea(traitGeneratedBy(), this); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 23:10:15
|
Revision: 7329 Author: victormote Date: 2006-05-30 16:10:09 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7329&view=rev Log Message: ----------- Conform to axsl changes: Allow the AreaTree to overflow to a new page if the client app wants it to. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-05-30 22:30:09 UTC (rev 7328) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-05-30 23:10:09 UTC (rev 7329) @@ -155,9 +155,10 @@ * * @return the line area to be used to add inline objects */ - public LineArea getCurrentLineArea(NormalBlockArea blockArea) { + public LineArea getCurrentLineArea(NormalBlockArea blockArea) + throws AreaWException { if (this.currentLineArea == null) { - this.currentLineArea = blockArea.createNextLineArea(); + this.currentLineArea = blockArea.createNextLineArea(false); } return this.currentLineArea; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-05-30 22:30:09 UTC (rev 7328) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-05-30 23:10:09 UTC (rev 7329) @@ -195,7 +195,7 @@ // It did not fit on the line. Create new line & try again. NormalBlockArea blockArea = (NormalBlockArea) lineArea.getWritableParentArea(); - lineArea = (LineArea) blockArea.createNextLineArea(); + lineArea = (LineArea) blockArea.createNextLineArea(false); BlockPL blockPL = this.layout.getBlockPL(blockArea); blockPL.currentLineArea = lineArea; Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-05-30 22:30:09 UTC (rev 7328) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-05-30 23:10:09 UTC (rev 7329) @@ -80,7 +80,7 @@ while (start != -1) { BlockPL blockPL = this.layout.getBlockPL(ba); blockPL.getCurrentLineArea(ba).verticalAlign(); - la = ba.createNextLineArea(); + la = ba.createNextLineArea(false); blockPL.currentLineArea = la; if (la == null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 22:30:15
|
Revision: 7328 Author: victormote Date: 2006-05-30 15:30:09 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7328&view=rev Log Message: ----------- Conform to axsl changes: Remove layout-related items from interface. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-30 22:29:58 UTC (rev 7327) +++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-30 22:30:09 UTC (rev 7328) @@ -45,34 +45,11 @@ implements org.axsl.areaR.NormalBlockArea, org.axsl.areaW.NormalBlockArea { - /* TODO: This is a layout concept and should not be in AreaTree? */ - private LineArea currentLineArea; - public NormalBlockArea(FObj parentFObj, Area parentArea) { super(parentFObj, parentArea); } /** - * Get the current line area in this block area. - * This is used to get the current line area for adding - * inline objects. - * This will return null if there is not enough room left - * in the block area to accomodate the line area. - * - * @return the line area to be used to add inline objects - */ - public LineArea getCurrentLineArea() { - if (this.currentLineArea == null) { - return (LineArea) createNextLineArea(); - } - return this.currentLineArea; - } - - public org.axsl.areaW.LineArea getWritableCurrentLineArea() { - return getCurrentLineArea(); - } - - /** * Create a new line area to add inline objects. * This should be called after getting the current line area * and discovering that the inline object will not fit inside the current @@ -93,23 +70,9 @@ > this.progressionDimensionAvailable()) { return null; } - this.currentLineArea = new LineArea(traitGeneratedBy(), this); - return this.currentLineArea; + return new LineArea(traitGeneratedBy(), this); } - /** - * Notify this block that the area has completed layout. - * Indicates the the block has been fully laid out, this will - * add (if any) the current line area. - */ - public void completeCurrentLine() { - if (this.currentLineArea == null) { - return; - } - this.currentLineArea.verticalAlign(); - this.currentLineArea = null; - } - public byte getAreaType() { return AreaNode.AREATYPE_BLOCK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 22:30:05
|
Revision: 7327 Author: victormote Date: 2006-05-30 15:29:58 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7327&view=rev Log Message: ----------- Conform to axsl changes: Remove layout-related items from interface. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.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/PioneerLS.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-05-30 22:15:38 UTC (rev 7326) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-05-30 22:29:58 UTC (rev 7327) @@ -25,9 +25,9 @@ package org.foray.pioneer; import org.axsl.areaW.Area; +import org.axsl.areaW.AreaWException; +import org.axsl.areaW.LineArea; import org.axsl.areaW.NormalBlockArea; - -import org.axsl.areaW.AreaWException; import org.axsl.foR.FONode; import org.axsl.foR.FObj; import org.axsl.foR.fo.Block; @@ -46,6 +46,8 @@ public int infLoopThreshhold = 50; public boolean breakStatusBeforeChecked = false; + public LineArea currentLineArea; + public BlockPL(FObj realFObj, PioneerLS layout) { super(realFObj, layout); } @@ -144,4 +146,33 @@ return getFO().getFontConsumer(); } + /** + * Get the current line area in this block area. + * This is used to get the current line area for adding + * inline objects. + * This will return null if there is not enough room left + * in the block area to accomodate the line area. + * + * @return the line area to be used to add inline objects + */ + public LineArea getCurrentLineArea(NormalBlockArea blockArea) { + if (this.currentLineArea == null) { + this.currentLineArea = blockArea.createNextLineArea(); + } + return this.currentLineArea; + } + + /** + * Notify this block that the area has completed layout. + * Indicates the the block has been fully laid out, this will + * add (if any) the current line area. + */ + public void completeCurrentLine() { + if (this.currentLineArea == null) { + return; + } + this.currentLineArea.verticalAlign(); + this.currentLineArea = null; + } + } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-05-30 22:15:38 UTC (rev 7326) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-05-30 22:29:58 UTC (rev 7327) @@ -196,6 +196,9 @@ NormalBlockArea blockArea = (NormalBlockArea) lineArea.getWritableParentArea(); lineArea = (LineArea) blockArea.createNextLineArea(); + BlockPL blockPL = this.layout.getBlockPL(blockArea); + blockPL.currentLineArea = lineArea; + if (lineArea == null) { return Status.AREA_FULL_SOME; } @@ -228,7 +231,8 @@ throw new AreaWException("Layout of inline objects must be inside " + "a block:\n" + fobj.getContextMessage()); } - return blockArea.getWritableCurrentLineArea(); + BlockPL blockPL = this.layout.getBlockPL(blockArea); + return blockPL.getCurrentLineArea(blockArea); } public FONode getFONode() { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-05-30 22:15:38 UTC (rev 7326) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-05-30 22:29:58 UTC (rev 7327) @@ -78,8 +78,10 @@ NormalBlockArea ba = la.ancestorWritableNormalBlockArea(); start = addTextItemToLine(la, lineText, start, end); while (start != -1) { - ba.getWritableCurrentLineArea().verticalAlign(); + BlockPL blockPL = this.layout.getBlockPL(ba); + blockPL.getCurrentLineArea(ba).verticalAlign(); la = ba.createNextLineArea(); + blockPL.currentLineArea = la; if (la == null) { return start; Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 22:15:38 UTC (rev 7326) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 22:29:58 UTC (rev 7327) @@ -98,8 +98,9 @@ return (BlockPL) block.getProxy(); } - public void completeCurrentLineInBlock(NormalBlockArea area) { - area.completeCurrentLine(); + public void completeCurrentLineInBlock(NormalBlockArea blockArea) { + BlockPL blockPL = getBlockPL(blockArea); + blockPL.completeCurrentLine(); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 22:15:43
|
Revision: 7326 Author: victormote Date: 2006-05-30 15:15:38 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7326&view=rev Log Message: ----------- Add method that converts a NormalBlockArea to its layout proxy. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 21:14:30 UTC (rev 7325) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 22:15:38 UTC (rev 7326) @@ -93,6 +93,11 @@ super(logger); } + public BlockPL getBlockPL(NormalBlockArea blockArea) { + FObj block = blockArea.traitGeneratedBy(); + return (BlockPL) block.getProxy(); + } + public void completeCurrentLineInBlock(NormalBlockArea area) { area.completeCurrentLine(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 21:14:36
|
Revision: 7325 Author: victormote Date: 2006-05-30 14:14:30 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7325&view=rev Log Message: ----------- Roll up an unnecessary method. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-05-30 20:10:49 UTC (rev 7324) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-05-30 21:14:30 UTC (rev 7325) @@ -78,7 +78,9 @@ NormalBlockArea ba = la.ancestorWritableNormalBlockArea(); start = addTextItemToLine(la, lineText, start, end); while (start != -1) { - la = layout.createNextLineArea(ba); + ba.getWritableCurrentLineArea().verticalAlign(); + la = ba.createNextLineArea(); + if (la == null) { return start; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 20:10:49 UTC (rev 7324) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 21:14:30 UTC (rev 7325) @@ -25,7 +25,6 @@ package org.foray.pioneer; import org.axsl.areaW.Area; -import org.axsl.areaW.LineArea; import org.axsl.areaW.NormalBlockArea; import org.axsl.areaW.NormalFlowRA; import org.axsl.areaW.PageArea; @@ -98,12 +97,6 @@ area.completeCurrentLine(); } - public LineArea createNextLineArea(NormalBlockArea blockArea) - throws AreaWException { - blockArea.getWritableCurrentLineArea().verticalAlign(); - return (LineArea) blockArea.createNextLineArea(); - } - /** * Runs the formatting of this page sequence into the given area tree */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 20:10:53
|
Revision: 7324 Author: victormote Date: 2006-05-30 13:10:49 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7324&view=rev Log Message: ----------- Conform to axsl changes: Remove unneeded method. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-30 20:10:42 UTC (rev 7323) +++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-30 20:10:49 UTC (rev 7324) @@ -53,20 +53,6 @@ } /** - * Add a Line Area to this block area. - * Used internally to add a completed line area to this block area - * when either a new line area is created or this block area is - * completed. - * - * @param la the LineArea to add - */ - public void addLineArea(org.axsl.areaW.LineArea la) { - if (!la.isEmpty()) { - la.verticalAlign(); - } - } - - /** * Get the current line area in this block area. * This is used to get the current line area for adding * inline objects. @@ -120,7 +106,7 @@ if (this.currentLineArea == null) { return; } - this.addLineArea(this.currentLineArea); + this.currentLineArea.verticalAlign(); this.currentLineArea = null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 20:10:47
|
Revision: 7323 Author: victormote Date: 2006-05-30 13:10:42 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7323&view=rev Log Message: ----------- Conform to axsl changes: Remove unneeded method. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 18:42:11 UTC (rev 7322) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 20:10:42 UTC (rev 7323) @@ -100,7 +100,7 @@ public LineArea createNextLineArea(NormalBlockArea blockArea) throws AreaWException { - blockArea.addLineArea(blockArea.getWritableCurrentLineArea()); + blockArea.getWritableCurrentLineArea().verticalAlign(); return (LineArea) blockArea.createNextLineArea(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 18:42:16
|
Revision: 7322 Author: victormote Date: 2006-05-30 11:42:11 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7322&view=rev Log Message: ----------- Conform to axsl change: Remove more footnote-related logic from interface. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-30 18:42:03 UTC (rev 7321) +++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-30 18:42:11 UTC (rev 7322) @@ -31,9 +31,6 @@ import org.axsl.foR.fo.ListItemLabel; import org.axsl.foR.fo.RegionBody; -import java.util.ArrayList; -import java.util.List; - /** * This class represents a Block Area. * A block area is made up of a sequence of Line Areas. @@ -51,9 +48,6 @@ /* TODO: This is a layout concept and should not be in AreaTree? */ private LineArea currentLineArea; - /* TODO: This is a layout concept and should not be in AreaTree? */ - private ArrayList pendingFootnotes = null; - public NormalBlockArea(FObj parentFObj, Area parentArea) { super(parentFObj, parentArea); } @@ -212,22 +206,6 @@ return Math.max(labelBPD, bodyBPD); } - public List getPendingFootnotes() { - return this.pendingFootnotes; - } - - public void setPendingFootnotes(List newFootnotes) { - if (newFootnotes == null) { - this.pendingFootnotes = null; - return; - } - if (newFootnotes instanceof ArrayList) { - this.pendingFootnotes = (ArrayList) newFootnotes; - return; - } - this.pendingFootnotes = new ArrayList(newFootnotes); - } - public LineArea getPreviousLineArea(LineArea lineArea) { if (this.children == 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-05-30 18:42:14
|
Revision: 7321 Author: victormote Date: 2006-05-30 11:42:03 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7321&view=rev Log Message: ----------- Conform to axsl change: Remove more footnote-related logic from interface. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 18:30:17 UTC (rev 7320) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 18:42:03 UTC (rev 7321) @@ -76,7 +76,6 @@ import org.apache.commons.logging.Log; import java.util.ArrayList; -import java.util.List; /** * Class to manage the layout logic. @@ -97,33 +96,14 @@ public void completeCurrentLineInBlock(NormalBlockArea area) { area.completeCurrentLine(); - addPendingFootnotes(area); } public LineArea createNextLineArea(NormalBlockArea blockArea) throws AreaWException { blockArea.addLineArea(blockArea.getWritableCurrentLineArea()); - addPendingFootnotes(blockArea); return (LineArea) blockArea.createNextLineArea(); } - public void addPendingFootnotes(NormalBlockArea area) { - // add pending footnotes - List pendingFootnotes = area.getPendingFootnotes(); - if (pendingFootnotes == null) { - return; - } - for (int i = 0; i < pendingFootnotes.size(); i++) { - FootnoteBody fb = (FootnoteBody) pendingFootnotes.get(i); - FootnoteBodyPL fbPL = ((FootnoteBodyPL) getLayoutProxy(fb)); - PageArea page = area.getWritablePage(); - if (! fbPL.layoutFootnote(page, area)) { - addPendingFootnote(fb); - } - } - area.setPendingFootnotes(null); - } - /** * Runs the formatting of this page sequence into the given area tree */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 18:30:27
|
Revision: 7320 Author: victormote Date: 2006-05-30 11:30:17 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7320&view=rev Log Message: ----------- Conform to axsl change: Remove more footnote-related logic from interface. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-30 18:30:08 UTC (rev 7319) +++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-30 18:30:17 UTC (rev 7320) @@ -26,7 +26,6 @@ import org.axsl.areaW.AreaWException; import org.axsl.foR.FObj; -import org.axsl.foR.fo.FootnoteBody; import org.axsl.foR.fo.ListItem; import org.axsl.foR.fo.ListItemBody; import org.axsl.foR.fo.ListItemLabel; @@ -131,13 +130,6 @@ this.currentLineArea = null; } - public void addFootnote(FootnoteBody fb) { - if (pendingFootnotes == null) { - pendingFootnotes = new ArrayList(); - } - pendingFootnotes.add(fb); - } - public byte getAreaType() { return AreaNode.AREATYPE_BLOCK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 18:30:17
|
Revision: 7319 Author: victormote Date: 2006-05-30 11:30:08 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7319&view=rev Log Message: ----------- Conform to axsl change: Remove more footnote-related logic from interface. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java 2006-05-30 18:18:54 UTC (rev 7318) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java 2006-05-30 18:30:08 UTC (rev 7319) @@ -64,7 +64,7 @@ FootnoteBody fbody = node.getFootnoteBody(); // add footnote to current page or next if it can't fit if (area instanceof NormalBlockArea) { - ((NormalBlockArea)area).addFootnote(fbody); + this.layout.addPendingFootnote(fbody); } else { FootnoteBodyPL fbPL = ((FootnoteBodyPL) getLayoutProxy(fbody)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 18:19:08
|
Revision: 7318 Author: victormote Date: 2006-05-30 11:18:54 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7318&view=rev Log Message: ----------- Conform to axsl change: Remove pending footnote concepts from the Page. These should be tracked in the layout system. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-05-30 18:18:47 UTC (rev 7317) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-05-30 18:18:54 UTC (rev 7318) @@ -30,7 +30,6 @@ import org.axsl.areaW.AreaWException; import org.axsl.common.Constants; import org.axsl.foR.FObj; -import org.axsl.foR.fo.FootnoteBody; import org.axsl.foR.fo.Marker; import org.axsl.foR.fo.PageSequence; import org.axsl.foR.fo.Region; @@ -57,8 +56,6 @@ protected int pageNumber = 0; protected String formattedPageNumber; - private ArrayList footnotes = null; - private ArrayList markers = null; PageRA(SimplePageMaster spm, PageCollection areaTree) { @@ -161,25 +158,6 @@ return traitGeneratedBy().traitPageWidth(); } - public List getPendingFootnotes() { - return footnotes; - } - - public void setPendingFootnotes(List footnotes) { - if (footnotes instanceof ArrayList) { - this.footnotes = (ArrayList) footnotes; - } else { - this.footnotes = new ArrayList(footnotes); - } - } - - public void addPendingFootnote(FootnoteBody fb) { - if (footnotes == null) { - footnotes = new ArrayList(); - } - footnotes.add(fb); - } - public void registerMarker(Marker marker) { markers.add(marker); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-30 18:18:53
|
Revision: 7317 Author: victormote Date: 2006-05-30 11:18:47 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7317&view=rev Log Message: ----------- Conform to axsl change: Remove pending footnote concepts from the Page. These should be tracked in the layout system. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-29 22:34:48 UTC (rev 7316) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-05-30 18:18:47 UTC (rev 7317) @@ -75,6 +75,7 @@ import org.apache.commons.logging.Log; +import java.util.ArrayList; import java.util.List; /** @@ -84,6 +85,9 @@ private LineBreaker currentLineBreaker; + /* A FIFO queue of footnotes yet to be laid out. */ + private ArrayList pendingFootnotes = new ArrayList(); + /** * Constructor. */ @@ -114,7 +118,7 @@ FootnoteBodyPL fbPL = ((FootnoteBodyPL) getLayoutProxy(fb)); PageArea page = area.getWritablePage(); if (! fbPL.layoutFootnote(page, area)) { - page.addPendingFootnote(fb); + addPendingFootnote(fb); } } area.setPendingFootnotes(null); @@ -150,12 +154,7 @@ /* TODO: Remove cast from following line. */ PageArea newPage = (PageArea) pageCollection.getNextPage(false, false, isBlankPage); - if (currentPage != null) { - List foots = currentPage.getPendingFootnotes(); - if (foots != null) { - setPendingFootnotes(newPage, foots); - } - } + setPendingFootnotes(newPage); currentPage = newPage; /* * Because of markers, lay out the fo:flow first, then the @@ -171,18 +170,15 @@ pageCollection.padPagesAtEnd(); } - public void setPendingFootnotes(PageArea pageArea, List footnotes) { - pageArea.setPendingFootnotes(footnotes); - if (footnotes != null) { - for (int i = 0; i < footnotes.size(); i++) { - FootnoteBody fb = (FootnoteBody)footnotes.get(i); - FootnoteBodyPL fbPL = ((FootnoteBodyPL) fb.getProxy()); - if (! fbPL.layoutFootnote(pageArea, null)) { - // footnotes are too large to fit on empty page - } + public void setPendingFootnotes(PageArea pageArea) { + 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, null)) { + // footnotes are too large to fit on empty page } - footnotes = null; } + this.pendingFootnotes.clear(); } public void layoutStaticContent(PageSequence pageSequence, Region region, @@ -604,4 +600,8 @@ return proxy; } + public void addPendingFootnote(FootnoteBody fb) { + pendingFootnotes.add(fb); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-29 22:34:55
|
Revision: 7316 Author: victormote Date: 2006-05-29 15:34:48 -0700 (Mon, 29 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7316&view=rev Log Message: ----------- Conform to renamed axsl method. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2006-05-29 22:34:40 UTC (rev 7315) +++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2006-05-29 22:34:48 UTC (rev 7316) @@ -70,7 +70,7 @@ return this.beforeFloatReferenceArea; } - public org.axsl.areaW.FootnoteRA getWritableFootnoteReferenceArea() { + public org.axsl.areaW.FootnoteRA getWritableFootnoteRA() { return footnoteReferenceArea; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-29 22:34:48
|
Revision: 7315 Author: victormote Date: 2006-05-29 15:34:40 -0700 (Mon, 29 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7315&view=rev Log Message: ----------- Conform to renamed axsl method. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-05-29 22:16:41 UTC (rev 7314) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-05-29 22:34:40 UTC (rev 7315) @@ -77,7 +77,7 @@ // FootnoteBody fb = getFO(); try { RegionRABody bac = p.getWritableRegionBody(); - FootnoteRA footArea = bac.getWritableFootnoteReferenceArea(); + FootnoteRA footArea = bac.getWritableFootnoteRA(); int oldHeight = footArea.crBPD(); if (!footArea.hasChildren()) { PageSequence pageSeq = bac.getWritablePage().getPageSequence(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-29 22:16:47
|
Revision: 7314 Author: victormote Date: 2006-05-29 15:16:41 -0700 (Mon, 29 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7314&view=rev Log Message: ----------- Use new axsl methods to simplify layout logic for Footnote. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java 2006-05-29 22:15:59 UTC (rev 7313) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java 2006-05-29 22:16:41 UTC (rev 7314) @@ -29,7 +29,6 @@ import org.axsl.areaW.PageArea; import org.axsl.areaW.AreaWException; -import org.axsl.foR.FONode; import org.axsl.foR.fo.Footnote; import org.axsl.foR.fo.FootnoteBody; import org.axsl.foR.fo.Inline; @@ -49,38 +48,29 @@ public int layout(Area area) throws AreaWException { Footnote node = getFO(); - Inline inline = null; - FootnoteBody fbody = null; if (getProgress() == FONodePL.START) { setProgress(0); } - int numChildren = node.childrenFO().size(); - for (int i = getProgress(); i < numChildren; i++) { - FONode fo = (FONode)node.childrenFO().get(i); - if (fo instanceof Inline) { - inline = (Inline) fo; - FObjMixedPL inlinePL = (FObjMixedPL) getLayoutProxy(inline); - int status = inlinePL.layout(area); - if (Status.isIncomplete(status)) { - return status; - } - } else if (inline != null && fo instanceof FootnoteBody) { - // add footnote to current page or next if it can't fit - fbody = (FootnoteBody) fo; - if (area instanceof NormalBlockArea) { - ((NormalBlockArea)area).addFootnote(fbody); - } else { - FootnoteBodyPL fbPL - = ((FootnoteBodyPL) getLayoutProxy(fbody)); - PageArea page = area.getWritablePage(); - fbPL.layoutFootnote(page, area); - } - } + + /* Layout the Inline. */ + Inline inline = node.getInline(); + FObjMixedPL inlinePL = (FObjMixedPL) getLayoutProxy(inline); + int status = inlinePL.layout(area); + if (Status.isIncomplete(status)) { + return status; } - if (fbody == null) { - layout.getLogger().error("no footnote-body in footnote"); + + /* Layout the FootnoteBody. */ + FootnoteBody fbody = node.getFootnoteBody(); + // add footnote to current page or next if it can't fit + if (area instanceof NormalBlockArea) { + ((NormalBlockArea)area).addFootnote(fbody); + } else { + FootnoteBodyPL fbPL + = ((FootnoteBodyPL) getLayoutProxy(fbody)); + PageArea page = area.getWritablePage(); + fbPL.layoutFootnote(page, area); } - if (area instanceof NormalBlockArea) {} 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-05-29 22:16:06
|
Revision: 7313 Author: victormote Date: 2006-05-29 15:15:59 -0700 (Mon, 29 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7313&view=rev Log Message: ----------- 1. Conform to new axsl requirements regarding fo:footnote children. 2. Add validation logic to Footnote to ensure that children fit the content model and to expedite subsequent processing. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java 2006-05-29 21:49:32 UTC (rev 7312) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java 2006-05-29 22:15:59 UTC (rev 7313) @@ -59,4 +59,27 @@ return true; } + public void end() throws FOTreeException { + if (this.children.size() != 2) { + throwException("fo:footnote requires exactly two children."); + } + if (! (this.children.get(0) instanceof Inline)) { + throwException("First child of fo:footnote must be an fo:inline."); + } + if (! (this.children.get(1) instanceof FootnoteBody)) { + throwException("Second child of fo:footnote must be an " + + "fo:footnote-body."); + } + } + + public org.axsl.foR.fo.Inline getInline() { + /* Cast and index are guaranteed in the end() method. */ + return (Inline) this.children.get(0); + } + + public org.axsl.foR.fo.FootnoteBody getFootnoteBody() { + /* Cast and index are guaranteed in the end() method. */ + return (FootnoteBody) this.children.get(1); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-29 21:49:38
|
Revision: 7312 Author: victormote Date: 2006-05-29 14:49:32 -0700 (Mon, 29 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7312&view=rev Log Message: ----------- Handle axsl changes regarding cursor positioning methods. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.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-05-29 21:49:18 UTC (rev 7311) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2006-05-29 21:49:32 UTC (rev 7312) @@ -29,9 +29,13 @@ import org.axsl.common.Constants; import org.axsl.foR.FObj; - +/** + * Common superclass for all areas generated by inline formatting objects. + * This should not be confused with the more specific class {@link InlineArea} + * which specifically handles areas generated by the fo:inline object. + */ public abstract class AbstractInlineArea extends AreaFlexible - implements GeneralInlineArea{ + implements GeneralInlineArea { public AbstractInlineArea(FObj generatedBy, Area parentArea) { super(generatedBy, parentArea); @@ -65,12 +69,17 @@ return crOriginX() + this.ancestorLineArea().alignmentAdjustment(); } - public int alignmentPointX() { - return this.ancestorLineArea().alignmentPointX(); + public int baselineX() { + return this.rrOriginX(); } - public int alignmentPointY() { - return this.ancestorLineArea().alignmentPointY(); + public int baselineY() { + return this.ancestorLineArea().alignmentPointY() + - this.traitBaselineShift(); } + public int traitBaselineShift() { + return traitGeneratedBy().traitBaselineShift(); + } + } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-05-29 21:49:18 UTC (rev 7311) +++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-05-29 21:49:32 UTC (rev 7312) @@ -564,7 +564,16 @@ } /** - * {@inheritDoc} + * Provides the number which would, when added to the before-edge of the + * line-area in the block-progression-dimension, produce the + * alignment-point for text on this line. + * We believe the alignment point, which is defined in XSL-FO Standard 1.0, + * Section 7.8.1, to be the same point which is described in the PDF + * Reference, Second Edition, Section 5.1.3, as the "glyph origin". + * Renderers should rely on this behavior. + * @return The distance, in millipoints, between the before-edge of this + * line-area and a line parallel to it that runs through the + * alignment-point. */ public int alignmentPointOffset() { int axis = this.getWritingMode().getAbsoluteAxis(Constants.AXIS_IP); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |