Package com.openhtmltopdf.layout
Class FloatManager
java.lang.Object
com.openhtmltopdf.layout.FloatManager
A class that manages all floated boxes in a given block formatting context.
It is responsible for positioning floats and calculating clearance for
non-floated (block) boxes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
static class
static enum
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List
<FloatManager.BoxOffset> private final Box
private List
<FloatManager.BoxOffset> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
alignToLastFloat
(CssContext cssCtx, BlockFormattingContext bfc, BlockBox current, FloatManager.FloatDirection direction) private void
alignToLastOpposingFloat
(CssContext cssCtx, BlockFormattingContext bfc, BlockBox current, FloatManager.FloatDirection direction) private void
applyLineHeightHack
(CssContext cssCtx, Box line, Rectangle bounds) private int
calcDelta
(CssContext cssCtx, LineBox line, FloatManager.BoxDistance boxDistance) void
private void
calcFloatLocations
(List<FloatManager.BoxOffset> floats) void
clear
(CssContext cssCtx, BlockFormattingContext bfc, Box box) private int
findLowestY
(CssContext cssCtx, List<FloatManager.BoxOffset> floats) private boolean
fitsInContainingBlock
(BlockBox current) void
floatBox
(LayoutContext c, Layer layer, BlockFormattingContext bfc, BlockBox box) private List
<FloatManager.BoxOffset> getAddableFloats
(FloatManager.FloatDirection direction) int
getClearDelta
(CssContext cssCtx, int bfcRelativeY) private FloatManager.BoxDistance
getFloatDistance
(CssContext cssCtx, BlockFormattingContext bfc, LineBox line, int containingBlockContentWidth, List<FloatManager.BoxOffset> floatsList, FloatManager.FloatDirection direction) getFloats
(FloatManager.FloatDirection direction) getFloatStream
(FloatManager.FloatDirection direction) int
getLeftFloatDistance
(CssContext cssCtx, BlockFormattingContext bfc, LineBox line, int containingBlockContentWidth) int
getNextLineBoxDelta
(CssContext cssCtx, BlockFormattingContext bfc, LineBox line, int containingBlockContentWidth) private Point
getOffset
(BlockBox floater, Stream<FloatManager.BoxOffset> floats) private List
<FloatManager.BoxOffset> getOpposingFloats
(FloatManager.FloatDirection direction) int
getRightFloatDistance
(CssContext cssCtx, BlockFormattingContext bfc, LineBox line, int containingBlockContentWidth) private void
moveAllTheWayOver
(BlockBox current, FloatManager.FloatDirection direction) private void
moveClear
(CssContext cssCtx, BlockFormattingContext bfc, Box current, List<FloatManager.BoxOffset> floats) private void
moveFloatBelow
(CssContext cssCtx, BlockFormattingContext bfc, Box current, List<FloatManager.BoxOffset> floats) private boolean
overlaps
(CssContext cssCtx, BlockFormattingContext bfc, BlockBox current, List<FloatManager.BoxOffset> floats) void
private void
private void
position
(CssContext cssCtx, BlockFormattingContext bfc, BlockBox current, FloatManager.FloatDirection direction) void
removeFloat
(BlockBox floater) private void
removeFloat
(BlockBox floater, List<FloatManager.BoxOffset> floats) private void
save
(BlockBox current, Layer layer, BlockFormattingContext bfc, FloatManager.FloatDirection direction) private void
setFloats
(FloatManager.FloatDirection direction, List<FloatManager.BoxOffset> list)
-
Field Details
-
_leftFloats
-
_rightFloats
-
_master
-
-
Constructor Details
-
FloatManager
-
-
Method Details
-
getAddableFloats
-
setFloats
-
floatBox
-
clear
-
save
private void save(BlockBox current, Layer layer, BlockFormattingContext bfc, FloatManager.FloatDirection direction) -
position
private void position(CssContext cssCtx, BlockFormattingContext bfc, BlockBox current, FloatManager.FloatDirection direction) -
getFloats
-
getFloatStream
-
getOpposingFloats
-
alignToLastFloat
private void alignToLastFloat(CssContext cssCtx, BlockFormattingContext bfc, BlockBox current, FloatManager.FloatDirection direction) -
alignToLastOpposingFloat
private void alignToLastOpposingFloat(CssContext cssCtx, BlockFormattingContext bfc, BlockBox current, FloatManager.FloatDirection direction) -
moveAllTheWayOver
-
fitsInContainingBlock
-
findLowestY
-
getClearDelta
-
overlaps
private boolean overlaps(CssContext cssCtx, BlockFormattingContext bfc, BlockBox current, List<FloatManager.BoxOffset> floats) -
moveFloatBelow
private void moveFloatBelow(CssContext cssCtx, BlockFormattingContext bfc, Box current, List<FloatManager.BoxOffset> floats) -
moveClear
private void moveClear(CssContext cssCtx, BlockFormattingContext bfc, Box current, List<FloatManager.BoxOffset> floats) -
removeFloat
-
removeFloat
-
calcFloatLocations
public void calcFloatLocations() -
calcFloatLocations
-
applyLineHeightHack
-
getNextLineBoxDelta
public int getNextLineBoxDelta(CssContext cssCtx, BlockFormattingContext bfc, LineBox line, int containingBlockContentWidth) -
calcDelta
-
getLeftFloatDistance
public int getLeftFloatDistance(CssContext cssCtx, BlockFormattingContext bfc, LineBox line, int containingBlockContentWidth) -
getRightFloatDistance
public int getRightFloatDistance(CssContext cssCtx, BlockFormattingContext bfc, LineBox line, int containingBlockContentWidth) -
getFloatDistance
private FloatManager.BoxDistance getFloatDistance(CssContext cssCtx, BlockFormattingContext bfc, LineBox line, int containingBlockContentWidth, List<FloatManager.BoxOffset> floatsList, FloatManager.FloatDirection direction) -
getMaster
-
getOffset
-
getOffset
-
performFloatOperation
private void performFloatOperation(FloatManager.FloatOperation op, List<FloatManager.BoxOffset> floats) -
performFloatOperation
-