// Elements for the table-header/footer/body
List contentKnuthElements;
contentLM = new TableContentLayoutManager(this);
LayoutContext childLC = new LayoutContext(0);
/*
childLC.setStackLimit(
MinOptMax.subtract(context.getStackLimit(),
stackSize));*/
childLC.setRefIPD(context.getRefIPD());
childLC.copyPendingMarksFrom(context);
contentKnuthElements = contentLM.getNextKnuthElements(childLC, alignment);
//Set index values on elements coming from the content LM
Iterator iter = contentKnuthElements.iterator();
while (iter.hasNext()) {
ListElement el = (ListElement)iter.next();
notifyPos(el.getPosition());
}
log.debug(contentKnuthElements);
wrapPositionElements(contentKnuthElements, returnList);
context.updateKeepWithPreviousPending(getKeepWithPrevious());
context.updateKeepWithPreviousPending(childLC.getKeepWithPreviousPending());
context.updateKeepWithNextPending(getKeepWithNext());
context.updateKeepWithNextPending(childLC.getKeepWithNextPending());
if (getTable().isSeparateBorderModel()) {
addKnuthElementsForBorderPaddingAfter(returnList, true);
}
addKnuthElementsForSpaceAfter(returnList, alignment);
if (!context.suppressBreakBefore()) {
//addKnuthElementsForBreakBefore(returnList, context);
int breakBefore = BreakUtil.compareBreakClasses(getTable().getBreakBefore(),
childLC.getBreakBefore());
if (breakBefore != Constants.EN_AUTO) {
returnList.add(0, new BreakElement(getAuxiliaryPosition(), 0,
-KnuthElement.INFINITE, breakBefore, context));
}
}
//addKnuthElementsForBreakAfter(returnList, context);
int breakAfter = BreakUtil.compareBreakClasses(getTable().getBreakAfter(),
childLC.getBreakAfter());
if (breakAfter != Constants.EN_AUTO) {
returnList.add(new BreakElement(getAuxiliaryPosition(),
0, -KnuthElement.INFINITE, breakAfter, context));
}