org.xhtmlrenderer.render
Class InlineLayoutBox
java.lang.Object
org.xhtmlrenderer.render.Box
org.xhtmlrenderer.render.InlineLayoutBox
- All Implemented Interfaces:
- InlinePaintable, Styleable
public class InlineLayoutBox
- extends Box
- implements InlinePaintable
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.
Method Summary |
void |
addAllChildren(List list,
Layer layer)
|
void |
addInlineChild(LayoutContext c,
Object child)
|
void |
addInlineChild(LayoutContext c,
Object child,
boolean callUnmarkPending)
|
float |
adjustHorizontalPosition(JustificationInfo info,
float adjust)
|
void |
calcCanvasLocation()
|
void |
calcChildLocations()
|
protected void |
calcChildPaintingInfo(CssContext c,
PaintingInfo result,
boolean useCache)
|
void |
calculateHeight(LayoutContext c)
|
void |
calculateTextDecoration(LayoutContext c)
|
void |
clearSelection(List modified)
|
void |
collectText(RenderingContext c,
StringBuffer buffer)
|
void |
connectChildrenToCurrentLayer(LayoutContext c)
|
InlineLayoutBox |
copyOf()
|
void |
countJustifiableChars(CharCounts counts)
|
String |
dump(LayoutContext c,
String indent,
int which)
|
Box |
find(CssContext cssCtx,
int absX,
int absY,
boolean findAnonymous)
|
InlineText |
findTrailingText()
|
int |
getBaseline()
|
Rectangle |
getBorderEdge(int left,
int top,
CssContext cssCtx)
|
int |
getBorderSides()
|
int |
getContainingBlockWidth()
|
Rectangle |
getContentAreaEdge(int left,
int top,
CssContext cssCtx)
|
int |
getEffectiveWidth()
|
List |
getElementBoxes(Element elem)
|
List |
getElementWithContent()
|
Object |
getInlineChild(int i)
|
int |
getInlineChildCount()
|
List |
getInlineChildren()
|
int |
getInlineWidth()
|
int |
getInlineWidth(CssContext cssCtx)
|
int |
getLeftMarginBorderPadding(CssContext cssCtx)
|
LineBox |
getLineBox()
|
Rectangle |
getMarginEdge(int left,
int top,
CssContext cssCtx,
int tx,
int ty)
|
protected Box |
getNext(Box child)
|
protected Box |
getPrevious(Box child)
|
Box |
getRestyleTarget()
|
int |
getRightMarginPaddingBorder(CssContext cssCtx)
|
List |
getTextDecorations()
|
boolean |
intersectsInlineBlocks(CssContext cssCtx,
Shape clip)
|
boolean |
isContainsVisibleContent()
|
boolean |
isEndsHere()
|
boolean |
isPending()
|
boolean |
isStartsHere()
|
void |
lookForDynamicFunctions(RenderingContext c)
|
void |
paintDebugOutline(RenderingContext c)
|
void |
paintInline(RenderingContext c)
|
void |
paintSelection(RenderingContext c)
|
Dimension |
positionRelative(CssContext cssCtx)
|
void |
prunePending()
|
void |
removeChild(Box child)
|
void |
removeChild(int i)
|
protected void |
resetChildren(LayoutContext c)
|
void |
restyle(LayoutContext c)
|
protected void |
restyleChildren(LayoutContext c)
|
void |
selectAll()
|
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)
|
String |
toString()
|
void |
unmarkPending(LayoutContext c)
|
Methods inherited from class org.xhtmlrenderer.render.Box |
addAllChildren, addChild, addChildForLayout, analyzePageBreaks, calcPaintingInfo, crossesPageBreak, detach, dumpBoxes, exportPageBoxText, exportText, forcePageBreakAfter, forcePageBreakBefore, getAbsX, getAbsY, getBorder, getBoxDimensions, getChild, getChildCount, getChildIterator, 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, getStyleMargin, getTx, getTy, getWidth, getX, getY, initContainingLayer, intersects, isAnonymous, isBody, isContainedInMarginBox, isInDocumentFlow, 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 |
InlineLayoutBox
public InlineLayoutBox(LayoutContext c,
Element elem,
CalculatedStyle style,
int cbWidth)
copyOf
public InlineLayoutBox copyOf()
calculateHeight
public void calculateHeight(LayoutContext c)
getBaseline
public int getBaseline()
setBaseline
public void setBaseline(int baseline)
getInlineChildCount
public int getInlineChildCount()
addInlineChild
public void addInlineChild(LayoutContext c,
Object child)
addInlineChild
public void addInlineChild(LayoutContext c,
Object child,
boolean callUnmarkPending)
getInlineChildren
public List getInlineChildren()
getInlineChild
public Object getInlineChild(int i)
getInlineWidth
public int getInlineWidth(CssContext cssCtx)
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
public void unmarkPending(LayoutContext c)
connectChildrenToCurrentLayer
public void connectChildrenToCurrentLayer(LayoutContext c)
- Overrides:
connectChildrenToCurrentLayer
in class Box
paintSelection
public void paintSelection(RenderingContext c)
paintInline
public void paintInline(RenderingContext c)
- Specified by:
paintInline
in interface InlinePaintable
getBorderSides
public int getBorderSides()
- Overrides:
getBorderSides
in class Box
getBorderEdge
public Rectangle getBorderEdge(int left,
int top,
CssContext cssCtx)
- Overrides:
getBorderEdge
in class Box
getMarginEdge
public Rectangle getMarginEdge(int left,
int top,
CssContext cssCtx,
int tx,
int ty)
- Overrides:
getMarginEdge
in class Box
getContentAreaEdge
public Rectangle getContentAreaEdge(int left,
int top,
CssContext cssCtx)
- Overrides:
getContentAreaEdge
in class Box
getLeftMarginBorderPadding
public int getLeftMarginBorderPadding(CssContext cssCtx)
getRightMarginPaddingBorder
public int getRightMarginPaddingBorder(CssContext cssCtx)
getInlineWidth
public int getInlineWidth()
setInlineWidth
public void setInlineWidth(int inlineWidth)
isContainsVisibleContent
public boolean isContainsVisibleContent()
intersectsInlineBlocks
public boolean intersectsInlineBlocks(CssContext cssCtx,
Shape clip)
getTextDecorations
public List getTextDecorations()
setTextDecorations
public void setTextDecorations(List textDecoration)
getLineBox
public LineBox getLineBox()
getElementWithContent
public List getElementWithContent()
getElementBoxes
public List getElementBoxes(Element elem)
- Overrides:
getElementBoxes
in class Box
positionRelative
public Dimension positionRelative(CssContext cssCtx)
- Overrides:
positionRelative
in class Box
addAllChildren
public void addAllChildren(List list,
Layer layer)
paintDebugOutline
public void paintDebugOutline(RenderingContext c)
resetChildren
protected void resetChildren(LayoutContext c)
- Overrides:
resetChildren
in class Box
removeChild
public void removeChild(Box child)
- Overrides:
removeChild
in class Box
removeChild
public void removeChild(int i)
- Overrides:
removeChild
in class Box
getPrevious
protected Box getPrevious(Box child)
- Overrides:
getPrevious
in class Box
getNext
protected Box getNext(Box child)
- Overrides:
getNext
in class Box
calcCanvasLocation
public void calcCanvasLocation()
- Specified by:
calcCanvasLocation
in class Box
calcChildLocations
public void calcChildLocations()
- Overrides:
calcChildLocations
in class Box
clearSelection
public void clearSelection(List modified)
- Overrides:
clearSelection
in class Box
selectAll
public void selectAll()
- Overrides:
selectAll
in class Box
calcChildPaintingInfo
protected void calcChildPaintingInfo(CssContext c,
PaintingInfo result,
boolean useCache)
- Overrides:
calcChildPaintingInfo
in class Box
lookForDynamicFunctions
public void lookForDynamicFunctions(RenderingContext c)
findTrailingText
public InlineText findTrailingText()
calculateTextDecoration
public void calculateTextDecoration(LayoutContext c)
find
public Box find(CssContext cssCtx,
int absX,
int absY,
boolean findAnonymous)
- Overrides:
find
in class Box
getContainingBlockWidth
public int getContainingBlockWidth()
- Overrides:
getContainingBlockWidth
in class Box
setContainingBlockWidth
public void setContainingBlockWidth(int containingBlockWidth)
toString
public String toString()
- Overrides:
toString
in class Box
dump
public String dump(LayoutContext c,
String indent,
int which)
- Specified by:
dump
in class Box
restyle
public void restyle(LayoutContext c)
- Overrides:
restyle
in class Box
restyleChildren
protected void restyleChildren(LayoutContext c)
- Overrides:
restyleChildren
in class Box
getRestyleTarget
public Box getRestyleTarget()
- Overrides:
getRestyleTarget
in class Box
collectText
public void collectText(RenderingContext c,
StringBuffer buffer)
throws IOException
- Overrides:
collectText
in class Box
- Throws:
IOException
countJustifiableChars
public void countJustifiableChars(CharCounts counts)
adjustHorizontalPosition
public float adjustHorizontalPosition(JustificationInfo info,
float adjust)
getEffectiveWidth
public int getEffectiveWidth()
- Overrides:
getEffectiveWidth
in class Box
Copyright © 2013. All Rights Reserved.