Table of Contents
This section presents a verbose overview of the addAreas call tree. The following section presents the Layout Managers in more detail.
LineLM receives from its parent LM an iterator with those 14 BPs. The leaf positions are 3, 6, 11, 12, 13, 16, 19, 21, 23, 24, 25, 26, 27, 28. LineLM itself holds 29 child BPs, which all belong to a single TextLM. LineLM maintains the position of the next BP in vecInlineBreaks, iStartPos. Initially it is set to 0. For each of its 14 BPs in the iterator, LineLM sets up an iterator with the child BPs in vecInlineBreaks from iStartPos up to an including the index iLeafPos to which the iterator BP points. Then it updates iStartPos to point to the next child BP. The iterators contain the child BP ranges: 0–3, 4–6, 7–11, 12, 13, 14–16, 17–19, 20–21, 22–23, 24, 25, 26, 27, 28.
while (parentIter.hasNext()) {
LineBreakPosition lbp = (LineBreakPosition) parentIter.next();
...
PositionIterator inlinePosIter =
new BreakPossPosIter(vecInlineBreaks, iStartPos,
lbp.getLeafPos() + 1);
iStartPos = lbp.getLeafPos() + 1;
...
while ((childLM = inlinePosIter.getNextChildLM()) != null) {
childLM.addAreas(inlinePosIter, lc);
...
}
...
}