Browse Source

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
tags/Defoe_export
Peter Bernard West 20 years ago
parent
commit
1aa8780c58
1 changed files with 11 additions and 4 deletions
  1. 11
    4
      src/java/org/apache/fop/area/BlockAllocationRectangle.java

+ 11
- 4
src/java/org/apache/fop/area/BlockAllocationRectangle.java View File

@@ -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());
}

}

Loading…
Cancel
Save