Top Description Fields Constructors Methods
com.openhtmltopdf.render

public Class InlineLayoutBox

extends Box
implements InlinePaintable
Class Inheritance
All Implemented Interfaces
com.openhtmltopdf.layout.InlinePaintable
Imports
com.openhtmltopdf.css.constants.IdentValue, com.openhtmltopdf.css.parser.FSRGBColor, com.openhtmltopdf.css.style.CalculatedStyle, .CssContext, com.openhtmltopdf.css.style.derived.BorderPropertySet, .RectPropertySet, com.openhtmltopdf.extend.StructureType, com.openhtmltopdf.layout.*, org.w3c.dom.Element, java.awt.*, java.util.ArrayList, .Collections, .Iterator, .List

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.

Field Summary

Modifier and TypeField and Description
private int
private int
private boolean
private List<Object>
private int
private boolean
private boolean
private List<TextDecoration>
Inherited from com.openhtmltopdf.render.Box:
CHILDREN_FLUXDONEDUMP_LAYOUTDUMP_RENDERFLUXLINE_SEPARATORNOTHING

Constructor Summary

AccessConstructor and Description
public
private

Method Summary

Modifier and TypeMethod and Description
public void
addAllChildren(List<? super Box> list, Layer layer)

private AnonymousBlockBox
public void
public void
addInlineChild(LayoutContext c, Object child, boolean callUnmarkPending)

private void
public float
public float
public void
public void
protected void
public void
public void
public void
public void
private boolean
containsEnd(List<Box> result)

public InlineLayoutBox
public void
public String
dump(LayoutContext c, String indent, int which)

Implements abstract com.openhtmltopdf.render.Box.dump.

public Box
find(CssContext cssCtx, int absX, int absY, boolean findAnonymous)

Overrides com.openhtmltopdf.render.Box.find.

public InlineText
public int
public Rectangle
public int
public int
public Rectangle
public int
public List<Box>
public List<Box>
public Object
public int
public List<Object>
getInlineChildren()

Either Box, including InlineLayoutBox or InlineText objects.

public int
public int
public int
public LineBox
public Rectangle
getMarginEdge(int left, int top, CssContext cssCtx, int tx, int ty)

Overrides com.openhtmltopdf.render.Box.getMarginEdge.

protected Box
protected Box
public int
public List<TextDecoration>
public boolean
public boolean
public boolean
public boolean
private boolean
public boolean
public boolean
public boolean
public void
public void
public void
public void
public Dimension
public void
public boolean
removeChild(Box child)

Overrides com.openhtmltopdf.render.Box.removeChild.

Removes a child box if it is indeed a child and adjusts the index of subsequent children.

public boolean
removeChild(int i)

Overrides com.openhtmltopdf.render.Box.removeChild.

Removes child by index and adjusts the index of subsequent children.

protected void
public void
setBaseline(int baseline)

public void
setContainingBlockWidth(int containingBlockWidth)

public void
setEndsHere(boolean endsHere)

public void
setInlineWidth(int inlineWidth)

public void
setPending(boolean b)

public void
setStartsHere(boolean startsHere)

public void
public String
toString()

Overrides com.openhtmltopdf.render.Box.toString.

Returns a string representation of the object.

public void
Inherited from com.openhtmltopdf.render.Box:
addAllChildrenaddChildaddChildForLayoutanalyzePageBreaksancestorsancestorsWhilecalcPaintingInfocrossesPageBreakdetachdumpBoxesexportPageBoxTextexportTextfindAncestorfindColumnBreakOpportunitiesforcePageBreakAfterforcePageBreakBeforeforcePageBreakBeforegetAbsoluteClipBoxgetAbsXgetAbsYgetAccessibilityObjectgetBordergetBorderBoxgetBorderBoxHeightgetBorderBoxWidthgetBoxDimensionsgetChildgetChildCountgetChildIteratorgetChildIteratorOfTypegetChildrengetChildrenClipEdgegetClipBoxgetContainingBlockgetContainingLayergetContentWidthgetDocumentParentgetEffBackgroundColorgetElementgetHeightgetIndexgetLayergetLeftMBPgetMargingetMarginBorderPaddinggetMarginEdgegetNextSiblinggetPaddinggetPaddingEdgegetPaddingWidthgetPaintingBorderEdgegetPaintingClipEdgegetPaintingInfogetPaintingPaddingEdgegetParentgetParentClipBoxgetPreviousSiblinggetPseudoElementOrClassgetRelativeOffsetgetRightMBPgetStategetStylegetStyleMargingetStyleMargingetTxgetTygetWidthgetXgetYhasRootElementBackgroundinitContainingLayerintersectsisAnonymousisBodyisContainedInMarginBoxisFirstChildisInDocumentFlowisInitialContainingBlockisInlineBlockisMarginAreaRootisRootisStyledisTerminalColumnBreakmoveIfGreaterpaintBackgroundpaintBorderpaintRootElementBackgroundremoveAllChildrenresetresetChildrenresetTopMarginrootBoxsetAbsXsetAbsYsetAccessiblityObjectsetAnonymoussetBorderBoxHeightsetBorderBoxWidthsetBoxDimensionssetContainingBlocksetContainingLayersetContentWidthsetElementsetHeightsetIndexsetLayersetLeftMBPsetMarginBottomsetMarginLeftsetMarginRightsetMarginTopsetParentsetPseudoElementOrClasssetRelativeOffsetsetRightMBPsetStatesetStylesetTxsetTysetXsetYstateToString

