Package org.xhtmlrenderer.render
Class InlineLayoutBox
java.lang.Object
org.xhtmlrenderer.render.Box
org.xhtmlrenderer.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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private int
private boolean
private int
private boolean
private boolean
private List<TextDecoration>
Fields inherited from class org.xhtmlrenderer.render.Box
CHILDREN_FLUX, DONE, DUMP_LAYOUT, DUMP_RENDER, FLUX, NOTHING
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
InlineLayoutBox
(LayoutContext c, Element elem, CalculatedStyle style, int cbWidth) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllChildren
(List<Box> list, Layer layer) private AnonymousBlockBox
addFollowingBlockBoxes
(BlockBox container, List<Box> result) void
addInlineChild
(LayoutContext c, Object child) void
addInlineChild
(LayoutContext c, Object child, boolean callUnmarkPending) private void
addToContentList
(List<Box> list) float
adjustHorizontalPosition
(JustificationInfo info, float adjust) void
void
protected void
calcChildPaintingInfo
(CssContext c, PaintingInfo result, boolean useCache) void
void
void
clearSelection
(List<Box> modified) void
collectText
(RenderingContext c, StringBuilder buffer) void
private boolean
containsEnd
(List<Box> result) copyOf()
void
countJustifiableChars
(CharCounts counts) dump
(LayoutContext c, String indent, int which) find
(CssContext cssCtx, int absX, int absY, boolean findAnonymous) int
getBorderEdge
(int left, int top, CssContext cssCtx) int
int
getContentAreaEdge
(int left, int top, CssContext cssCtx) int
getElementBoxes
(Element elem) getInlineChild
(int i) int
int
int
getInlineWidth
(CssContext cssContext) int
getLeftMarginBorderPadding
(CssContext cssCtx) getMarginEdge
(int left, int top, CssContext cssCtx, int tx, int ty) protected Box
protected Box
getPrevious
(Box child) int
boolean
intersectsInlineBlocks
(CssContext cssCtx, Shape clip) boolean
boolean
boolean
boolean
void
void
void
void
positionRelative
(CssContext cssCtx) void
void
removeChild
(int i) void
removeChild
(Box child) protected void
void
protected void
void
void
setBaseline
(int baseline) void
setContainingBlockWidth
(int containingBlockWidth) void
setEndsHere
(boolean endsHere) void
setInlineWidth
(int inlineWidth) void
setPending
(boolean b) void
setStartsHere
(boolean startsHere) void
setTextDecorations
(List<TextDecoration> textDecoration) toString()
void
Methods inherited from class org.xhtmlrenderer.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, getDocumentParent, 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, setAnonymous, 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
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:
connectChildrenToCurrentLayer
in classBox
-
paintSelection
-
paintInline
- Specified by:
paintInline
in interfaceInlinePaintable
-
getBorderSides
public int getBorderSides()- Overrides:
getBorderSides
in classBox
-
getBorderEdge
- Overrides:
getBorderEdge
in classBox
-
getMarginEdge
- Overrides:
getMarginEdge
in classBox
-
getContentAreaEdge
- Overrides:
getContentAreaEdge
in classBox
-
getLeftMarginBorderPadding
-
getRightMarginPaddingBorder
-
getInlineWidth
public int getInlineWidth() -
setInlineWidth
public void setInlineWidth(int inlineWidth) -
isContainsVisibleContent
public boolean isContainsVisibleContent() -
intersectsInlineBlocks
-
getTextDecorations
-
setTextDecorations
-
addToContentList
-
getLineBox
-
getElementWithContent
-
addFollowingBlockBoxes
-
containsEnd
-
getElementBoxes
- Overrides:
getElementBoxes
in classBox
-
positionRelative
- Overrides:
positionRelative
in classBox
-
addAllChildren
-
paintDebugOutline
-
resetChildren
- Overrides:
resetChildren
in classBox
-
removeChild
- Overrides:
removeChild
in classBox
-
removeChild
public void removeChild(int i) - Overrides:
removeChild
in classBox
-
getPrevious
- Overrides:
getPrevious
in classBox
-
getNext
-
calcCanvasLocation
public void calcCanvasLocation()- Specified by:
calcCanvasLocation
in classBox
-
calcChildLocations
public void calcChildLocations()- Overrides:
calcChildLocations
in classBox
-
clearSelection
- Overrides:
clearSelection
in classBox
-
selectAll
public void selectAll() -
calcChildPaintingInfo
- Overrides:
calcChildPaintingInfo
in classBox
-
lookForDynamicFunctions
-
findTrailingText
-
calculateTextDecoration
-
find
-
getContainingBlockWidth
public int getContainingBlockWidth()- Overrides:
getContainingBlockWidth
in classBox
-
setContainingBlockWidth
public void setContainingBlockWidth(int containingBlockWidth) -
toString
-
dump
-
restyle
-
restyleChildren
- Overrides:
restyleChildren
in classBox
-
getRestyleTarget
- Overrides:
getRestyleTarget
in classBox
-
collectText
- Overrides:
collectText
in classBox
- Throws:
IOException
-
countJustifiableChars
-
adjustHorizontalPosition
-
getEffectiveWidth
public int getEffectiveWidth()- Overrides:
getEffectiveWidth
in classBox
-