1 51 package org.apache.fop.fo.flow; 52 53 import org.apache.fop.fo.*; 55 import org.apache.fop.layout.*; 56 import org.apache.fop.apps.FOPException; 57 58 public class ListItemBody extends FObj { 59 60 public static class Maker extends FObj.Maker { 61 public FObj make(FObj parent, PropertyList propertyList, 62 String systemId, int line, int column) 63 throws FOPException { 64 return new ListItemBody(parent, propertyList, 65 systemId, line, column); 66 } 67 68 } 69 70 public static FObj.Maker maker() { 71 return new ListItemBody.Maker(); 72 } 73 74 public ListItemBody(FObj parent, PropertyList propertyList, 75 String systemId, int line, int column) { 76 super(parent, propertyList, systemId, line, column); 77 } 78 79 public String getName() { 80 return "fo:list-item-body"; 81 } 82 83 public int layout(Area area) throws FOPException { 84 if (this.marker == START) { 85 86 AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); 88 89 92 this.marker = 0; 93 String id = this.properties.get("id").getString(); 95 try { 96 area.getIDReferences().initializeID(id, area); 97 } 98 catch(FOPException e) { 99 if (!e.isLocationSet()) { 100 e.setLocation(systemId, line, column); 101 } 102 throw e; 103 } 104 } 105 106 112 113 int numChildren = this.children.size(); 114 for (int i = this.marker; i < numChildren; i++) { 115 FObj fo = (FObj)children.get(i); 116 117 int status; 118 if (Status.isIncomplete((status = fo.layout(area)))) { 119 this.marker = i; 120 if ((i == 0) && (status == Status.AREA_FULL_NONE)) { 121 return Status.AREA_FULL_NONE; 122 } else { 123 return Status.AREA_FULL_SOME; 124 } 125 } 126 } 127 return Status.OK; 128 } 129 130 } 131 | Popular Tags |