Chapter 5. Phase 2a: The getNextBreakPoss call tree

Table of Contents

1. Overview
2. How do layout managers get layout managers for the child FO nodes?
3. Block layout managers and their child layout managers
4. About getNextBreakPoss and the list of child layout managers
5. LineLayoutManager.getNextBreakPoss
5.1. Prepare for the main loop
5.2. The main loop over the list of child layout managers
5.3. After the main loop
6. LineLayoutManager.makeLineBreak
7. Line LayoutManager, a sequence of breakposs
8. TextLayoutManager.getNextBreakPoss
9. TextLayoutManager.makeBreakPoss

1. Overview

  • Create a new layout context for the children.

  • Then process the flow: loop until the flow is exhausted (isFinished()):

    • Get the next possible breakpoint (getNextBreakPoss).

      • Loop until the list of child layout managers is exhausted:

        • Get a child layout manager (AbstractLayoutManager.getChildLM). The current child layout manager is returned until it is finished. Then the layout manager for the next child is returned.

        • Create a new layout context for the children.

        • If the child layout manager is not finished, get the next possible breakpoint (getNextBreakPoss).

        • If a breakpoint is returned, break the loop and return the breakpoint.

    • This finishes a page.

    • Get the next possible breakpoint (getNextBreakPoss) (continued)

      • Loop until the list of child layout managers is exhausted: (continued)

        • Else if no breakpoint is returned, do the next cycle with the next child layout manager.

      • Mark the layout manager as finished (the list of child layout managers is exhausted).

At this point a complete (pseudo)tree of possible break points for a page has been collected.