Package com.openhtmltopdf.layout
Class BoxBuilder
- java.lang.Object
-
- com.openhtmltopdf.layout.BoxBuilder
-
public class BoxBuilder extends Object
This class is responsible for creating the box tree from the DOM. This is mostly just a one-to-one translation from theElementto anInlineBoxor aBlockBox(or some subclass ofBlockBox), but the tree is reorganized according to the CSS rules. This includes inserting anonymous block and inline boxes, anonymous table content, and:beforeand:aftercontent. 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.
-
-
Field Summary
Fields Modifier and Type Field Description static intMARGIN_BOX_HORIZONTALstatic intMARGIN_BOX_VERTICAL
-
Constructor Summary
Constructors Constructor Description BoxBuilder()
-
Method Summary
Modifier and Type Method Description static voidcreateChildren(LayoutContext c, BlockBox parent)static TableBoxcreateMarginTable(LayoutContext c, PageInfo pageInfo, MarginBoxName[] names, int height, int direction)static BlockBoxcreateRootBox(LayoutContext c, Document document)static BlockBoxgetRunningBlock(LayoutContext c, PropertyValue value)static booleanisElementFunction(FSFunction function)
-
-
-
Field Detail
-
MARGIN_BOX_VERTICAL
public static final int MARGIN_BOX_VERTICAL
- See Also:
- Constant Field Values
-
MARGIN_BOX_HORIZONTAL
public static final int MARGIN_BOX_HORIZONTAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
createRootBox
public static BlockBox createRootBox(LayoutContext c, Document document)
-
createChildren
public static void createChildren(LayoutContext c, BlockBox parent)
-
createMarginTable
public static TableBox createMarginTable(LayoutContext c, PageInfo pageInfo, MarginBoxName[] names, int height, int direction)
-
isElementFunction
public static boolean isElementFunction(FSFunction function)
-
getRunningBlock
public static BlockBox getRunningBlock(LayoutContext c, PropertyValue value)
-
-