From 1aa8780c5813f11298fa05eb4fba01a2487d135e Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Sat, 10 Jul 2004 16:31:34 +0000 Subject: 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 --- .../org/apache/fop/area/BlockAllocationRectangle.java | 15 +++++++++++---- 1 file 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()); } - } -- cgit v1.2.3