Class InlineLayoutBox
java.lang.Object
com.openhtmltopdf.render.Box
com.openhtmltopdf.render.InlineLayoutBox
- All Implemented Interfaces:
InlinePaintable, Styleable, DisplayListItem
A
Box which contains the portion of an inline element layed out on a
single line. It may contain content from several InlineBox objects
if the original inline element was interrupted by nested content.
Unlike other boxes, its children may be either Box objects
(for example, a box with display: inline-block) or
InlineText objects. For this reason, it's children are not
stored in the children property, but instead stored in the
inlineChildren property.-
Nested Class Summary
Nested classes/interfaces inherited from class Box
Box.ChildIteratorOfType<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate intprivate booleanprivate intprivate booleanprivate booleanprivate List<TextDecoration> Fields inherited from class Box
CHILDREN_FLUX, DONE, DUMP_LAYOUT, DUMP_RENDER, FLUX, LINE_SEPARATOR, NOTHING -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInlineLayoutBox(LayoutContext c, Element elem, CalculatedStyle style, int cbWidth) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllChildren(List<? super Box> list, Layer layer) private AnonymousBlockBoxaddFollowingBlockBoxes(BlockBox container, List<Box> result) voidaddInlineChild(LayoutContext c, Object child) voidaddInlineChild(LayoutContext c, Object child, boolean callUnmarkPending) private voidaddToContentList(List<Box> list) floatadjustHorizontalPosition(JustificationInfo info, float adjust) floatadjustHorizontalPositionRTL(JustificationInfo info, float adjust) voidvoidprotected voidcalcChildPaintingInfo(CssContext c, PaintingInfo result, boolean useCache) voidvoidvoidcollectText(RenderingContext c, StringBuilder buffer) voidprivate booleancontainsEnd(List<Box> result) copyOf()voidcountJustifiableChars(CharCounts counts) dump(LayoutContext c, String indent, int which) find(CssContext cssCtx, int absX, int absY, boolean findAnonymous) intgetBorderEdge(int left, int top, CssContext cssCtx) intintgetContentAreaEdge(int left, int top, CssContext cssCtx) intgetElementBoxes(Element elem) getInlineChild(int i) intEitherBox, including InlineLayoutBoxorInlineTextobjects.intintgetInlineWidth(CssContext cssCtx) intgetLeftMarginBorderPadding(CssContext cssCtx) getMarginEdge(int left, int top, CssContext cssCtx, int tx, int ty) protected Boxprotected BoxgetPrevious(Box child) intbooleanbooleanintersectsInlineBlocks(CssContext cssCtx, Shape clip) booleanbooleanprivate booleanisEndingBox(Box b) booleanbooleanbooleanvoidvoidvoidvoidpositionRelative(CssContext cssCtx) voidbooleanremoveChild(int i) Removes child by index and adjusts the index of subsequent children.booleanremoveChild(Box child) Removes a child box if it is indeed a child and adjusts the index of subsequent children.protected voidvoidsetBaseline(int baseline) voidsetContainingBlockWidth(int containingBlockWidth) voidsetEndsHere(boolean endsHere) voidsetInlineWidth(int inlineWidth) voidsetPending(boolean b) voidsetStartsHere(boolean startsHere) voidsetTextDecorations(List<TextDecoration> textDecoration) toString()voidMethods inherited from class Box
addAllChildren, addChild, addChildForLayout, analyzePageBreaks, ancestors, ancestorsWhile, calcPaintingInfo, crossesPageBreak, detach, dumpBoxes, exportPageBoxText, exportText, findAncestor, findColumnBreakOpportunities, forcePageBreakAfter, forcePageBreakBefore, forcePageBreakBefore, getAbsoluteClipBox, getAbsX, getAbsY, getAccessibilityObject, getBorder, getBorderBox, getBorderBoxHeight, getBorderBoxWidth, getBoxDimensions, getChild, getChildCount, getChildIterator, getChildIteratorOfType, getChildren, getChildrenClipEdge, getClipBox, getContainingBlock, getContainingLayer, getContentWidth, getDocumentParent, getEffBackgroundColor, getElement, getHeight, getIndex, getLayer, getLeftMBP, getMargin, getMarginBorderPadding, getMarginEdge, getNextSibling, getPadding, getPaddingEdge, getPaddingWidth, getPaintingBorderEdge, getPaintingClipEdge, getPaintingInfo, getPaintingPaddingEdge, getParent, getParentClipBox, getPreviousSibling, getPseudoElementOrClass, getRelativeOffset, getRightMBP, getState, getStyle, getStyleMargin, getStyleMargin, getTx, getTy, getWidth, getX, getY, hasRootElementBackground, initContainingLayer, intersects, isAnonymous, isBody, isContainedInMarginBox, isFirstChild, isInDocumentFlow, isInitialContainingBlock, isInlineBlock, isMarginAreaRoot, isRoot, isStyled, isTerminalColumnBreak, moveIfGreater, paintBackground, paintBorder, paintRootElementBackground, removeAllChildren, reset, resetChildren, resetTopMargin, rootBox, setAbsX, setAbsY, setAccessiblityObject, setAnonymous, setBorderBoxHeight, setBorderBoxWidth, setBoxDimensions, setContainingBlock, setContainingLayer, setContentWidth, setElement, setHeight, setIndex, setLayer, setLeftMBP, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setParent, setPseudoElementOrClass, setRelativeOffset, setRightMBP, setState, setStyle, setTx, setTy, setX, setY, stateToString
-
Field Details
-
_baseline
private int _baseline -
_startsHere
private boolean _startsHere -
_endsHere
private boolean _endsHere -
_inlineChildren
-
_pending
private boolean _pending -
_inlineWidth
private int _inlineWidth -
_textDecorations
-
_containingBlockWidth
private int _containingBlockWidth
-
-
Constructor Details
-
InlineLayoutBox
-
InlineLayoutBox
private InlineLayoutBox()
-
-
Method Details
-
copyOf
-
calculateHeight
-
getBaseline
public int getBaseline() -
setBaseline
public void setBaseline(int baseline) -
getInlineChildCount
public int getInlineChildCount() -
addInlineChild
-
addInlineChild
-
getInlineChildren
-
getInlineChild
-
getInlineWidth
-
prunePending
-
isEndsHere
public boolean isEndsHere() -
setEndsHere
public void setEndsHere(boolean endsHere) -
isStartsHere
public boolean isStartsHere() -
setStartsHere
public void setStartsHere(boolean startsHere) -
isPending
public boolean isPending() -
setPending
public void setPending(boolean b) -
unmarkPending
-
connectChildrenToCurrentLayer
- Overrides:
connectChildrenToCurrentLayerin classBox
-
paintSelection
-
paintInline
- Specified by:
paintInlinein interfaceInlinePaintable
-
hasNonTextContent
- Overrides:
hasNonTextContentin classBox
-
isAllTextItems
-
getBorderSides
public int getBorderSides()- Overrides:
getBorderSidesin classBox
-
getBorderEdge
- Overrides:
getBorderEdgein classBox
-
getMarginEdge
- Overrides:
getMarginEdgein classBox
-
getContentAreaEdge
- Overrides:
getContentAreaEdgein classBox
-
getLeftMarginBorderPadding
-
getRightMarginPaddingBorder
-
getInlineWidth
public int getInlineWidth() -
setInlineWidth
public void setInlineWidth(int inlineWidth) -
isContainsVisibleContent
public boolean isContainsVisibleContent() -
intersectsInlineBlocks
-
getTextDecorations
-
setTextDecorations
-
addToContentList
-
getLineBox
-
getElementWithContent
-
addFollowingBlockBoxes
-
isEndingBox
-
containsEnd
-
getElementBoxes
- Overrides:
getElementBoxesin classBox
-
positionRelative
- Overrides:
positionRelativein classBox
-
addAllChildren
-
paintDebugOutline
-
resetChildren
- Overrides:
resetChildrenin classBox
-
removeChild
Removes a child box if it is indeed a child and adjusts the index of subsequent children. Returns whether this was a child.- Overrides:
removeChildin classBox
-
removeChild
public boolean removeChild(int i) Removes child by index and adjusts the index of subsequent children. Returns true if this box has children, throws if the index is out-of-bounds.
IMPORTANT: This method must be kept in sync withBox.removeChild(Box)- Overrides:
removeChildin classBox
-
getPrevious
- Overrides:
getPreviousin classBox
-
getNext
-
calcCanvasLocation
public void calcCanvasLocation()- Specified by:
calcCanvasLocationin classBox
-
calcChildLocations
public void calcChildLocations()- Overrides:
calcChildLocationsin classBox
-
calcChildPaintingInfo
- Overrides:
calcChildPaintingInfoin classBox
-
lookForDynamicFunctions
-
findTrailingText
-
calculateTextDecoration
-
find
-
getContainingBlockWidth
public int getContainingBlockWidth()- Overrides:
getContainingBlockWidthin classBox
-
setContainingBlockWidth
public void setContainingBlockWidth(int containingBlockWidth) -
toString
-
dump
-
collectText
- Overrides:
collectTextin classBox
-
countJustifiableChars
-
adjustHorizontalPosition
-
adjustHorizontalPositionRTL
-
getEffectiveWidth
public int getEffectiveWidth()- Overrides:
getEffectiveWidthin classBox
-