1 17 18 19 20 package org.apache.fop.area.inline; 21 22 import org.apache.fop.area.Area; 23 import org.apache.fop.area.Block; 24 25 26 30 public class InlineBlockParent extends InlineArea { 31 32 35 protected Block child = null; 36 37 40 public InlineBlockParent() { 41 } 42 43 48 public void addChildArea(Area childArea) { 49 if (child != null) { 50 throw new IllegalStateException ("InlineBlockParent may have only one child area."); 51 } 52 if (childArea instanceof Block) { 53 child = (Block) childArea; 54 setIPD(childArea.getAllocIPD()); 56 setBPD(childArea.getAllocBPD()); 57 } else { 58 throw new IllegalArgumentException ("The child of an InlineBlockParent must be a" 59 + " Block area"); 60 } 61 } 62 63 68 public Block getChildArea() { 69 return child; 70 } 71 72 } 73 | Popular Tags |