BoxBuilder will have made sure that
the block we're working on will either contain only inline or block content.
If we're in a paged media environment, the various page break related
properties are also handled here. If a rule is violated, the affected run
of boxes will be layed out again. If the rule still cannot be satisfied,
the rule will be dropped.
Important Note
This is quite hard to get right without causing an explosion of layouts caused by re-attempts to satisfy page-break-inside: avoid in deeply nested content. Please be careful when editing these functions.
| Modifier and Type | Class and Description |
|---|---|
| private abstract static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | avoidPageBreakBetween(BlockBox previous, BlockBox current)
If we should try to avoid a page break between two block boxes. |
| private static LineBox | |
| private static boolean | isPageBreakBetweenChildBoxes(BlockBoxing.
|
| private static void | layoutBlockChild(LayoutContext c, BlockBox parent, BlockBox child, boolean needPageClear, int childOffset, int trimmedPageCount, LayoutState layoutState)
|
| private static void | layoutBlockChild0(LayoutContext c, BlockBox parent, BlockBox child, boolean needPageClear, int childOffset, int trimmedPageCount)
|
| public static void | layoutContent(LayoutContext c, BlockBox block, int contentStart)
Lays out a |
| private static Integer | processPageBreakAvoidRun(LayoutContext c, BlockBox block, List<Box> localChildren, int offset, BlockBoxing.
|
| private static int | relayoutRun(LayoutContext c, List<Box> localChildren, BlockBox block, BlockBoxing.
|
| private static void |
| NO_PAGE_TRIM | back to summary |
|---|---|
| private static final int NO_PAGE_TRIM | |
| BlockBoxing | back to summary |
|---|---|
| private BlockBoxing() | |
| avoidPageBreakBetween | back to summary |
|---|---|
| public static boolean avoidPageBreakBetween(BlockBox previous, BlockBox current) If we should try to avoid a page break between two block boxes. | |
| getFirstLine | back to summary |
|---|---|
| private static LineBox getFirstLine(Box box) | |
| isPageBreakBetweenChildBoxes | back to summary |
|---|---|
| private static boolean isPageBreakBetweenChildBoxes(BlockBoxing. | |
| layoutBlockChild | back to summary |
|---|---|
| private static void layoutBlockChild(LayoutContext c, BlockBox parent, BlockBox child, boolean needPageClear, int childOffset, int trimmedPageCount, LayoutState layoutState) | |
| layoutBlockChild0 | back to summary |
|---|---|
| private static void layoutBlockChild0(LayoutContext c, BlockBox parent, BlockBox child, boolean needPageClear, int childOffset, int trimmedPageCount) | |
| layoutContent | back to summary |
|---|---|
| public static void layoutContent(LayoutContext c, BlockBox block, int contentStart) Lays out a | |
| processPageBreakAvoidRun | back to summary |
|---|---|
| private static Integer processPageBreakAvoidRun(LayoutContext c, BlockBox block, List<Box> localChildren, int offset, BlockBoxing. | |
| relayoutRun | back to summary |
|---|---|
| private static int relayoutRun(LayoutContext c, List<Box> localChildren, BlockBox block, BlockBoxing. | |
| repositionBox | back to summary |
|---|---|
| private static void repositionBox(LayoutContext c, BlockBox child, int trimmedPageCount) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract void | |
| pack-priv abstract int | |
| pack-priv abstract LayoutState | |
| pack-priv abstract int | |
| pack-priv abstract boolean | |
| pack-priv abstract void | |
| pack-priv abstract void |
| AbstractRelayoutDataList | back to summary |
|---|---|
| private AbstractRelayoutDataList() | |
| configureRun | back to summary |
|---|---|
| pack-priv abstract void configureRun(int boxIndex, BlockBox previous, BlockBox current) | |
| getChildOffset | back to summary |
|---|---|
| pack-priv abstract int getChildOffset(int boxIndex) | |
| getLayoutState | back to summary |
|---|---|
| pack-priv abstract LayoutState getLayoutState(int boxIndex) | |
| getRunStart | back to summary |
|---|---|
| pack-priv abstract int getRunStart(int endRunIndex) | |
| isEndsRun | back to summary |
|---|---|
| pack-priv abstract boolean isEndsRun(int boxIndex) | |
| setChildOffset | back to summary |
|---|---|
| pack-priv abstract void setChildOffset(int boxIndex, int childOffset) | |
| setLayoutState | back to summary |
|---|---|
| pack-priv abstract void setLayoutState(int boxIndex, LayoutState state) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int[] | |
| pack-priv final LayoutState[] | |
| pack-priv TreeSet | |
| pack-priv TreeSet |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| public void | configureRun(int offset, BlockBox previous, BlockBox current)
Implements abstract com. Marks two consecutive block boxes as being in a run of boxes where
a page break should not occur between them as set in the
|
| pack-priv int | getChildOffset(int boxIndex)
Implements abstract com.
|
| pack-priv LayoutState | getLayoutState(int boxIndex)
Implements abstract com.
|
| pack-priv int | getRunStart(int endRunIndex)
Implements abstract com.
|
| pack-priv boolean | isEndsRun(int boxIndex)
Implements abstract com.
|
| pack-priv boolean | |
| pack-priv void | setChildOffset(int boxIndex, int childOffset)
Implements abstract com.
|
| pack-priv void | setLayoutState(int boxIndex, LayoutState state)
Implements abstract com.
|
| childOffsets | back to summary |
|---|---|
| pack-priv final int[] childOffsets | |
| layoutStates | back to summary |
|---|---|
| pack-priv final LayoutState[] layoutStates | |
| runEnds | back to summary |
|---|---|
| pack-priv TreeSet<Integer> runEnds | |
| runStarts | back to summary |
|---|---|
| pack-priv TreeSet<Integer> runStarts | |
| LiteRelayoutDataList | back to summary |
|---|---|
| pack-priv LiteRelayoutDataList(int size) | |
| addRunEnd | back to summary |
|---|---|
| pack-priv void addRunEnd(int boxIndex) | |
| addRunStart | back to summary |
|---|---|
| pack-priv void addRunStart(int boxIndex) | |
| configureRun | back to summary |
|---|---|
| public void configureRun(int offset, BlockBox previous, BlockBox current) Implements abstract com. Marks two consecutive block boxes as being in a run of boxes where
a page break should not occur between them as set in the
| |
| getChildOffset | back to summary |
|---|---|
| pack-priv int getChildOffset(int boxIndex) Implements abstract com.
| |
| getLayoutState | back to summary |
|---|---|
| pack-priv LayoutState getLayoutState(int boxIndex) Implements abstract com.
| |
| getRunStart | back to summary |
|---|---|
| pack-priv int getRunStart(int endRunIndex) Implements abstract com.
| |
| isEndsRun | back to summary |
|---|---|
| pack-priv boolean isEndsRun(int boxIndex) Implements abstract com.
| |
| isInRun | back to summary |
|---|---|
| pack-priv boolean isInRun(int boxIndex) | |
| setChildOffset | back to summary |
|---|---|
| pack-priv void setChildOffset(int boxIndex, int childOffset) Implements abstract com.
| |
| setLayoutState | back to summary |
|---|---|
| pack-priv void setLayoutState(int boxIndex, LayoutState state) Implements abstract com.
| |