Field Detail

_baselineback to summary
private int _baseline
_containingBlockWidthback to summary
private int _containingBlockWidth
_endsHereback to summary
private boolean _endsHere
_inlineChildrenback to summary
private List<Object> _inlineChildren
See Also
getInlineChildren()
_inlineWidthback to summary
private int _inlineWidth
_pendingback to summary
private boolean _pending
_startsHereback to summary
private boolean _startsHere
_textDecorationsback to summary
private List<TextDecoration> _textDecorations

Constructor Detail

InlineLayoutBoxback to summary
public InlineLayoutBox(LayoutContext c, Element elem, CalculatedStyle style, int cbWidth)
InlineLayoutBoxback to summary
private InlineLayoutBox()

Method Detail

addAllChildrenback to summary
public void addAllChildren(List<? super Box> list, Layer layer)
addFollowingBlockBoxesback to summary
private AnonymousBlockBox addFollowingBlockBoxes(BlockBox container, List<Box> result)
addInlineChildback to summary
public void addInlineChild(LayoutContext c, Object child)
addInlineChildback to summary
public void addInlineChild(LayoutContext c, Object child, boolean callUnmarkPending)
addToContentListback to summary
private void addToContentList(List<Box> list)
adjustHorizontalPositionback to summary
public float adjustHorizontalPosition(JustificationInfo info, float adjust)
adjustHorizontalPositionRTLback to summary
public float adjustHorizontalPositionRTL(JustificationInfo info, float adjust)
calcCanvasLocationback to summary
public void calcCanvasLocation()

Implements abstract com.openhtmltopdf.render.Box.calcCanvasLocation.

Annotations
@Override
calcChildLocationsback to summary
public void calcChildLocations()

Overrides com.openhtmltopdf.render.Box.calcChildLocations.

Annotations
@Override
calcChildPaintingInfoback to summary
protected void calcChildPaintingInfo(CssContext c, PaintingInfo result, boolean useCache)

Overrides com.openhtmltopdf.render.Box.calcChildPaintingInfo.

Annotations
@Override
calculateHeightback to summary
public void calculateHeight(LayoutContext c)
calculateTextDecorationback to summary
public void calculateTextDecoration(LayoutContext c)
collectTextback to summary
public void collectText(RenderingContext c, StringBuilder buffer)

Overrides com.openhtmltopdf.render.Box.collectText.

Annotations
@Override
connectChildrenToCurrentLayerback to summary
public void connectChildrenToCurrentLayer(LayoutContext c)

Overrides com.openhtmltopdf.render.Box.connectChildrenToCurrentLayer.

Annotations
@Override
containsEndback to summary
private boolean containsEnd(List<Box> result)
copyOfback to summary
public InlineLayoutBox copyOf()
countJustifiableCharsback to summary
public void countJustifiableChars(CharCounts counts)
dumpback to summary
public String dump(LayoutContext c, String indent, int which)

Implements abstract com.openhtmltopdf.render.Box.dump.

Annotations
@Override
findback to summary
public Box find(CssContext cssCtx, int absX, int absY, boolean findAnonymous)

Overrides com.openhtmltopdf.render.Box.find.

Annotations
@Override
findTrailingTextback to summary
public InlineText findTrailingText()
getBaselineback to summary
public int getBaseline()
getBorderEdgeback to summary
public Rectangle getBorderEdge(int left, int top, CssContext cssCtx)

Overrides com.openhtmltopdf.render.Box.getBorderEdge.

Annotations
@Override
getBorderSidesback to summary
public int getBorderSides()

Overrides com.openhtmltopdf.render.Box.getBorderSides.

Annotations
@Override
getContainingBlockWidthback to summary
public int getContainingBlockWidth()

Overrides com.openhtmltopdf.render.Box.getContainingBlockWidth.

