foray-commit Mailing List for FOray (Page 261)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(139) |
Apr
(98) |
May
(250) |
Jun
(394) |
Jul
(84) |
Aug
(13) |
Sep
(420) |
Oct
(186) |
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(108) |
Feb
(202) |
Mar
(291) |
Apr
(247) |
May
(374) |
Jun
(227) |
Jul
(231) |
Aug
(60) |
Sep
(31) |
Oct
(45) |
Nov
(18) |
Dec
|
| 2008 |
Jan
(38) |
Feb
(71) |
Mar
(142) |
Apr
|
May
(59) |
Jun
(6) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(12) |
Feb
(4) |
Mar
(88) |
Apr
(121) |
May
(17) |
Jun
(30) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2010 |
Jan
(11) |
Feb
(76) |
Mar
(11) |
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
(44) |
Sep
(14) |
Oct
(7) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(168) |
| 2017 |
Jan
(77) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(88) |
Mar
(118) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(141) |
| 2021 |
Jan
(170) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(62) |
Nov
(189) |
Dec
(162) |
| 2022 |
Jan
(201) |
Feb
(118) |
Mar
(8) |
Apr
|
May
(2) |
Jun
(47) |
Jul
(19) |
Aug
(14) |
Sep
(3) |
Oct
|
Nov
(28) |
Dec
(235) |
| 2023 |
Jan
(112) |
Feb
(23) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(70) |
Sep
(92) |
Oct
(20) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(14) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(10) |
Feb
(29) |
Mar
|
Apr
(162) |
May
(245) |
Jun
(83) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <vic...@us...> - 2006-06-02 20:57:44
|
Revision: 7361 Author: victormote Date: 2006-06-02 13:57:37 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7361&view=rev Log Message: ----------- Add methods to expand entity references. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java Modified: trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java 2006-06-02 20:24:37 UTC (rev 7360) +++ trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java 2006-06-02 20:57:37 UTC (rev 7361) @@ -512,4 +512,77 @@ return true; } + /** + * @param c The char to be tested. + * @return True iff <code>c</code> is one of the five predefined entity + * references in XML. + */ + public static boolean isEntityReference(char c) { + switch (c) { + case '&': + case '<': + case '>': + case '\'': + case '\"': { + return true; + } + } + return false; + } + + /** + * @param c The char which should be converted to a predefined XML entity + * reference. + * @return A string containing the predefined XML entity reference for + * <code>c</code>. + */ + public static String expandEntityReference(char c) { + switch (c) { + case '&': { + return "&"; + } + case '<': { + return "<"; + } + case '>': { + return ">"; + } + case '\'': { + return "'"; + } + case '\"': { + return ""; + } + } + return null; + } + + public static char[] expandEntityReferences(char[] rawText) { + if (rawText == null) { + return null; + } + boolean changesNeeded = false; + for (int i = 0; i < rawText.length && ! changesNeeded; i++) { + char c = rawText[i]; + if (XMLCharacter.isEntityReference(c)) { + changesNeeded = true; + } + } + if (! changesNeeded) { + return rawText; + } + StringBuffer buffer = new StringBuffer(new String(rawText)); + for (int i = 0; i < buffer.length(); i++) { + char c = buffer.charAt(i); + if (XMLCharacter.isEntityReference(c)) { + String expanded = XMLCharacter + .expandEntityReference(c); + buffer.replace(i, i + 1, expanded); + /* Advance the counter past the replaced text. */ + i += (expanded.length() - 1); + } + } + return buffer.toString().toCharArray(); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-02 20:24:42
|
Revision: 7360 Author: victormote Date: 2006-06-02 13:24:37 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7360&view=rev Log Message: ----------- Break the x and y values into separate attributes. Modified Paths: -------------- trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java Modified: trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java =================================================================== --- trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2006-06-02 17:25:44 UTC (rev 7359) +++ trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2006-06-02 20:24:37 UTC (rev 7360) @@ -605,37 +605,45 @@ } public void outputBorderRectangleOrigin(Area area, StringBuffer buffer) { - buffer.append(" br-origin="); + buffer.append(" brx="); buffer.append(DOUBLE_QUOTE); buffer.append(area.brOriginX()); - buffer.append(", "); + buffer.append(DOUBLE_QUOTE); + buffer.append(" bry="); + buffer.append(DOUBLE_QUOTE); buffer.append(area.brOriginY()); buffer.append(DOUBLE_QUOTE); } public void outputPaddingRectangleOrigin(Area area, StringBuffer buffer) { - buffer.append(" pr-origin="); + buffer.append(" prx="); buffer.append(DOUBLE_QUOTE); buffer.append(area.prOriginX()); - buffer.append(", "); + buffer.append(DOUBLE_QUOTE); + buffer.append(" pry="); + buffer.append(DOUBLE_QUOTE); buffer.append(area.prOriginY()); buffer.append(DOUBLE_QUOTE); } public void outputContentRectangleOrigin(Area area, StringBuffer buffer) { - buffer.append(" cr-origin="); + buffer.append(" crx="); buffer.append(DOUBLE_QUOTE); buffer.append(area.crOriginX()); - buffer.append(", "); + buffer.append(DOUBLE_QUOTE); + buffer.append(" cry="); + buffer.append(DOUBLE_QUOTE); buffer.append(area.crOriginY()); buffer.append(DOUBLE_QUOTE); } public void outputRenderRectangleOrigin(Area area, StringBuffer buffer) { - buffer.append(" rr-origin="); + buffer.append(" rrx="); buffer.append(DOUBLE_QUOTE); buffer.append(area.rrOriginX()); - buffer.append(", "); + buffer.append(DOUBLE_QUOTE); + buffer.append(" rry="); + buffer.append(DOUBLE_QUOTE); buffer.append(area.rrOriginY()); buffer.append(DOUBLE_QUOTE); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-02 17:25:49
|
Revision: 7359 Author: victormote Date: 2006-06-02 10:25:44 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7359&view=rev Log Message: ----------- Rough improvements to positioning of absolutely-positioned block-containers. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.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-06-02 17:02:22 UTC (rev 7358) +++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-06-02 17:25:44 UTC (rev 7359) @@ -1184,4 +1184,24 @@ return new org.foray.area.ListBlockArea(listBlock, this); } + public int traitTop() { + Area ancestor = this.ancestorBlockAreaNotALineArea(); + return traitGeneratedBy().traitTop(ancestor.crBPD()); + } + + public int traitBottom() { + Area ancestor = this.ancestorBlockAreaNotALineArea(); + return traitGeneratedBy().traitBottom(ancestor.crBPD()); + } + + public int traitLeft() { + Area ancestor = this.ancestorBlockAreaNotALineArea(); + return traitGeneratedBy().traitLeft(ancestor.crIPD()); + } + + public int traitRight() { + Area ancestor = this.ancestorBlockAreaNotALineArea(); + return traitGeneratedBy().traitRight(ancestor.crIPD()); + } + } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2006-06-02 17:02:22 UTC (rev 7358) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2006-06-02 17:25:44 UTC (rev 7359) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.areaR.BlockContainerArea; +import org.axsl.common.Constants; import org.axsl.common.ConstantsAreaTree; import org.axsl.foR.FObj; @@ -34,31 +35,35 @@ public class BlockContainerRA extends ContainerRA implements BlockContainerArea, org.axsl.areaW.BlockContainerRA { - private int xPosition; - private int yPosition; - public BlockContainerRA(FObj generatedBy, Area parentArea) { super(generatedBy, parentArea); } - public int getXPosition() { - return xPosition; + public byte getAreaType() { + return ConstantsAreaTree.AREATYPE_BLOCK_CONTAINER; } - public void setXPosition(int value) { - xPosition = value; + /** + * {@inheritDoc} + */ + public int crOriginBPDOffset() { + if (this.traitAbsolutePosition() == Constants.FOVAL_ABSOLUTE) { + int top = this.traitTop(); + if (top != Constants.ABSOLUTE_POSITION_AUTO) { + /* If "top" is specified, that is the offset needed. */ + return top; + } + int bottom = this.traitBottom(); + if (bottom != Constants.ABSOLUTE_POSITION_AUTO) { + /* If "bottom" is specified, */ + Area parentArea = this.getAreaParent(); + return parentArea.crBPD() - bottom + - this.getProgressionDimension(); + } + } + /* The default value is "auto", which means that this area is + * positioned relatively .*/ + return super.crOriginBPDOffset(); } - public int getYPosition() { - return yPosition; - } - - public void setYPosition(int value) { - yPosition = value; - } - - public byte getAreaType() { - return ConstantsAreaTree.AREATYPE_BLOCK_CONTAINER; - } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-02 17:02:27
|
Revision: 7358 Author: victormote Date: 2006-06-02 10:02:22 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7358&view=rev Log Message: ----------- Use new axsl Constant for absolute-position = "auto". Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteOffset.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteOffset.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteOffset.java 2006-06-02 15:51:34 UTC (rev 7357) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteOffset.java 2006-06-02 17:02:22 UTC (rev 7358) @@ -45,8 +45,6 @@ Constants.FOVAL_INHERIT, }; - public static final int KEYWORD_AUTO = -2147483648; - public AbsoluteOffset(PropertyList propertyList, short enumeration, String propertyFullName, String attributeValue) throws PropertyException { @@ -79,7 +77,7 @@ short keyword = ((PropertyKeyword) value).getValue(); switch (keyword) { case Constants.FOVAL_AUTO: { - return KEYWORD_AUTO; + return Constants.ABSOLUTE_POSITION_AUTO; } case Constants.FOVAL_INHERIT: { FObj parent = fobj.getFObjParent(); @@ -110,7 +108,7 @@ } public static int getValueNoInstance() { - return KEYWORD_AUTO; + return Constants.ABSOLUTE_POSITION_AUTO; } protected short[] getValidKeywords() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-02 15:51:40
|
Revision: 7357 Author: victormote Date: 2006-06-02 08:51:34 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7357&view=rev Log Message: ----------- 1. Implement new axsl method for creation of block-container area. 2. Basic fix for getting block-containers laid out. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java 2006-06-02 15:51:25 UTC (rev 7356) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java 2006-06-02 15:51:34 UTC (rev 7357) @@ -25,8 +25,9 @@ package org.foray.pioneer; import org.axsl.areaW.Area; - import org.axsl.areaW.AreaWException; +import org.axsl.areaW.BlockContainerRA; +import org.axsl.foR.FONode; import org.axsl.foR.fo.BlockContainer; /** @@ -55,7 +56,14 @@ width = node.traitRight(0) - node.traitLeft(0); height = node.traitBottom(0) - node.traitTop(0); } + BlockContainerRA blockContainer = area.makeBlockContainerArea(node); + for (int i = this.getProgress(); i < node.getChildCount(); i++) { + FONode fo = node.getFONodeChildAt(i); + FObjPL fobjPL = (FObjPL) getLayoutProxy(fo); + fobjPL.layout(blockContainer); + } + return Status.OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-02 15:51:31
|
Revision: 7356 Author: victormote Date: 2006-06-02 08:51:25 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7356&view=rev Log Message: ----------- 1. Implement new axsl method for creation of block-container area. 2. Basic fix for getting block-containers laid out. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.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-06-02 15:46:20 UTC (rev 7355) +++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-06-02 15:51:25 UTC (rev 7356) @@ -25,6 +25,7 @@ package org.foray.area; import org.axsl.areaW.AreaWException; +import org.axsl.areaW.BlockContainerRA; import org.axsl.areaW.ListBlockArea; import org.axsl.areaW.NormalBlockArea; import org.axsl.areaW.TableArea; @@ -33,6 +34,7 @@ import org.axsl.foR.WritingMode; import org.axsl.foR.fo.BasicLink; import org.axsl.foR.fo.Block; +import org.axsl.foR.fo.BlockContainer; import org.axsl.foR.fo.ListBlock; import org.axsl.foR.fo.Table; import org.axsl.fontR.Font; @@ -1172,6 +1174,12 @@ return new org.foray.area.NormalBlockArea(block, this); } + public BlockContainerRA makeBlockContainerArea( + BlockContainer blockContainer) { + return new org.foray.area.BlockContainerRA(blockContainer, this); + } + + public ListBlockArea makeListBlockArea(ListBlock listBlock) { return new org.foray.area.ListBlockArea(listBlock, this); } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2006-06-02 15:46:20 UTC (rev 7355) +++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2006-06-02 15:51:25 UTC (rev 7356) @@ -37,11 +37,8 @@ private int xPosition; private int yPosition; - public BlockContainerRA(FObj generatedBy, Area parentArea, int xPosition, - int yPosition) { + public BlockContainerRA(FObj generatedBy, Area parentArea) { super(generatedBy, parentArea); - this.xPosition = xPosition; - this.yPosition = yPosition; } public int getXPosition() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-02 15:46:28
|
Revision: 7355 Author: victormote Date: 2006-06-02 08:46:20 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7355&view=rev Log Message: ----------- Fix NPE. Modified Paths: -------------- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java =================================================================== --- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2006-05-31 23:18:47 UTC (rev 7354) +++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2006-06-02 15:46:20 UTC (rev 7355) @@ -146,7 +146,12 @@ float fontSize, SVGDocument svgDocument) { super(textAsShapes); pdfDoc = doc; - currentFont = doc.getCurrentGraphicsState().getFont().getFontUse(); + org.axsl.pdfW.PDFFont pdfFont = doc.getCurrentGraphicsState().getFont(); + if (pdfFont == null) { + this.currentFont = null; + } else { + this.currentFont = pdfFont.getFontUse(); + } currentFontSize = doc.getCurrentGraphicsState().getFontSize(); this.font = font; this.fontSize = fontSize; 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: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. |