From: Peter Bernard West Date: Sun, 30 May 2004 16:19:36 +0000 (+0000) Subject: Added pageSpace field, acceptLayout(Rectangle2D), X-Git-Tag: Defoe_export~106 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e27b33e1e6790d36c6068d9fbebc94a13d8a21ec;p=xmlgraphics-fop.git Added pageSpace field, acceptLayout(Rectangle2D), pageSpaceRequest(AreaRange) and adjustedRequest(AreaRange) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197673 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/area/BlockArea.java b/src/java/org/apache/fop/area/BlockArea.java index 5d3c73b07..b01a86b25 100644 --- a/src/java/org/apache/fop/area/BlockArea.java +++ b/src/java/org/apache/fop/area/BlockArea.java @@ -19,6 +19,8 @@ */ package org.apache.fop.area; +import java.awt.geom.Rectangle2D; + import org.apache.fop.datastructs.Node; import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; @@ -41,4 +43,41 @@ public class BlockArea extends Area { // TODO Auto-generated constructor stub } + /** The page space allocation for layout of the block */ + private Rectangle2D pageSpace; + +// /** +// * Receives an allocation of page space from area parent +// * @param pageSpace +// */ +// public void receivePageSpace(Rectangle2D pageSpace) { +// this.pageSpace = pageSpace; +// } + + /** + * An allocation of page space has been requested by the currently active + * child area. N.B. reference-areas must override + * this method to apply an AffineTransform to areas passed + * up and returned. + * @return + */ + public Rectangle2D pageSpaceRequest(AreaRange spaceRange) { + AreaRange request = adjustedRequest(spaceRange); + return null; + } + + private AreaRange adjustedRequest(AreaRange request) { + // TODO Adjust the request for padding, borders and margins on this + // block + // For now, do nothing. + return request; + } + /** + * Accepts a laid-out block from an area child + * @param layout + */ + public void acceptLayout(Rectangle2D layout) { + + } + }