[FOray-commit] SF.net SVN: foray: [7296] trunk/foray/foray-areatree/src/java/org/foray/area
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-05-29 15:51:37
|
Revision: 7296 Author: victormote Date: 2006-05-29 08:51:25 -0700 (Mon, 29 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7296&view=rev Log Message: ----------- Conform to axsl changes regarding removal of line-height traits, using half-leading traits instead. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.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-29 15:51:15 UTC (rev 7295) +++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-05-29 15:51:25 UTC (rev 7296) @@ -1150,10 +1150,6 @@ return true; } - public int traitLineHeight() { - return this.traitGeneratedBy().traitLineHeightOpt(); - } - public org.axsl.areaW.TableBodyContainer makeTableBodyContainer( TableBody tableBody) { return new org.foray.area.TableBodyContainer(tableBody, this); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2006-05-29 15:51:15 UTC (rev 7295) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2006-05-29 15:51:25 UTC (rev 7296) @@ -130,17 +130,7 @@ } /** - * <p>Returns the actual total value of the size of this area (not counting - * space-before, etc.) in its progression direction. - * This value does <em>not</em> include space-before, etc., but - * <em>does</em> include borders and padding. - * For block areas, the progression dimension is the - * block-progression-dimension. - * For inline areas, it is the inline-progression-dimension. - * The Area stores this size, but the Layout system is responsible to - * compute and set it. - * Every AreaFlexible starts out with a progressionDimension of zero.</p> - * @return The progressionDimension. + * {@inheritDoc} */ public int getProgressionDimension() { return this.progressionDimension; Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-05-29 15:51:15 UTC (rev 7295) +++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-05-29 15:51:25 UTC (rev 7296) @@ -53,12 +53,9 @@ public LineArea(FObj generatedBy, NormalBlockArea parentArea) { super(generatedBy, parentArea); - if (getAscender() < 1 - || getDescender() > -1) { - this.setProgressionDimension(this.traitLineHeight()); - } else { - this.setProgressionDimension(getAscender() - getDescender()); - } + /* The progression dimension used is exactly equal to the size of the + * em-box, i.e. exactly equal to the font-size. */ + this.setProgressionDimension(this.traitFontSize()); LineArea prevLineArea = (LineArea) this.getPreviousChildOfGeneratedBy(); if (prevLineArea == null) { this.setAnteriorSpace(traitHalfLeadingOpt()); 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-29 15:51:15 UTC (rev 7295) +++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-29 15:51:25 UTC (rev 7296) @@ -49,8 +49,10 @@ implements org.axsl.areaR.NormalBlockArea, org.axsl.areaW.NormalBlockArea { + /* TODO: This is a layout concept and should not be in AreaTree? */ private LineArea currentLineArea; + /* TODO: This is a layout concept and should not be in AreaTree? */ private ArrayList pendingFootnotes = null; public NormalBlockArea(FObj parentFObj, Area parentArea) { @@ -102,8 +104,12 @@ * @return the new current line area, which will be empty. */ public org.axsl.areaW.LineArea createNextLineArea() { + /* The size of the next line does not need to consider the half-leading + * that follows the line. */ + int sizeNextLineArea = this.traitFontSize() + + this.traitHalfLeadingOpt(); if (this.getProgressionDimension() - + traitGeneratedBy().traitLineHeightOpt() + + sizeNextLineArea > this.progressionDimensionAvailable()) { return null; } 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-29 15:51:15 UTC (rev 7295) +++ trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2006-05-29 15:51:25 UTC (rev 7296) @@ -237,8 +237,10 @@ public boolean canAddLineArea(NormalBlockArea blockArea) { for (int i = 0; i < getChildren().size(); i++) { NormalFlowRA nf = (NormalFlowRA) getChildren().get(i); + int sizeNextLine = blockArea.traitFontSize() + + blockArea.traitGeneratedBy().traitHalfLeadingOpt(); if (nf.bpdUsedByChildren() - + blockArea.traitGeneratedBy().traitLineHeightOpt() + + sizeNextLine <= this.progressionDimensionAvailable()) { return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |