1 17 18 19 20 package org.apache.fop.fo.pagination; 21 22 import java.awt.Rectangle ; 24 25 import org.apache.fop.apps.FOPException; 26 import org.apache.fop.datatypes.PercentBaseContext; 27 import org.apache.fop.fo.FONode; 28 import org.apache.fop.fo.PropertyList; 29 30 33 public abstract class RegionSE extends SideRegion { 34 37 40 protected RegionSE(FONode parent) { 41 super(parent); 42 } 43 44 47 public void bind(PropertyList pList) throws FOPException { 48 super.bind(pList); 49 } 50 51 62 protected void adjustIPD(Rectangle vpRefRect, int wm, PercentBaseContext siblingContext) { 63 int offset = 0; 64 RegionBefore before = (RegionBefore) getSiblingRegion(FO_REGION_BEFORE); 65 if (before != null && before.getPrecedence() == EN_TRUE) { 66 offset = before.getExtent().getValue(siblingContext); 67 vpRefRect.translate(0, offset); 68 } 69 RegionAfter after = (RegionAfter) getSiblingRegion(FO_REGION_AFTER); 70 if (after != null && after.getPrecedence() == EN_TRUE) { 71 offset += after.getExtent().getValue(siblingContext); 72 } 73 if (offset > 0) { 74 if (wm == EN_LR_TB || wm == EN_RL_TB) { 75 vpRefRect.height -= offset; 76 } else { 77 vpRefRect.width -= offset; 78 } 79 } 80 } 81 } 82 83 | Popular Tags |