Annotations
@Override
getContentAreaEdgeback to summary
public Rectangle getContentAreaEdge(int left, int top, CssContext cssCtx)

Overrides com.openhtmltopdf.render.Box.getContentAreaEdge.

Annotations
@Override
getEffectiveWidthback to summary
public int getEffectiveWidth()

Overrides com.openhtmltopdf.render.Box.getEffectiveWidth.

Annotations
@Override
getElementBoxesback to summary
public List<Box> getElementBoxes(Element elem)

Overrides com.openhtmltopdf.render.Box.getElementBoxes.

Annotations
@Override
getElementWithContentback to summary
public List<Box> getElementWithContent()
getInlineChildback to summary
public Object getInlineChild(int i)
getInlineChildCountback to summary
public int getInlineChildCount()
getInlineChildrenback to summary
public List<Object> getInlineChildren()

Either Box, including InlineLayoutBox or InlineText objects.

getInlineWidthback to summary
public int getInlineWidth(CssContext cssCtx)
getInlineWidthback to summary
public int getInlineWidth()
getLeftMarginBorderPaddingback to summary
public int getLeftMarginBorderPadding(CssContext cssCtx)
getLineBoxback to summary
public LineBox getLineBox()
getMarginEdgeback to summary
public Rectangle getMarginEdge(int left, int top, CssContext cssCtx, int tx, int ty)

Overrides com.openhtmltopdf.render.Box.getMarginEdge.

Annotations
@Override
getNextback to summary
protected Box getNext(Box child)

Overrides com.openhtmltopdf.render.Box.getNext.

Annotations
@Override
getPreviousback to summary
protected Box getPrevious(Box child)

Overrides com.openhtmltopdf.render.Box.getPrevious.

Annotations
@Override
getRightMarginPaddingBorderback to summary
public int getRightMarginPaddingBorder(CssContext cssCtx)
getTextDecorationsback to summary
public List<TextDecoration> getTextDecorations()
hasNonTextContentback to summary
public boolean hasNonTextContent(CssContext c)

Overrides com.openhtmltopdf.render.Box.hasNonTextContent.

Annotations
@Override
intersectsInlineBlocksback to summary
public boolean intersectsInlineBlocks(CssContext cssCtx, Shape clip)
isAllTextItemsback to summary
public boolean isAllTextItems(CssContext c)
isContainsVisibleContentback to summary
public boolean isContainsVisibleContent()
isEndingBoxback to summary
private boolean isEndingBox(Box b)
isEndsHereback to summary
public boolean isEndsHere()
isPendingback to summary
public boolean isPending()
isStartsHereback to summary
public boolean isStartsHere()
lookForDynamicFunctionsback to summary
public void lookForDynamicFunctions(RenderingContext c)
paintDebugOutlineback to summary
public void paintDebugOutline(RenderingContext c)
paintInlineback to summary
public void paintInline(RenderingContext c)

Implements com.openhtmltopdf.layout.InlinePaintable.paintInline.

Annotations
@Override
paintSelectionback to summary
public void paintSelection(RenderingContext c)
positionRelativeback to summary
public Dimension positionRelative(CssContext cssCtx)

Overrides com.openhtmltopdf.render.Box.positionRelative.

Annotations
@Override
prunePendingback to summary
public void prunePending(LayoutContext c)
removeChildback to summary
public boolean removeChild(Box child)

Overrides com.openhtmltopdf.render.Box.removeChild.

Doc from com.openhtmltopdf.render.Box.removeChild.

Removes a child box if it is indeed a child and adjusts the index of subsequent children. Returns whether this was a child.

Annotations
@Override
removeChildback to summary
public boolean removeChild(int i)

Overrides com.openhtmltopdf.render.Box.removeChild.

Doc from com.openhtmltopdf.render.Box.removeChild.

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 Note

This method must be kept in sync with removeChild(Box)

Annotations
@Override
resetChildrenback to summary
protected void resetChildren(LayoutContext c)

Overrides com.openhtmltopdf.render.Box.resetChildren.

Annotations
@Override
setBaselineback to summary
public void setBaseline(int baseline)
setContainingBlockWidthback to summary
public void setContainingBlockWidth(int containingBlockWidth)
setEndsHereback to summary
public void setEndsHere(boolean endsHere)
setInlineWidthback to summary
public void setInlineWidth(int inlineWidth)
setPendingback to summary
public void setPending(boolean b)
setStartsHereback to summary
public void setStartsHere(boolean startsHere)
setTextDecorationsback to summary
public void setTextDecorations(List<TextDecoration> textDecoration)
toStringback to summary
public String toString()

Overrides com.openhtmltopdf.render.Box.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
unmarkPendingback to summary
public void unmarkPending(LayoutContext c)