java.lang.Object
org.openpdf.layout.BoxBuilder
This class is responsible for creating the box tree from the DOM. This is
mostly just a one-to-one translation from the
Element to an
InlineBox or a BlockBox (or some subclass of
BlockBox), but the tree is reorganized according to the CSS rules.
This includes inserting anonymous block and inline boxes, anonymous table
content, and :before and :after content. White
space is also normalized at this point. Table columns and table column groups
are added to the table which owns them, but are not created as regular boxes.
Floated and absolutely positioned content is always treated as inline
content for purposes of inserting anonymous block boxes and calculating
the kind of content contained in a given block box.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateChildren(LayoutContext c, BlockBox parent) static @Nullable TableBoxcreateMarginTable(LayoutContext c, PageInfo pageInfo, MarginBoxName[] names, int height, BoxBuilder.MarginDirection direction) static BlockBoxcreateRootBox(LayoutContext c, Document document) static @Nullable BlockBoxgetRunningBlock(LayoutContext c, PropertyValue value) static booleanisElementFunction(FSFunction function)
-
Constructor Details
-
BoxBuilder
public BoxBuilder()
-
-
Method Details
-
createRootBox
-
createChildren
-
createMarginTable
public static @Nullable TableBox createMarginTable(LayoutContext c, PageInfo pageInfo, MarginBoxName[] names, int height, BoxBuilder.MarginDirection direction) -
isElementFunction
-
getRunningBlock
@CheckReturnValue public static @Nullable BlockBox getRunningBlock(LayoutContext c, PropertyValue value)
-