1 17 18 19 20 package org.apache.fop.layoutmgr.table; 21 22 import org.apache.fop.fo.flow.TableCaption; 23 import org.apache.fop.layoutmgr.BlockStackingLayoutManager; 24 import org.apache.fop.layoutmgr.LayoutContext; 25 import org.apache.fop.layoutmgr.PositionIterator; 26 import org.apache.fop.layoutmgr.Position; 27 import org.apache.fop.area.Area; 28 import org.apache.fop.area.Block; 29 30 36 public class TableCaptionLayoutManager extends BlockStackingLayoutManager { 37 private TableCaption fobj; 38 39 private Block curBlockArea; 40 41 43 47 public TableCaptionLayoutManager(TableCaption node) { 48 super(node); 49 fobj = node; 50 } 51 52 58 126 127 133 public void addAreas(PositionIterator parentIter, 134 LayoutContext layoutContext) { 135 getParentArea(null); 136 getPSLM().addIDToPage(fobj.getId()); 137 138 152 153 flush(); 154 155 curBlockArea = null; 157 } 158 159 172 public Area getParentArea(Area childArea) { 173 if (curBlockArea == null) { 174 curBlockArea = new Block(); 175 Area parentArea = parentLM.getParentArea(curBlockArea); 178 int referenceIPD = parentArea.getIPD(); 179 curBlockArea.setIPD(referenceIPD); 180 setCurrentArea(curBlockArea); } 183 return curBlockArea; 184 } 185 186 191 public void addChildArea(Area childArea) { 192 if (curBlockArea != null) { 193 curBlockArea.addBlock((Block) childArea); 194 } 195 } 196 197 202 public void resetPosition(Position resetPos) { 203 if (resetPos == null) { 204 reset(null); 205 } 206 } 207 } 208 209 | Popular Tags |