foray-commit Mailing List for FOray
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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
(9) |
2
(2) |
3
(17) |
4
(13) |
5
(3) |
6
(2) |
|
7
|
8
(58) |
9
(28) |
10
|
11
|
12
|
13
|
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
|
21
|
22
|
23
|
24
(15) |
25
(7) |
26
(35) |
27
(2) |
|
28
|
29
(21) |
30
(15) |
31
(23) |
|
|
|
|
From: <vic...@us...> - 2006-05-31 23:18:51
|
Revision: 7354 Author: victormote Date: 2006-05-31 16:18:47 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7354&view=rev Log Message: ----------- Output the RGB values as floats between 0 and 1 instead of ints between 0 and 255. Modified Paths: -------------- trunk/foray/foray-ps/src/java/org/foray/ps/PSColor.java Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSColor.java =================================================================== --- trunk/foray/foray-ps/src/java/org/foray/ps/PSColor.java 2006-05-31 23:13:09 UTC (rev 7353) +++ trunk/foray/foray-ps/src/java/org/foray/ps/PSColor.java 2006-05-31 23:18:47 UTC (rev 7354) @@ -59,32 +59,34 @@ private static String toPS_RGB(Color color, boolean fillNotStroke, String eol) { StringBuffer buffer = new StringBuffer(""); - // according to pdfspec 12.1 p.399 - // if the colors are the same then just use the g or G operator - boolean same = false; + + /* According to pdfspec 12.1 p.399, if the colors are the same then + * just use the g or G operator (DeviceGray). */ + boolean isGray = false; if (color.getRed() == color.getGreen() && color.getRed() == color.getBlue()) { - same = true; + isGray = true; } - // output RGB + float[] rgbColors = color.getComponents(null); + // fill if (fillNotStroke) { - if (same) { - buffer.append(PSReal.doubleOut(color.getRed()) + " g" + eol); + if (isGray) { + buffer.append(PSReal.doubleOut(rgbColors[0]) + " g" + eol); } else { - buffer.append(PSReal.doubleOut(color.getRed()) + " " - + PSReal.doubleOut(color.getGreen()) + " " - + PSReal.doubleOut(color.getBlue()) + buffer.append(PSReal.doubleOut(rgbColors[0]) + " " + + PSReal.doubleOut(rgbColors[1]) + " " + + PSReal.doubleOut(rgbColors[2]) + " rg" + eol); } // stroke/border } else { - if (same) { - buffer.append(PSReal.doubleOut(color.getRed()) + " G" + eol); + if (isGray) { + buffer.append(PSReal.doubleOut(rgbColors[0]) + " G" + eol); } else { - buffer.append(PSReal.doubleOut(color.getRed()) + " " - + PSReal.doubleOut(color.getGreen()) + " " - + PSReal.doubleOut(color.getBlue()) + buffer.append(PSReal.doubleOut(rgbColors[0]) + " " + + PSReal.doubleOut(rgbColors[1]) + " " + + PSReal.doubleOut(rgbColors[2]) + " RG" + eol); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 23:13:13
|
Revision: 7353 Author: victormote Date: 2006-05-31 16:13:09 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7353&view=rev Log Message: ----------- Split big method into four smaller ones, for clarity. Modified Paths: -------------- trunk/foray/foray-ps/src/java/org/foray/ps/PSColor.java Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSColor.java =================================================================== --- trunk/foray/foray-ps/src/java/org/foray/ps/PSColor.java 2006-05-31 22:34:56 UTC (rev 7352) +++ trunk/foray/foray-ps/src/java/org/foray/ps/PSColor.java 2006-05-31 23:13:09 UTC (rev 7353) @@ -41,67 +41,86 @@ * @return The PostScript code that represents this color. */ public static String toPS(Color color, boolean fillNotStroke, String eol) { - StringBuffer p = new StringBuffer(""); + int colorSpace = color.getColorSpace().getType(); + switch (colorSpace) { + case ColorSpace.TYPE_RGB: { + return toPS_RGB(color, fillNotStroke, eol); + } + case ColorSpace.TYPE_CMYK: { + return toPS_CMYK(color, fillNotStroke, eol); + } + default: { + return toPS_Gray(color, fillNotStroke, eol); + } + } + } - // colorspace is RGB - if (color.getColorSpace().getType() == ColorSpace.TYPE_RGB) { - // according to pdfspec 12.1 p.399 - // if the colors are the same then just use the g or G operator - boolean same = false; - if (color.getRed() == color.getGreen() - && color.getRed() == color.getBlue()) { - same = true; - } - // output RGB - // fill - if (fillNotStroke) { - if (same) { - p.append(PSReal.doubleOut(color.getRed()) + " g" + eol); - } else { - p.append(PSReal.doubleOut(color.getRed()) + " " - + PSReal.doubleOut(color.getGreen()) + " " - + PSReal.doubleOut(color.getBlue()) - + " rg" + eol); - } - // stroke/border + /* Colorspace is RGB. */ + private static String toPS_RGB(Color color, boolean fillNotStroke, + String eol) { + StringBuffer buffer = new StringBuffer(""); + // according to pdfspec 12.1 p.399 + // if the colors are the same then just use the g or G operator + boolean same = false; + if (color.getRed() == color.getGreen() + && color.getRed() == color.getBlue()) { + same = true; + } + // output RGB + // fill + if (fillNotStroke) { + if (same) { + buffer.append(PSReal.doubleOut(color.getRed()) + " g" + eol); } else { - if (same) { - p.append(PSReal.doubleOut(color.getRed()) + " G" + eol); - } else { - p.append(PSReal.doubleOut(color.getRed()) + " " - + PSReal.doubleOut(color.getGreen()) + " " - + PSReal.doubleOut(color.getBlue()) - + " RG" + eol); - } + buffer.append(PSReal.doubleOut(color.getRed()) + " " + + PSReal.doubleOut(color.getGreen()) + " " + + PSReal.doubleOut(color.getBlue()) + + " rg" + eol); } - } /* end of RGB */ - else if (color.getColorSpace().getType() == ColorSpace.TYPE_CMYK) { - // colorspace is CMYK - float[] cmykColors = color.getComponents(null); - if (fillNotStroke) { // fill - p.append(PSReal.doubleOut(cmykColors[0]) + " " - + PSReal.doubleOut(cmykColors[1]) + " " - + PSReal.doubleOut(cmykColors[2]) + " " - + PSReal.doubleOut(cmykColors[3]) + " k" + eol); - } else { // fill - p.append(PSReal.doubleOut(cmykColors[0]) + " " - + PSReal.doubleOut(cmykColors[1]) + " " - + PSReal.doubleOut(cmykColors[2]) + " " - + PSReal.doubleOut(cmykColors[3]) + " K" + eol); - } - - } /* end of CMYK */ - // means we're in DeviceGray or Unknown. - // assume we're in DeviceGray, because otherwise we're screwed. - else if (color.getColorSpace().getType() == ColorSpace.CS_GRAY) { - float[] grayColors = color.getComponents(null); - if (fillNotStroke) { - p.append(PSReal.doubleOut(grayColors[0]) + " g" + eol); + // stroke/border + } else { + if (same) { + buffer.append(PSReal.doubleOut(color.getRed()) + " G" + eol); } else { - p.append(PSReal.doubleOut(grayColors[0]) + " G" + eol); + buffer.append(PSReal.doubleOut(color.getRed()) + " " + + PSReal.doubleOut(color.getGreen()) + " " + + PSReal.doubleOut(color.getBlue()) + + " RG" + eol); } } - return (p.toString()); + return buffer.toString(); } + /* Colorspace is CMYK. */ + private static String toPS_CMYK(Color color, boolean fillNotStroke, + String eol) { + StringBuffer buffer = new StringBuffer(""); + float[] cmykColors = color.getComponents(null); + if (fillNotStroke) { // fill + buffer.append(PSReal.doubleOut(cmykColors[0]) + " " + + PSReal.doubleOut(cmykColors[1]) + " " + + PSReal.doubleOut(cmykColors[2]) + " " + + PSReal.doubleOut(cmykColors[3]) + " k" + eol); + } else { // fill + buffer.append(PSReal.doubleOut(cmykColors[0]) + " " + + PSReal.doubleOut(cmykColors[1]) + " " + + PSReal.doubleOut(cmykColors[2]) + " " + + PSReal.doubleOut(cmykColors[3]) + " K" + eol); + } + return buffer.toString(); + } + + /* Colorspace is DeviceGray. */ + private static String toPS_Gray(Color color, boolean fillNotStroke, + String eol) { + StringBuffer buffer = new StringBuffer(""); + float[] grayColors = color.getComponents(null); + if (fillNotStroke) { + buffer.append(PSReal.doubleOut(grayColors[0]) + " g" + eol); + } else { + buffer.append(PSReal.doubleOut(grayColors[0]) + " G" + eol); + } + return buffer.toString(); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 22:35:03
|
Revision: 7352 Author: victormote Date: 2006-05-31 15:34:56 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7352&view=rev Log Message: ----------- If the color has already been used in this document reuse it instead of creating a new one. Modified Paths: -------------- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java =================================================================== --- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2006-05-31 22:34:23 UTC (rev 7351) +++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2006-05-31 22:34:56 UTC (rev 7352) @@ -32,7 +32,6 @@ package org.foray.pdf.object; -import org.foray.pdf.object.PDFEncryption; import org.foray.pdf.PDFGraphicsState; import org.axsl.fontR.Font; @@ -184,6 +183,8 @@ /** List of PDFFont instances that have been used by this document. */ private ArrayList usedFonts = new ArrayList(); + private ArrayList usedColors = new ArrayList(); + /** * Constructor which creates an empty PDF document. * The constructor creates a /Root and /Pages object to @@ -612,7 +613,16 @@ * {@inheritDoc} */ public PDFColor createPDFColor(Color color) { - return new org.foray.pdf.object.PDFColor(color); + org.foray.pdf.object.PDFColor pdfColor = null; + for (int i = 0; i < this.usedColors.size(); i++) { + pdfColor = (org.foray.pdf.object.PDFColor) this.usedColors.get(i); + if (pdfColor.getColor().equals(color)) { + return pdfColor; + } + } + pdfColor = new org.foray.pdf.object.PDFColor(color); + this.usedColors.add(pdfColor); + return pdfColor; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 22:34:28
|
Revision: 7351 Author: victormote Date: 2006-05-31 15:34:23 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7351&view=rev Log Message: ----------- Make new local variable to assist debugging. Modified Paths: -------------- trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java Modified: trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java =================================================================== --- trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2006-05-31 21:45:25 UTC (rev 7350) +++ trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2006-05-31 22:34:23 UTC (rev 7351) @@ -273,8 +273,8 @@ } /* Set the color. */ - PDFColor areaColor = this.getPDFDocument().createPDFColor( - area.traitColor()); + Color color = area.traitColor(); + PDFColor areaColor = this.getPDFDocument().createPDFColor(color); getContentStream().setStrokeColor(areaColor); /* Set word-spacing and letter-spacing. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 21:45:31
|
Revision: 7350 Author: victormote Date: 2006-05-31 14:45:25 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7350&view=rev Log Message: ----------- Make document valid. Modified Paths: -------------- trunk/foray/resource/fo-examples/footnotes/simple.fo Modified: trunk/foray/resource/fo-examples/footnotes/simple.fo =================================================================== --- trunk/foray/resource/fo-examples/footnotes/simple.fo 2006-05-31 21:35:14 UTC (rev 7349) +++ trunk/foray/resource/fo-examples/footnotes/simple.fo 2006-05-31 21:45:25 UTC (rev 7350) @@ -19,16 +19,16 @@ <fo:flow flow-name="xsl-region-body"> <fo:block space-after.optimum="1.5em" font-weight="bold" font-size="16pt" text-align="center"> Footnotes</fo:block> - <fo:block space.before.optimum=".5em">The pages in this document are + <fo:block space-before.optimum=".5em">The pages in this document are deliberately short, to force more frequent page breaks.</fo:block> - <fo:block color="red" space.before.optimum=".5em"> This paragraph should + <fo:block color="red" space-before.optimum=".5em"> This paragraph should be rendered in red, and the related footnote should be rendered in maroon.<fo:footnote><fo:inline font-size="6pt" vertical-align="super">1</fo:inline><fo:footnote-body> <fo:block color="maroon"> 1. This footnote should be rendered in maroon, and should be tied to a paragraph that is rendered in red.</fo:block> </fo:footnote-body></fo:footnote></fo:block> - <fo:block color="green" space.before.optimum=".5em"> This paragraph + <fo:block color="green" space-before.optimum=".5em"> This paragraph should be rendered in green, and the related footnote should be rendered in dark green.<fo:footnote> <fo:inline font-size="6pt" vertical-align="super">2</fo:inline> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 21:35:27
|
Revision: 7349 Author: victormote Date: 2006-05-31 14:35:14 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7349&view=rev Log Message: ----------- Implement and use new axsl interfaces for Lists. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java 2006-05-31 21:35:03 UTC (rev 7348) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java 2006-05-31 21:35:14 UTC (rev 7349) @@ -25,9 +25,9 @@ package org.foray.pioneer; import org.axsl.areaW.Area; +import org.axsl.areaW.AreaWException; +import org.axsl.areaW.ListBlockArea; import org.axsl.areaW.NormalBlockArea; - -import org.axsl.areaW.AreaWException; import org.axsl.foR.fo.ListBlock; import org.axsl.foR.fo.ListItem; @@ -55,7 +55,7 @@ } } - NormalBlockArea blockArea = area.makeNormalBlockArea(node); + ListBlockArea blockArea = area.makeListBlockArea(node); 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-05-31 21:35:03 UTC (rev 7348) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java 2006-05-31 21:35:14 UTC (rev 7349) @@ -25,9 +25,10 @@ package org.foray.pioneer; import org.axsl.areaW.Area; +import org.axsl.areaW.AreaWException; +import org.axsl.areaW.ListBlockArea; +import org.axsl.areaW.ListItemArea; import org.axsl.areaW.NormalBlockArea; - -import org.axsl.areaW.AreaWException; import org.axsl.foR.fo.ListItem; import org.axsl.foR.fo.ListItemBody; import org.axsl.foR.fo.ListItemLabel; @@ -55,13 +56,14 @@ public int layout(NormalBlockArea area) throws AreaWException { ListItem node = getFO(); + ListBlockArea listBlockArea = (ListBlockArea) area; if (getProgress() == FONodePL.START) { setProgress(0); } layout.completeCurrentLineInBlock(area); - NormalBlockArea group = area.makeNormalBlockArea(node); + ListItemArea group = listBlockArea.makeListItemArea(node); /* Now lay out the list-item-label inside the new block-area. */ ListItemLabel label = (ListItemLabel)node.childrenFO().get(0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 21:35:15
|
Revision: 7348 Author: victormote Date: 2006-05-31 14:35:03 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7348&view=rev Log Message: ----------- Implement and use new axsl interfaces for Lists. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java Added Paths: ----------- trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-05-31 20:22:02 UTC (rev 7347) +++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-05-31 21:35:03 UTC (rev 7348) @@ -25,12 +25,15 @@ package org.foray.area; import org.axsl.areaW.AreaWException; +import org.axsl.areaW.ListBlockArea; import org.axsl.areaW.NormalBlockArea; import org.axsl.areaW.TableArea; import org.axsl.common.Constants; import org.axsl.foR.FObj; import org.axsl.foR.WritingMode; import org.axsl.foR.fo.BasicLink; +import org.axsl.foR.fo.Block; +import org.axsl.foR.fo.ListBlock; import org.axsl.foR.fo.Table; import org.axsl.fontR.Font; import org.axsl.fontR.FontUse; @@ -1165,8 +1168,12 @@ return new org.foray.area.TableRA(table, this); } - public NormalBlockArea makeNormalBlockArea(FObj fobj) { - return new org.foray.area.NormalBlockArea(fobj, this); + public NormalBlockArea makeNormalBlockArea(Block block) { + return new org.foray.area.NormalBlockArea(block, this); } + public ListBlockArea makeListBlockArea(ListBlock listBlock) { + return new org.foray.area.ListBlockArea(listBlock, this); + } + } Added: trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java (rev 0) +++ trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java 2006-05-31 21:35:03 UTC (rev 7348) @@ -0,0 +1,41 @@ +/* + * 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.area; + +import org.axsl.foR.fo.ListBlock; +import org.axsl.foR.fo.ListItem; + +public class ListBlockArea extends NormalBlockArea + implements org.axsl.areaW.ListBlockArea { + + public ListBlockArea(ListBlock parentFObj, Area parentArea) { + super(parentFObj, parentArea); + } + + public org.axsl.areaW.ListItemArea makeListItemArea(ListItem listItem) { + return new ListItemArea(listItem, this); + } + +} Property changes on: trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native Added: trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java (rev 0) +++ trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java 2006-05-31 21:35:03 UTC (rev 7348) @@ -0,0 +1,36 @@ +/* + * 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.area; + +import org.axsl.foR.fo.ListItem; + +public class ListItemArea extends NormalBlockArea + implements org.axsl.areaW.ListItemArea { + + public ListItemArea(ListItem parentFObj, Area parentArea) { + super(parentFObj, parentArea); + } + +} Property changes on: trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.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-05-31 20:42:16
|
Revision: 7342 Author: victormote Date: 2006-05-31 12:10:21 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7342&view=rev Log Message: ----------- Conform to axsl change: Eliminate duplicate method by clarifying that only FObj instances need an explicit record of who generated them. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.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-05-31 18:38:27 UTC (rev 7341) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-05-31 19:10:21 UTC (rev 7342) @@ -131,7 +131,7 @@ this.children.remove(areaNode); } - protected FOrayFOLinkage getFObjProxy(FONode fobj) { + protected FOrayFOLinkage getFObjProxy(FObj fobj) { if (fobj == null) { return null; } @@ -447,7 +447,7 @@ return true; } - public FOLinkage getFOLinkage(FONode foNode) { + public FOLinkage getFOLinkage(FObj foNode) { FOrayFOLinkage linkage = (FOrayFOLinkage) foNode.getResult(); if (linkage == null) { linkage = new FOrayFOLinkage(foNode); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java 2006-05-31 18:38:27 UTC (rev 7341) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java 2006-05-31 19:10:21 UTC (rev 7342) @@ -28,6 +28,7 @@ import org.axsl.areaW.AreaNode; import org.axsl.areaW.FOLinkage; import org.axsl.foR.FONode; +import org.axsl.foR.FObj; import java.util.ArrayList; @@ -38,7 +39,7 @@ public class FOrayFOLinkage implements FOLinkage { /** The FONode which generated the Areas in {@link #generatedAreas}. */ - private FONode realFONode; + private FObj realFONode; /** * The ordered list of Area instances generated by {@link #realFONode}. @@ -48,7 +49,7 @@ */ private ArrayList generatedAreas = new ArrayList(); - public FOrayFOLinkage(FONode realFObj) { + public FOrayFOLinkage(FObj realFObj) { this.realFONode = realFObj; } @@ -63,7 +64,7 @@ * If the parent was generated by the same FObj, then we shouldn't * register this one also. */ - if (areaNode.getGeneratedBy() == parent.getGeneratedBy()) { + if (areaNode.traitGeneratedBy() == parent.traitGeneratedBy()) { return; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 20:42:12
|
Revision: 7343 Author: victormote Date: 2006-05-31 12:12:25 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7343&view=rev Log Message: ----------- Remove unneeded 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-05-31 19:10:21 UTC (rev 7342) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-05-31 19:12:25 UTC (rev 7343) @@ -29,7 +29,6 @@ import org.axsl.areaW.FOLinkage; import org.axsl.areaW.PageArea; import org.axsl.common.Constants; -import org.axsl.foR.FONode; import org.axsl.foR.FObj; import org.axsl.fontR.FontConsumer; import org.axsl.text.TextServer; @@ -170,10 +169,6 @@ return (org.axsl.areaW.AreaNode) getParent(); } - public FONode getGeneratedBy() { - return this.generatedBy.getFONode(); - } - public org.axsl.areaW.Area getWritableParentArea() { return (org.axsl.areaW.Area) getParentArea(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 20:22:08
|
Revision: 7347 Author: victormote Date: 2006-05-31 13:22:02 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7347&view=rev Log Message: ----------- Conform to axsl changes: Move creation of the table sub-areas (header, body, footer) to the Table area interface. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-05-31 20:21:49 UTC (rev 7346) +++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-05-31 20:22:02 UTC (rev 7347) @@ -27,16 +27,11 @@ import org.axsl.areaW.AreaWException; import org.axsl.areaW.NormalBlockArea; import org.axsl.areaW.TableArea; -import org.axsl.areaW.TableFooterContainer; -import org.axsl.areaW.TableHeaderContainer; import org.axsl.common.Constants; import org.axsl.foR.FObj; import org.axsl.foR.WritingMode; import org.axsl.foR.fo.BasicLink; import org.axsl.foR.fo.Table; -import org.axsl.foR.fo.TableBody; -import org.axsl.foR.fo.TableFooter; -import org.axsl.foR.fo.TableHeader; import org.axsl.fontR.Font; import org.axsl.fontR.FontUse; import org.axsl.graphicR.Graphic; @@ -1166,22 +1161,6 @@ return true; } - public org.axsl.areaW.TableBodyContainer makeTableBodyContainer( - TableBody tableBody) { - return new org.foray.area.TableBodyContainer(tableBody, this); - } - - public TableHeaderContainer makeTableHeaderContainer( - TableHeader tableHeader) { - return new org.foray.area.TableHeaderContainer(tableHeader, this); - - } - - public TableFooterContainer makeTableFooterContainer( - TableFooter tableFooter) { - return new org.foray.area.TableFooterContainer(tableFooter, this); - } - public TableArea makeTableArea(Table table) { return new org.foray.area.TableRA(table, this); } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-05-31 20:21:49 UTC (rev 7346) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-05-31 20:22:02 UTC (rev 7347) @@ -26,9 +26,14 @@ import org.axsl.areaR.TableArea; import org.axsl.areaW.TableColumnArea; +import org.axsl.areaW.TableFooterContainer; +import org.axsl.areaW.TableHeaderContainer; import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.Table; +import org.axsl.foR.fo.TableBody; import org.axsl.foR.fo.TableColumn; +import org.axsl.foR.fo.TableFooter; +import org.axsl.foR.fo.TableHeader; public class TableRA extends NormalBlockArea implements TableArea, org.axsl.areaW.TableArea { @@ -111,4 +116,20 @@ return new TableColumnRA(tableColumn, this); } + public org.axsl.areaW.TableBodyContainer makeTableBodyContainer( + TableBody tableBody) { + return new org.foray.area.TableBodyContainer(tableBody, this); + } + + public TableHeaderContainer makeTableHeaderContainer( + TableHeader tableHeader) { + return new org.foray.area.TableHeaderContainer(tableHeader, this); + + } + + public TableFooterContainer makeTableFooterContainer( + TableFooter tableFooter) { + return new org.foray.area.TableFooterContainer(tableFooter, this); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 20:21:59
|
Revision: 7346 Author: victormote Date: 2006-05-31 13:21:49 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7346&view=rev Log Message: ----------- Conform to axsl changes: Move creation of the table sub-areas (header, body, footer) to the Table area interface. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.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-05-31 19:42:17 UTC (rev 7345) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-05-31 20:21:49 UTC (rev 7346) @@ -25,12 +25,12 @@ package org.foray.pioneer; import org.axsl.areaW.Area; +import org.axsl.areaW.AreaWException; import org.axsl.areaW.BlockContainerRA; import org.axsl.areaW.ContainerRA; import org.axsl.areaW.GenericContainer; import org.axsl.areaW.NormalBlockArea; - -import org.axsl.areaW.AreaWException; +import org.axsl.areaW.TableArea; import org.axsl.common.Constants; import org.axsl.foR.FONode; import org.axsl.foR.fo.AbstractTableBody; @@ -112,6 +112,7 @@ public int layout(Area area) throws AreaWException { AbstractTableBody node = getReal(); + TableArea tableArea = (TableArea) area; Table table = node.getNearestTable(); if (getProgress() == FONodePL.BREAK_AFTER) { return Status.OK; @@ -148,11 +149,14 @@ */ ContainerRA areaContainer = null; if (node instanceof TableBody) { - areaContainer = area.makeTableBodyContainer((TableBody) node); + areaContainer = tableArea.makeTableBodyContainer( + (TableBody) node); } else if (node instanceof TableHeader) { - areaContainer = area.makeTableHeaderContainer((TableHeader) node); + areaContainer = tableArea.makeTableHeaderContainer( + (TableHeader) node); } else if (node instanceof TableFooter) { - areaContainer = area.makeTableFooterContainer((TableFooter) node); + areaContainer = tableArea.makeTableFooterContainer( + (TableFooter) node); } areaContainerRef = new WeakReference(areaContainer); Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-05-31 19:42:17 UTC (rev 7345) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-05-31 20:21:49 UTC (rev 7346) @@ -41,7 +41,7 @@ /** * */ -public class TablePL extends FObjPL { +public class TablePL extends BlockPL { private static final int MINCOLWIDTH = 10000; // 10pt @@ -58,12 +58,12 @@ super(table, layout); } - public Table getFO() { + public Table getTableFO() { return (Table) this.getFONode(); } public int layout(Area area) throws AreaWException { - Table node = getFO(); + Table node = getTableFO(); if (getProgress() == FONodePL.BREAK_AFTER) { return Status.OK; } @@ -262,7 +262,7 @@ } private void layoutColumns(Area tableArea) throws AreaWException { - Table node = getFO(); + Table node = getTableFO(); for (int i = 0; i < node.getTableColumns().size(); i++) { TableColumn c = (TableColumn) node.getTableColumns().get(i); if (c != null) { @@ -290,7 +290,7 @@ public int calcFixedColumnWidths(TableArea tableArea, int maxAllocationWidth) { - Table node = getFO(); + Table node = getTableFO(); int tableWidth = node.getWidth(maxAllocationWidth); /* Accumulates the total table units used in columns in this table. */ double totalTableUnits = 0.0; @@ -418,7 +418,7 @@ * be factored into methods that override (but use) the FObj methods. */ private void setIPD(boolean bHasProportionalUnits, int maxAllocIPD) { - Table node = getFO(); + Table node = getTableFO(); if (node.traitIPDimensionMax(maxAllocIPD) >= 0) { this.maxIPD = node.traitIPDimensionMax(maxAllocIPD); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 19:42:52
|
Revision: 7345 Author: victormote Date: 2006-05-31 12:42:17 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7345&view=rev Log Message: ----------- Consolidate Area type constants in a new Common class. 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/BasicLinkArea.java trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTitleArea.java trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTreeArea.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/MainRA.java trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.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/TableColumnRA.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/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -42,47 +42,6 @@ public abstract class AreaNode extends OrderedTreeNode implements org.axsl.areaR.AreaNode, org.axsl.areaW.AreaNode { - public static final byte AREATYPE_BLOCK = 1; - public static final byte AREATYPE_FOREIGN_OBJECT = 2; - public static final byte AREATYPE_BLOCK_CONTAINER = 3; - public static final byte AREATYPE_BODY_AREA_CONTAINER = 4; - public static final byte AREATYPE_DISPLAY_SPACE = 5; - public static final byte AREATYPE_LINE = 6; - public static final byte AREATYPE_IMAGE = 7; - public static final byte AREATYPE_SVG = 8; - public static final byte AREATYPE_INLINE_SPACE = 9; - public static final byte AREATYPE_LEADER = 10; - public static final byte AREATYPE_WORD = 11; - public static final byte AREATYPE_EXTENSION = 12; - public static final byte AREATYPE_PAGE = 13; - public static final byte AREATYPE_PAGE_COLLECTION = 14; - public static final byte AREATYPE_REGION_RA = 15; - public static final byte AREATYPE_MAIN_RA = 16; - public static final byte AREATYPE_FOOTNOTE_RA = 17; - public static final byte AREATYPE_BEFORE_FLOAT_RA = 18; - public static final byte AREATYPE_SPAN_RA = 19; - public static final byte AREATYPE_COLUMN_RA = 20; - public static final byte AREATYPE_TABLE_RA = 21; - public static final byte AREATYPE_GENERIC_CONTAINER = 22; - public static final byte AREATYPE_TABLE_CELL_RA = 23; - public static final byte AREATYPE_AREA_TREE = 24; - public static final byte AREATYPE_TABLE_COLUMN_RA = 25; - public static final byte AREATYPE_TABLE_ROW_RA = 26; - public static final byte AREATYPE_TABLE_BODY_RA = 27; - public static final byte AREATYPE_TABLE_HEADER_RA = 28; - public static final byte AREATYPE_TABLE_FOOTER_RA = 29; - public static final byte AREATYPE_BOOKMARK = 30; - public static final byte AREATYPE_DESTINATION = 31; - public static final byte AREATYPE_BLOCK_GROUP = 32; - public static final byte AREATYPE_TEXT_AREA = 33; - public static final byte AREATYPE_PAGE_NUMBER_CITATION_AREA = 34; - public static final byte AREATYPE_BOOKMARK_TREE = 35; - public static final byte AREATYPE_BOOKMARK_TITLE = 36; - public static final byte AREATYPE_PAGE_NUMBER_AREA = 37; - public static final byte AREATYPE_INLINE = 38; - public static final byte AREATYPE_BASIC_LINK = 39; - public static final byte AREATYPE_TABLE_CONTROL = 40; - protected ArrayList children = new ArrayList(); /* Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -29,6 +29,7 @@ import org.axsl.areaW.AreaTreeListener; import org.axsl.areaW.AreaWException; import org.axsl.areaW.PageArea; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; import org.axsl.foR.fo.Bookmark; import org.axsl.foR.fo.BookmarkTitle; @@ -107,7 +108,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_AREA_TREE; + return ConstantsAreaTree.AREATYPE_AREA_TREE; } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BasicLinkArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/BasicLinkArea.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BasicLinkArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.BasicLink; /** @@ -38,7 +39,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_BASIC_LINK; + return ConstantsAreaTree.AREATYPE_BASIC_LINK; } 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-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.areaW.AreaWException; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; /** @@ -39,7 +40,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_BEFORE_FLOAT_RA; + return ConstantsAreaTree.AREATYPE_BEFORE_FLOAT_RA; } public int crBPD() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.areaR.BlockContainerArea; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; /** @@ -60,7 +61,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_BLOCK_CONTAINER; + return ConstantsAreaTree.AREATYPE_BLOCK_CONTAINER; } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.areaR.BookmarkTitleArea; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.Bookmark; /** @@ -38,7 +39,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_BOOKMARK; + return ConstantsAreaTree.AREATYPE_BOOKMARK; } public BookmarkTitleArea getBookmarkTitle() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTitleArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTitleArea.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTitleArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.BookmarkTitle; /** @@ -37,7 +38,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_BOOKMARK_TITLE; + return ConstantsAreaTree.AREATYPE_BOOKMARK_TITLE; } public String getTitleText() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTreeArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTreeArea.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTreeArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.BookmarkTree; /** @@ -37,7 +38,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_BOOKMARK_TREE; + return ConstantsAreaTree.AREATYPE_BOOKMARK_TREE; } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.ExternalGraphic; import org.axsl.graphicR.Graphic; @@ -45,7 +46,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_IMAGE; + return ConstantsAreaTree.AREATYPE_IMAGE; } public void initializeProgressionDimension() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.areaW.AreaWException; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; /** @@ -37,7 +38,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_FOOTNOTE_RA; + return ConstantsAreaTree.AREATYPE_FOOTNOTE_RA; } 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-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.ForeignXML; import org.axsl.foR.fo.InstreamForeignObject; import org.axsl.foR.svg.SVGElement; @@ -47,7 +48,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_FOREIGN_OBJECT; + return ConstantsAreaTree.AREATYPE_FOREIGN_OBJECT; } public boolean traitIsReferenceArea() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/GenericContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/GenericContainer.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/GenericContainer.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; public class GenericContainer extends ContainerRA @@ -53,7 +54,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_GENERIC_CONTAINER; + return ConstantsAreaTree.AREATYPE_GENERIC_CONTAINER; } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.Inline; /** @@ -38,7 +39,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_INLINE; + return ConstantsAreaTree.AREATYPE_INLINE; } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -28,6 +28,7 @@ import org.axsl.foR.fo.Leader; import org.axsl.common.Constants; +import org.axsl.common.ConstantsAreaTree; /** * An Area containing a leader item. @@ -63,7 +64,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_LEADER; + return ConstantsAreaTree.AREATYPE_LEADER; } /** 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-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -26,6 +26,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.common.Constants; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FONode; import org.axsl.foR.FOText; import org.axsl.foR.FObj; @@ -427,7 +428,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_LINE; + return ConstantsAreaTree.AREATYPE_LINE; } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -27,6 +27,7 @@ import org.axsl.areaR.MainReferenceArea; import org.axsl.areaW.AreaWException; import org.axsl.common.Constants; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; import org.axsl.foR.fo.Block; import org.axsl.foR.fo.BlockContainer; @@ -48,7 +49,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_MAIN_RA; + return ConstantsAreaTree.AREATYPE_MAIN_RA; } /** 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-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.areaW.AreaWException; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; import org.axsl.foR.fo.ListItem; import org.axsl.foR.fo.ListItemBody; @@ -74,7 +75,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_BLOCK; + return ConstantsAreaTree.AREATYPE_BLOCK; } public Area getOverflowArea(Area childRequesting) throws AreaWException { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -26,6 +26,7 @@ import org.axsl.areaR.NormalFlowArea; import org.axsl.areaW.AreaWException; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; /** @@ -56,7 +57,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_COLUMN_RA; + return ConstantsAreaTree.AREATYPE_COLUMN_RA; } public SpanRA getParentSpan() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -27,6 +27,7 @@ import org.axsl.areaW.AreaWException; import org.axsl.areaW.PageArea; import org.axsl.common.Constants; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FOTreeException; import org.axsl.foR.FObj; import org.axsl.foR.fo.PageSequence; @@ -303,7 +304,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_PAGE_COLLECTION; + return ConstantsAreaTree.AREATYPE_PAGE_COLLECTION; } public AreaTree getAreaTree() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; /** @@ -46,7 +47,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_PAGE_NUMBER_AREA; + return ConstantsAreaTree.AREATYPE_PAGE_NUMBER_AREA; } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; public class PageNumberCitationArea extends AbstractInlineArea @@ -49,7 +50,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_PAGE_NUMBER_CITATION_AREA; + return ConstantsAreaTree.AREATYPE_PAGE_NUMBER_CITATION_AREA; } /** 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-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -29,6 +29,7 @@ import org.axsl.areaR.RegionBodyArea; import org.axsl.areaW.AreaWException; import org.axsl.common.Constants; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; import org.axsl.foR.fo.Marker; import org.axsl.foR.fo.PageSequence; @@ -344,7 +345,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_PAGE; + return ConstantsAreaTree.AREATYPE_PAGE; } public int crIPD() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.areaR.RegionArea; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.Region; import org.axsl.foR.fo.RegionAfter; import org.axsl.foR.fo.RegionBefore; @@ -50,7 +51,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_REGION_RA; + return ConstantsAreaTree.AREATYPE_REGION_RA; } public int crBPD() { 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-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -28,6 +28,7 @@ import org.axsl.areaR.RegionBodyArea; import org.axsl.areaW.AreaWException; import org.axsl.common.Constants; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.RegionBody; import org.axsl.foR.fo.SimplePageMaster; @@ -73,7 +74,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_BODY_AREA_CONTAINER; + return ConstantsAreaTree.AREATYPE_BODY_AREA_CONTAINER; } public int crBPD() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SVGArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/SVGArea.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/SVGArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.areaW.AreaWException; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.svg.SVGElement; import org.w3c.dom.svg.SVGDocument; @@ -51,7 +52,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_SVG; + return ConstantsAreaTree.AREATYPE_SVG; } public Area getOverflowArea(Area childRequesting) throws AreaWException { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -27,6 +27,7 @@ import org.axsl.areaR.SpanArea; import org.axsl.areaW.AreaWException; import org.axsl.common.Constants; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; import org.axsl.foR.fo.RegionBody; @@ -119,7 +120,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_SPAN_RA; + return ConstantsAreaTree.AREATYPE_SPAN_RA; } public Area getOverflowArea(Area childRequesting) throws AreaWException { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableBodyContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableBodyContainer.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableBodyContainer.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; public class TableBodyContainer extends AbstractTableContainer @@ -51,7 +52,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_TABLE_BODY_RA; + return ConstantsAreaTree.AREATYPE_TABLE_BODY_RA; } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -27,6 +27,7 @@ import org.axsl.areaR.TableCellArea; import org.axsl.areaW.TableArea; import org.axsl.common.Constants; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.TableCell; public class TableCellRA extends ContainerRA implements TableCellArea, @@ -77,7 +78,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_TABLE_CELL_RA; + return ConstantsAreaTree.AREATYPE_TABLE_CELL_RA; } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableColumnRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableColumnRA.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableColumnRA.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -26,6 +26,7 @@ import org.axsl.areaR.TableColumnArea; import org.axsl.areaW.TableArea; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; import org.axsl.foR.fo.Table; import org.axsl.foR.fo.TableColumn; @@ -38,7 +39,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_TABLE_COLUMN_RA; + return ConstantsAreaTree.AREATYPE_TABLE_COLUMN_RA; } public int getComputedColumnWidth() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableFooterContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableFooterContainer.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableFooterContainer.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; public class TableFooterContainer extends AbstractTableContainer @@ -51,7 +52,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_TABLE_FOOTER_RA; + return ConstantsAreaTree.AREATYPE_TABLE_FOOTER_RA; } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableHeaderContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableHeaderContainer.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableHeaderContainer.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -24,6 +24,7 @@ package org.foray.area; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; public class TableHeaderContainer extends AbstractTableContainer @@ -51,7 +52,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_TABLE_HEADER_RA; + return ConstantsAreaTree.AREATYPE_TABLE_HEADER_RA; } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -26,6 +26,7 @@ import org.axsl.areaR.TableArea; import org.axsl.areaW.TableColumnArea; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.Table; import org.axsl.foR.fo.TableColumn; @@ -47,7 +48,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_TABLE_RA; + return ConstantsAreaTree.AREATYPE_TABLE_RA; } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -26,6 +26,7 @@ import org.axsl.areaW.TableCellArea; import org.axsl.common.Constants; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.fo.TableCell; import org.axsl.foR.fo.TableRow; @@ -43,7 +44,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_TABLE_ROW_RA; + return ConstantsAreaTree.AREATYPE_TABLE_ROW_RA; } /* Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2006-05-31 19:42:06 UTC (rev 7344) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2006-05-31 19:42:17 UTC (rev 7345) @@ -27,6 +27,7 @@ import org.foray.common.XMLCharacter; import org.axsl.common.Constants; +import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObjMixed; import org.axsl.foR.fo.Character; import org.axsl.fontR.Font; @@ -204,7 +205,7 @@ } public byte getAreaType() { - return AreaNode.AREATYPE_TEXT_AREA; + return ConstantsAreaTree.AREATYPE_TEXT_AREA; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 19:42:37
|
Revision: 7344 Author: victormote Date: 2006-05-31 12:42:06 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7344&view=rev Log Message: ----------- Consolidate Area type constants in a new Common class. Modified Paths: -------------- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java Modified: trunk/foray/foray-render/src/java/org/foray/render/Renderer.java =================================================================== --- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2006-05-31 19:12:25 UTC (rev 7343) +++ trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2006-05-31 19:42:06 UTC (rev 7344) @@ -65,6 +65,7 @@ import org.axsl.areaR.TableHeaderContainer; import org.axsl.areaR.TableRowContainer; import org.axsl.areaR.TextArea; +import org.axsl.common.ConstantsAreaTree; import org.axsl.graphicR.Graphic; import org.axsl.graphicR.GraphicException; @@ -545,142 +546,142 @@ * Keep the items in order and contiguous for better performance. */ switch (atNode.getAreaType()) { - case AreaNode.AREATYPE_BLOCK: { + case ConstantsAreaTree.AREATYPE_BLOCK: { render((NormalBlockArea) atNode); return; } - case AreaNode.AREATYPE_FOREIGN_OBJECT: { + case ConstantsAreaTree.AREATYPE_FOREIGN_OBJECT: { render((ForeignObjectArea) atNode); return; } - case AreaNode.AREATYPE_BLOCK_CONTAINER: { + case ConstantsAreaTree.AREATYPE_BLOCK_CONTAINER: { render((BlockContainerArea) atNode); return; } - case AreaNode.AREATYPE_BODY_AREA_CONTAINER: { + case ConstantsAreaTree.AREATYPE_BODY_AREA_CONTAINER: { render((RegionBodyArea) atNode); return; } - case AreaNode.AREATYPE_DISPLAY_SPACE: { + case ConstantsAreaTree.AREATYPE_DISPLAY_SPACE: { // This node type has been deleted. render(atNode); return; } - case AreaNode.AREATYPE_LINE: { + case ConstantsAreaTree.AREATYPE_LINE: { LineArea la = (LineArea) atNode; render(la); return; } - case AreaNode.AREATYPE_IMAGE: { + case ConstantsAreaTree.AREATYPE_IMAGE: { render((ExternalGraphicArea) atNode); return; } - case AreaNode.AREATYPE_SVG: { + case ConstantsAreaTree.AREATYPE_SVG: { render((SVGArea) atNode); return; } - case AreaNode.AREATYPE_INLINE_SPACE: { + case ConstantsAreaTree.AREATYPE_INLINE_SPACE: { render(atNode); return; } - case AreaNode.AREATYPE_LEADER: { + case ConstantsAreaTree.AREATYPE_LEADER: { render((LeaderArea) atNode); return; } - case AreaNode.AREATYPE_EXTENSION: { + case ConstantsAreaTree.AREATYPE_EXTENSION: { /* There is nothing to do here. */ render(atNode); return; } - case AreaNode.AREATYPE_REGION_RA: { + case ConstantsAreaTree.AREATYPE_REGION_RA: { render((RegionArea) atNode); return; } - case AreaNode.AREATYPE_FOOTNOTE_RA: { + case ConstantsAreaTree.AREATYPE_FOOTNOTE_RA: { render(atNode); return; } - case AreaNode.AREATYPE_BEFORE_FLOAT_RA: { + case ConstantsAreaTree.AREATYPE_BEFORE_FLOAT_RA: { render(atNode); return; } - case AreaNode.AREATYPE_MAIN_RA: { + case ConstantsAreaTree.AREATYPE_MAIN_RA: { render(atNode); return; } - case AreaNode.AREATYPE_SPAN_RA: { + case ConstantsAreaTree.AREATYPE_SPAN_RA: { render((SpanArea) atNode); return; } - case AreaNode.AREATYPE_COLUMN_RA: { + case ConstantsAreaTree.AREATYPE_COLUMN_RA: { render((NormalFlowArea) atNode); return; } - case AreaNode.AREATYPE_TABLE_RA: { + case ConstantsAreaTree.AREATYPE_TABLE_RA: { render((TableArea) atNode); return; } - case AreaNode.AREATYPE_GENERIC_CONTAINER: { + case ConstantsAreaTree.AREATYPE_GENERIC_CONTAINER: { render(atNode); return; } - case AreaNode.AREATYPE_TABLE_CELL_RA: { + case ConstantsAreaTree.AREATYPE_TABLE_CELL_RA: { render((TableCellArea) atNode); return; } - case AreaNode.AREATYPE_TABLE_COLUMN_RA: { + case ConstantsAreaTree.AREATYPE_TABLE_COLUMN_RA: { render((TableColumnArea) atNode); return; } - case AreaNode.AREATYPE_TABLE_ROW_RA: { + case ConstantsAreaTree.AREATYPE_TABLE_ROW_RA: { render((TableRowContainer) atNode); return; } - case AreaNode.AREATYPE_TABLE_BODY_RA: { + case ConstantsAreaTree.AREATYPE_TABLE_BODY_RA: { render((TableBodyContainer) atNode); return; } - case AreaNode.AREATYPE_TABLE_HEADER_RA: { + case ConstantsAreaTree.AREATYPE_TABLE_HEADER_RA: { render((TableHeaderContainer) atNode); return; } - case AreaNode.AREATYPE_TABLE_FOOTER_RA: { + case ConstantsAreaTree.AREATYPE_TABLE_FOOTER_RA: { render((TableFooterContainer) atNode); return; } - case AreaNode.AREATYPE_BOOKMARK: { + case ConstantsAreaTree.AREATYPE_BOOKMARK: { render(atNode); return; } - case AreaNode.AREATYPE_DESTINATION: { + case ConstantsAreaTree.AREATYPE_DESTINATION: { render(atNode); return; } - case AreaNode.AREATYPE_BLOCK_GROUP: { + case ConstantsAreaTree.AREATYPE_BLOCK_GROUP: { render(atNode); return; } - case AreaNode.AREATYPE_TEXT_AREA: { + case ConstantsAreaTree.AREATYPE_TEXT_AREA: { render((TextArea) atNode); return; } - case AreaNode.AREATYPE_PAGE_NUMBER_CITATION_AREA: { + case ConstantsAreaTree.AREATYPE_PAGE_NUMBER_CITATION_AREA: { render((PageNumberCitationArea) atNode); return; } - case AreaNode.AREATYPE_BOOKMARK_TREE: { + case ConstantsAreaTree.AREATYPE_BOOKMARK_TREE: { render((BookmarkTreeArea) atNode); return; } - case AreaNode.AREATYPE_PAGE_NUMBER_AREA: { + case ConstantsAreaTree.AREATYPE_PAGE_NUMBER_AREA: { render((PageNumberArea) atNode); return; } - case AreaNode.AREATYPE_BASIC_LINK: { + case ConstantsAreaTree.AREATYPE_BASIC_LINK: { render((BasicLinkArea) atNode); return; } - case AreaNode.AREATYPE_INLINE: { + case ConstantsAreaTree.AREATYPE_INLINE: { render((InlineArea) atNode); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 18:38:34
|
Revision: 7341 Author: victormote Date: 2006-05-31 11:38:27 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7341&view=rev Log Message: ----------- Conform to axsl change: Rename method for clarity, and remove parameter from it, as the implementation should already know how to find the value of that parameter. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-05-31 18:38:19 UTC (rev 7340) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-05-31 18:38:27 UTC (rev 7341) @@ -111,17 +111,18 @@ } /** - * This method should be run at the end of FOTree parsing to create the - * document nodes in the Area Tree. Document nodes are those that are - * direct children of the Root, and are not part of any PageSequence. - * Examples includes Bookmarks and Destinations. - * @param rootFObj The Root instance that is the grand ancestor of the - * FOTree that was parsed. + * {@inheritDoc} */ - public void layoutDocumentNodes(Root rootFObj) throws AreaWException { - layoutBookmarkTree(rootFObj); + public void createDocumentNodes() throws AreaWException { + layoutBookmarkTree(this.getRoot()); } + public Root getRoot() { + FOrayFOLinkage linkage = this.generatedBy; + /* Cast verified at construction. */ + return (Root) linkage.getFONode(); + } + private void layoutBookmarkTree(Root rootFObj) throws AreaWException { BookmarkTree bookmarkTree = rootFObj.getBookmarkTree(); if (bookmarkTree == null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 18:38:26
|
Revision: 7340 Author: victormote Date: 2006-05-31 11:38:19 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7340&view=rev Log Message: ----------- Conform to axsl change: Rename method for clarity, and remove parameter from it, as the implementation should already know how to find the value of that parameter. Modified Paths: -------------- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java =================================================================== --- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-05-31 18:07:52 UTC (rev 7339) +++ trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-05-31 18:38:19 UTC (rev 7340) @@ -377,10 +377,8 @@ * @param event the FOTreeEvent that was fired */ public void foDocumentComplete(FOTreeEvent event) { - org.axsl.foR.fo.Root rootFObj = document.getFOTreeBuilder() - .getRootFObj(); try { - getCreatedAreaTree().layoutDocumentNodes(rootFObj); + getCreatedAreaTree().createDocumentNodes(); } catch (AreaWException e1) { getLogger().error("Error in layout of Document nodes."); e1.printStackTrace(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 18:08:00
|
Revision: 7339 Author: victormote Date: 2006-05-31 11:07:52 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7339&view=rev Log Message: ----------- Fix computation of space available to the footnote area. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java 2006-05-31 17:51:30 UTC (rev 7338) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java 2006-05-31 18:07:52 UTC (rev 7339) @@ -72,4 +72,14 @@ return getParentArea().getOverflowArea(this); } + /** + * {@inheritDoc} + */ + public int progressionDimensionAvailable() { + /* The amount of space available to the footnote area is what is + * available in the body region. */ + Area parentArea = this.getParentArea(); + return parentArea.progressionDimensionAvailable(); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 17:51:39
|
Revision: 7338 Author: victormote Date: 2006-05-31 10:51:30 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7338&view=rev Log Message: ----------- Remove unused 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-31 17:39:26 UTC (rev 7337) +++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2006-05-31 17:51:30 UTC (rev 7338) @@ -31,8 +31,6 @@ import org.axsl.foR.fo.RegionBody; import org.axsl.foR.fo.SimplePageMaster; -import java.util.List; - public class RegionRABody extends AreaFixed implements RegionBodyArea, org.axsl.areaW.RegionRABody { @@ -74,17 +72,6 @@ return footnoteReferenceArea; } - protected static void resetMaxHeight(Area ar, int change) { - List childs = ar.getChildren(); - for (int i = 0; i < childs.size(); i++) { - Object obj = childs.get(i); - if (obj instanceof Area) { - Area childArea = (Area)obj; - resetMaxHeight(childArea, change); - } - } - } - public byte getAreaType() { return AreaNode.AREATYPE_BODY_AREA_CONTAINER; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-05-31 17:39:33
|
Revision: 7337 Author: victormote Date: 2006-05-31 10:39:26 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7337&view=rev Log Message: ----------- Changes to footnote logic. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.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-31 17:27:05 UTC (rev 7336) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-05-31 17:39:26 UTC (rev 7337) @@ -100,9 +100,8 @@ blockArea = area.makeNormalBlockArea(node); - int numChildren = node.childrenFO().size(); - for (int i = getProgress(); i < numChildren; i++) { - FONode fo = (FONode)node.childrenFO().get(i); + for (int i = getProgress(); i < node.getChildCount(); i++) { + FONode fo = node.getFONodeChildAt(i); FONodePL nodePL = this.getLayoutProxy(fo); int status = nodePL.layout(blockArea); if (Status.isIncomplete(status)) { 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-31 17:27:05 UTC (rev 7336) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-05-31 17:39:26 UTC (rev 7337) @@ -51,7 +51,7 @@ setProgress(0); } int progressAtStart = getProgress(); - int progressAtEnd = addText(node, area, getProgress()); + int progressAtEnd = addText(node, area, progressAtStart); setProgress(progressAtEnd); if (progressAtEnd == -1) { return Status.OK; 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 17:27:05 UTC (rev 7336) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-05-31 17:39:26 UTC (rev 7337) @@ -26,7 +26,6 @@ import org.axsl.areaW.Area; import org.axsl.areaW.FootnoteRA; -import org.axsl.areaW.NormalBlockArea; import org.axsl.areaW.PageArea; import org.axsl.areaW.RegionRABody; @@ -54,20 +53,18 @@ if (getProgress() == FONodePL.START) { setProgress(0); } - NormalBlockArea blockArea = - area.makeNormalBlockArea(node); + FootnoteRA referenceArea = (FootnoteRA) area; int numChildren = node.childrenFO().size(); for (int i = getProgress(); i < numChildren; i++) { - FONode fo = (FONode)node.childrenFO().get(i); - int status = getLayoutProxy(fo).layout(blockArea); + FONode fo = node.getFONodeChildAt(i); + FONodePL foNodePL = getLayoutProxy(fo); + int status = foNodePL.layout(referenceArea); if (Status.isIncomplete((status))) { resetProgress(); return status; } } - layout.completeCurrentLineInBlock(blockArea); - area.incrementProgressionDimension(blockArea.crBPD()); return Status.OK; } 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-31 17:27:05 UTC (rev 7336) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java 2006-05-31 17:39:26 UTC (rev 7337) @@ -25,7 +25,6 @@ package org.foray.pioneer; import org.axsl.areaW.Area; -import org.axsl.areaW.NormalBlockArea; import org.axsl.areaW.PageArea; import org.axsl.areaW.AreaWException; @@ -62,15 +61,11 @@ /* Layout the FootnoteBody. */ FootnoteBody fbody = node.getFootnoteBody(); - // add footnote to current page or next if it can't fit - if (area instanceof NormalBlockArea) { - this.layout.addPendingFootnote(fbody); - } else { - FootnoteBodyPL fbPL - = ((FootnoteBodyPL) getLayoutProxy(fbody)); - PageArea page = area.getWritablePage(); - fbPL.layoutFootnote(page); - } + FootnoteBodyPL fbPL = ((FootnoteBodyPL) getLayoutProxy(fbody)); + 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); 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-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. |