[prev in list] [next in list] [prev in thread] [next in thread]
List: fop-cvs
Subject: cvs commit: xml-fop/src/java/org/apache/fop/area BlockArea.java
From: pbwest () apache ! org
Date: 2004-07-24 17:34:49
Message-ID: 20040724173449.77881.qmail () minotaur ! apache ! org
[Download RAW message or body]
pbwest 2004/07/24 10:34:49
Modified: src/java/org/apache/fop/area Tag: FOP_0-20-0_Alt-Design
BlockArea.java
Log:
BlockAllocationRectangle implements AreaListener
BlockAllocationRectangle instance created in constructor of BlockArea
setDimensions() from AreaListener is implements by re-calculating the allocation-recatngle dimensions
Revision Changes Path
No revision
No revision
1.1.2.11 +14 -5 xml-fop/src/java/org/apache/fop/area/Attic/BlockArea.java
Index: BlockArea.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/BlockArea.java,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -u -r1.1.2.10 -r1.1.2.11
--- BlockArea.java 10 Jul 2004 16:38:44 -0000 1.1.2.10
+++ BlockArea.java 24 Jul 2004 17:34:48 -0000 1.1.2.11
@@ -40,9 +40,11 @@
Node parent,
Object sync) {
super(pageSeq, generatedBy, parent, sync);
- // TODO Auto-generated constructor stub
+ // Setup the allocation-rectangle
+ allocation = new BlockAllocationRectangle();
}
+ private BlockAllocationRectangle allocation;
/** The page space allocation for layout of the block */
private Rectangle2D pageSpace = new Rectangle2D.Double();
/** The content space equivalent to the pageSpace */
@@ -142,7 +144,7 @@
* @version $Revision$ $Name$
*/
public class BlockAllocationRectangle extends AreaFrame implements
- AllocationRectangle {
+ AllocationRectangle, AreaListener {
private PaddingRectangle padding;
private BorderRectangle borders;
@@ -167,16 +169,23 @@
padding = BlockArea.this.getPadding();
borders = BlockArea.this.getBorders();
spaces = BlockArea.this.getSpaces();
+ // Register the listener
+ spaces.registerAreaListener(this);
setAllocationFrame();
}
public void setAllocationFrame() {
+ // TODO synchronize this
setStart(spaces.getStart() + borders.getStart() + padding.getStart());
setEnd(spaces.getEnd() + borders.getEnd() + padding.getEnd());
setBefore(borders.getBefore() + padding.getBefore());
setAfter(borders.getAfter() + padding.getAfter());
}
+ public void setDimensions(Rectangle2D geometry) {
+ setAllocationFrame();
+ }
+
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic