4. About getNextBreakPoss and the list of child layout managers

Note that the breakpoint may come from a deeply nested child. Each layout manager keeps a reference to its current child layout manager. The whole list is descended again (getChildLM) at the next call to getNextBreakPoss.

Warning

TO BE IMPROVED

Stack of layout managers:

PageSequence
PageLayoutManager
Flow
FlowLayoutManager
Block
BlockLayoutManager
Block
LineLayoutManager
FOText
TextLayoutManager

For BlockLayoutManager and LineLayoutManager Block is the same, but their childLMIter are different: BlockLayoutManager$BlockLMiter vs AbstractList$ListItr

  [1] org.apache.fop.layoutmgr.TextLayoutManager.getNextBreakPoss (TextLayoutManager.java:270)
  [2] org.apache.fop.layoutmgr.LineLayoutManager.getNextBreakPoss (LineLayoutManager.java:212)
  [3] org.apache.fop.layoutmgr.BlockLayoutManager.getNextBreakPoss (BlockLayoutManager.java:229)
  [4] org.apache.fop.layoutmgr.FlowLayoutManager.getNextBreakPoss (FlowLayoutManager.java:111)
  [5] org.apache.fop.layoutmgr.PageLayoutManager.getNextBreakPoss (PageLayoutManager.java:261)
  [6] org.apache.fop.layoutmgr.PageLayoutManager.activateLayout (PageLayoutManager.java:228)

A TextLayoutManager:

 this = {
    vecAreaInfo: instance of java.util.ArrayList(id=1062)
    chars: instance of char[13] (id=1064)
    textInfo: instance of org.apache.fop.fo.TextInfo(id=1065)
    iAreaStart: 0
    iNextStart: 0
    ipdTotal: null
    spaceCharIPD: 4448
    hyphIPD: 5328
    halfWS: instance of org.apache.fop.traits.SpaceVal(id=1066)
    iNbSpacesPending: 0
    org.apache.fop.layoutmgr.AbstractLayoutManager.userAgent: instance of org.apache.fop.apps.FOUserAgent(id=1067)
    org.apache.fop.layoutmgr.AbstractLayoutManager.parentLM: instance of org.apache.fop.layoutmgr.LineLayoutManager(id=1068)
    org.apache.fop.layoutmgr.AbstractLayoutManager.fobj: instance of org.apache.fop.fo.FOText(id=1069)
    org.apache.fop.layoutmgr.AbstractLayoutManager.foID: null
    org.apache.fop.layoutmgr.AbstractLayoutManager.markers: null
    org.apache.fop.layoutmgr.AbstractLayoutManager.bFinished: false
    org.apache.fop.layoutmgr.AbstractLayoutManager.curChildLM: null
    org.apache.fop.layoutmgr.AbstractLayoutManager.childLMiter: instance of org.apache.fop.layoutmgr.LMiter(id=1070)
    org.apache.fop.layoutmgr.AbstractLayoutManager.bInited: true
}

Text in fo:text is handled by a TextLayoutManager. Two routines add the text and calculate the next possible break.