diff options
author | Peter Bernard West <pbwest@apache.org> | 2004-07-10 16:31:34 +0000 |
---|---|---|
committer | Peter Bernard West <pbwest@apache.org> | 2004-07-10 16:31:34 +0000 |
commit | 1aa8780c5813f11298fa05eb4fba01a2487d135e (patch) | |
tree | b3e3cd92d48ec2515598d269c3b63e85bf3ca42a | |
parent | 31964b74256b6f0dd878190241d97b9ae058fd9d (diff) | |
download | xmlgraphics-fop-1aa8780c5813f11298fa05eb4fba01a2487d135e.tar.gz xmlgraphics-fop-1aa8780c5813f11298fa05eb4fba01a2487d135e.zip |
public setAllocationFrame extracted so that allocation-rectangle
can be updated on changes to the other frames of an area
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197778 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/area/BlockAllocationRectangle.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/area/BlockAllocationRectangle.java b/src/java/org/apache/fop/area/BlockAllocationRectangle.java index 9bc2d987c..ca66ddf78 100644 --- a/src/java/org/apache/fop/area/BlockAllocationRectangle.java +++ b/src/java/org/apache/fop/area/BlockAllocationRectangle.java @@ -27,6 +27,10 @@ package org.apache.fop.area; public class BlockAllocationRectangle extends AreaFrame implements AllocationRectangle { + private PaddingRectangle padding; + private BorderRectangle borders; + private SpacesRectangle spaces; + /** * @param area * @param contents @@ -43,13 +47,16 @@ public class BlockAllocationRectangle extends AreaFrame implements // Now extend the AreaFrame to co-incide with the // edges of the border rectangle in the BPDir, and with the edges of // the spaces rectangle in the IPDir. - PaddingRectangle padding = area.getPadding(); - BorderRectangle borders = area.getBorders(); - SpacesRectangle spaces = area.getSpaces(); + padding = area.getPadding(); + borders = area.getBorders(); + spaces = area.getSpaces(); + setAllocationFrame(); + } + + public void setAllocationFrame() { setStart(spaces.getStart() + borders.getStart() + padding.getStart()); setEnd(spaces.getEnd() + borders.getEnd() + padding.getEnd()); setBefore(borders.getBefore() + padding.getBefore()); setAfter(borders.getAfter() + padding.getAfter()); } - } |