1 17 18 19 20 package org.apache.fop.layoutmgr; 21 22 import org.apache.fop.datatypes.PercentBaseContext; 23 import org.apache.fop.fo.properties.CondLengthProperty; 24 import org.apache.fop.traits.MinOptMax; 25 26 29 public class PaddingElement extends BorderOrPaddingElement { 30 31 40 public PaddingElement(Position position, CondLengthProperty condLength, 41 RelSide side, 42 boolean isFirst, boolean isLast, PercentBaseContext context) { 43 super(position, condLength, side, isFirst, isLast, context); 44 } 45 46 47 public void notifyLayoutManager(MinOptMax effectiveLength) { 48 LayoutManager lm = getOriginatingLayoutManager(); 49 if (lm instanceof ConditionalElementListener) { 50 ((ConditionalElementListener)lm).notifyPadding( 51 getSide(), effectiveLength); 52 } else { 53 log.warn("Cannot notify LM. It does not implement ConditionalElementListene: " 54 + lm.getClass().getName()); 55 } 56 } 57 58 59 public String toString() { 60 StringBuffer sb = new StringBuffer ("Padding["); 61 sb.append(super.toString()); 62 sb.append("]"); 63 return sb.toString(); 64 } 65 66 } 67 | Popular Tags |