diff options
author | Steve Coffman <gears@apache.org> | 2001-08-01 23:08:55 +0000 |
---|---|---|
committer | Steve Coffman <gears@apache.org> | 2001-08-01 23:08:55 +0000 |
commit | 1f8404ea3f3676a23a7eced8e6558efefd2e03e0 (patch) | |
tree | a0526f9360fe9f29175ded93566407068377ca06 /src/org/apache/fop/fo/flow/Block.java | |
parent | eeb2adff569057e2b6deb089ba9dffb21fb3a00b (diff) | |
download | xmlgraphics-fop-1f8404ea3f3676a23a7eced8e6558efefd2e03e0.tar.gz xmlgraphics-fop-1f8404ea3f3676a23a7eced8e6558efefd2e03e0.zip |
Code formatting. Still builds ok, but I didn't test it otherwise since last.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194386 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo/flow/Block.java')
-rw-r--r-- | src/org/apache/fop/fo/flow/Block.java | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/org/apache/fop/fo/flow/Block.java b/src/org/apache/fop/fo/flow/Block.java index 9830d1665..8b8de35b3 100644 --- a/src/org/apache/fop/fo/flow/Block.java +++ b/src/org/apache/fop/fo/flow/Block.java @@ -15,21 +15,21 @@ import org.apache.fop.layout.*; import org.apache.fop.datatypes.*; import org.apache.fop.apps.FOPException; - /* - Modified by Mark Lillywhite mark-fop@inomial.com. The changes - here are based on memory profiling and do not change functionality. - Essentially, the Block object had a pointer to a BlockArea object - that it created. The BlockArea was not referenced after the Block - was finished except to determine the size of the BlockArea, however - a reference to the BlockArea was maintained and this caused a lot of - GC problems, and was a major reason for FOP memory leaks. So, - the reference to BlockArea was made local, the required information - is now stored (instead of a reference to the complex BlockArea object) - and it appears that there are a lot of changes in this file, in fact - there are only a few sematic changes; mostly I just got rid of - "this." from blockArea since BlockArea is now local. - */ - +/* + Modified by Mark Lillywhite mark-fop@inomial.com. The changes + here are based on memory profiling and do not change functionality. + Essentially, the Block object had a pointer to a BlockArea object + that it created. The BlockArea was not referenced after the Block + was finished except to determine the size of the BlockArea, however + a reference to the BlockArea was maintained and this caused a lot of + GC problems, and was a major reason for FOP memory leaks. So, + the reference to BlockArea was made local, the required information + is now stored (instead of a reference to the complex BlockArea object) + and it appears that there are a lot of changes in this file, in fact + there are only a few sematic changes; mostly I just got rid of + "this." from blockArea since BlockArea is now local. + */ + public class Block extends FObjMixed { public static class Maker extends FObj.Maker { @@ -60,7 +60,7 @@ public class Block extends FObjMixed { int areaHeight = 0; int contentWidth = 0; - + String id; int span; @@ -184,7 +184,7 @@ public class Block extends FObjMixed { this.areasGenerated++; if (this.areasGenerated == 1) blockArea.isFirst(true); - // for normal areas this should be the only pair + // for normal areas this should be the only pair blockArea.addLineagePair(this, this.areasGenerated); // markers @@ -231,7 +231,7 @@ public class Block extends FObjMixed { return status; } else // i == 0 nothing was laid out.. - { + { anythingLaidOut = false; return status; } @@ -272,7 +272,7 @@ public class Block extends FObjMixed { // of memory. So we release it for the GC. areaHeight= blockArea.getHeight(); contentWidth= blockArea.getContentWidth(); - + // no break if last in area tree, or trailing in context // area int breakAfterStatus = propMgr.checkBreakAfter(area); @@ -283,7 +283,7 @@ public class Block extends FObjMixed { } if (keepWithNext != 0) { - blockArea = null; // Faster GC - BlockArea is big + blockArea = null; // Faster GC - BlockArea is big return new Status(Status.KEEP_WITH_NEXT); } @@ -301,10 +301,11 @@ public class Block extends FObjMixed { /** * Return the content width of the boxes generated by this FO. */ - public int getContentWidth() { + public int getContentWidth() { return contentWidth; // getAllocationWidth()?? } + public int getSpan() { return this.span; } |