java.lang.Object
org.openpdf.render.Box
org.openpdf.render.InlineLayoutBox
- All Implemented Interfaces:
InlinePaintable,Styleable
A
Box which contains the portion of an inline element laid 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
-
Constructor Summary
ConstructorsConstructorDescriptionInlineLayoutBox(LayoutContext c, @Nullable Element elem, @Nullable CalculatedStyle style, int cbWidth) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllChildren(List<Box> list, Layer layer) voidaddInlineChild(LayoutContext c, Object child) voidaddInlineChild(LayoutContext c, Object child, boolean callUnmarkPending) floatadjustHorizontalPosition(JustificationInfo info, float adjust) voidvoidprotected voidcalcChildPaintingInfo(CssContext c, PaintingInfo result, boolean useCache) voidvoidvoidclearSelection(List<Box> modified) voidcollectText(RenderingContext c, StringBuilder buffer) voidcopyOf()voidcountJustifiableChars(CharCounts counts) dump(LayoutContext c, String indent, Box.Dump which) @Nullable Boxfind(CssContext cssCtx, int absX, int absY, boolean findAnonymous) @Nullable InlineTextintgetBorderEdge(int left, int top, CssContext cssCtx) intintgetContentAreaEdge(int left, int top, CssContext cssCtx) intgetElementBoxes(Element elem) getInlineChild(int i) intintintgetInlineWidth(CssContext cssContext) intgetLeftMarginBorderPadding(CssContext cssCtx) getMarginEdge(int left, int top, CssContext cssCtx, int tx, int ty) protected @Nullable Boxprotected @Nullable BoxgetPrevious(Box child) int@Nullable List<TextDecoration> booleanintersectsInlineBlocks(CssContext cssCtx, Shape clip) booleanbooleanbooleanbooleanvoidvoidvoidvoidpositionRelative(CssContext cssCtx) voidvoidremoveChild(int i) voidremoveChild(Box child) protected voidvoidprotected voidvoidvoidsetBaseline(int baseline) voidsetEndsHere(boolean endsHere) voidsetInlineWidth(int inlineWidth) voidsetPending(boolean b) voidsetStartsHere(boolean startsHere) voidsetTextDecorations(List<TextDecoration> textDecoration) toString()voidMethods inherited from class org.openpdf.render.Box
addAllChildren, addChild, addChildForLayout, analyzePageBreaks, appendPosition, appendSize, calcPaintingInfo, crossesPageBreak, detach, dumpBoxes, exportPageBoxText, exportText, forcePageBreakAfter, forcePageBreakBefore, getAbsX, getAbsY, getBorder, getBoxDimensions, getChild, getChildCount, getChildren, getChildrenClipEdge, getContainingBlock, getContainingLayer, getContentWidth, getEffBackgroundColor, getElement, getHeight, getIndex, getLayer, getLeftMBP, getMargin, getMarginBorderPadding, getMarginEdge, getNextSibling, getPadding, getPaddingEdge, getPaddingWidth, getPaintingBorderEdge, getPaintingClipEdge, getPaintingInfo, getPaintingPaddingEdge, getParent, getPreviousSibling, getPseudoElementOrClass, getRelativeOffset, getRightMBP, getState, getStyle, getStyleMargin, getStyleMarginNoCache, getTx, getTy, getWidth, getX, getY, initContainingLayer, intersects, isAnonymous, isBody, isContainedInMarginBox, isInDocumentFlow, isInitialContainingBlock, isInlineBlock, isMarginAreaRoot, isRoot, isStyled, moveIfGreater, paintBackground, paintBorder, paintRootElementBackground, removeAllChildren, reset, resetChildren, resetTopMargin, setAbsX, setAbsY, setBoxDimensions, setContainingBlock, setContainingLayer, setContentWidth, setElement, setHeight, setIndex, setLayer, setLeftMBP, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setParent, setPseudoElementOrClass, setRightMBP, setState, setStyle, setTx, setTy, setX, setY
-
Constructor Details
-
InlineLayoutBox
public InlineLayoutBox(LayoutContext c, @Nullable Element elem, @Nullable CalculatedStyle style, int cbWidth)
-
-
Method Details
-
copyOf
-
calculateHeight
-
getBaseline
public int getBaseline() -
setBaseline
public void setBaseline(int baseline) -
getInlineChildCount
public int getInlineChildCount() -
addInlineChild
-
addInlineChild
-
getInlineChildren
-
getInlineChild
-
getInlineWidth
-
prunePending
public void 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
-
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
-
getLineBox
-
getElementWithContent
-
getElementBoxes
- Overrides:
getElementBoxesin classBox
-
positionRelative
- Overrides:
positionRelativein classBox
-
addAllChildren
-
paintDebugOutline
-
resetChildren
- Overrides:
resetChildrenin classBox
-
removeChild
- Overrides:
removeChildin classBox
-
removeChild
public void removeChild(int i) - Overrides:
removeChildin classBox
-
getPrevious
- Overrides:
getPreviousin classBox
-
getNext
-
calcCanvasLocation
public void calcCanvasLocation()- Specified by:
calcCanvasLocationin classBox
-
calcChildLocations
public void calcChildLocations()- Overrides:
calcChildLocationsin classBox
-
clearSelection
- Overrides:
clearSelectionin classBox
-
selectAll
public void selectAll() -
calcChildPaintingInfo
- Overrides:
calcChildPaintingInfoin classBox
-
lookForDynamicFunctions
-
findTrailingText
-
calculateTextDecoration
-
find
@CheckReturnValue public @Nullable Box find(CssContext cssCtx, int absX, int absY, boolean findAnonymous) -
getContainingBlockWidth
public int getContainingBlockWidth()- Overrides:
getContainingBlockWidthin classBox
-
toString
-
dump
-
restyle
-
restyleChildren
- Overrides:
restyleChildrenin classBox
-
getRestyleTarget
- Overrides:
getRestyleTargetin classBox
-
collectText
- Overrides:
collectTextin classBox- Throws:
IOException
-
countJustifiableChars
-
adjustHorizontalPosition
-
getEffectiveWidth
public int getEffectiveWidth()- Overrides:
getEffectiveWidthin classBox
-