Package org.xhtmlrenderer.render
Class LineBox
java.lang.Object
org.xhtmlrenderer.render.Box
org.xhtmlrenderer.render.LineBox
- All Implemented Interfaces:
InlinePaintable
,Styleable
A line box contains a single line of text (or other inline content). It
is created during layout. It also tracks floated and absolute content
added while laying out the line.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private boolean
private boolean
private boolean
private int
private boolean
private FloatDistances
private JustificationInfo
private MarkerData
private int
private int
private List<TextDecoration>
private static final float
private static final float
Fields inherited from class org.xhtmlrenderer.render.Box
CHILDREN_FLUX, DONE, DUMP_LAYOUT, DUMP_RENDER, FLUX, NOTHING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllChildren
(List<Box> list, Layer layer) void
private void
void
align
(boolean dynamic) void
analyzePageBreaks
(LayoutContext c, ContentLimitContainer container) void
void
void
checkPagePosition
(LayoutContext c, boolean alwaysBreak) void
clearSelection
(List<Box> modified) void
collectText
(RenderingContext c, StringBuilder buffer) private CharCounts
dump
(LayoutContext c, String indent, int which) void
exportText
(RenderingContext c, Writer writer) find
(CssContext cssCtx, int absX, int absY, boolean findAnonymous) int
int
getMarginEdge
(CssContext cssCtx, int tx, int ty) getPaintingClipEdge
(CssContext cssCtx) int
int
boolean
intersects
(CssContext cssCtx, Shape clip) NOTE: This method does not consider any children of this boxprivate boolean
intersectsInlineBlocks
(CssContext cssCtx, Shape clip) private boolean
intersectsLine
(CssContext cssCtx, Shape clip) boolean
boolean
boolean
boolean
boolean
boolean
boolean
private boolean
void
justify()
private void
void
void
void
void
void
void
setBaseline
(int baseline) void
setContainsBlockLevelContent
(boolean containsBlockLevelContent) void
setContainsContent
(boolean containsContent) void
setContainsDynamicFunction
(boolean containsPageCounter) void
setContentStart
(int contentOffset) void
setEndsOnNL
(boolean endsOnNL) void
setFloatDistances
(FloatDistances floatDistances) private void
setJustificationInfo
(JustificationInfo justificationInfo) void
setMarkerData
(MarkerData markerData) void
setPaintingHeight
(int paintingHeight) void
setPaintingTop
(int paintingTop) void
setTextDecorations
(List<TextDecoration> textDecorations) void
Methods inherited from class org.xhtmlrenderer.render.Box
addAllChildren, addChild, addChildForLayout, appendPosition, appendSize, calcChildPaintingInfo, calcPaintingInfo, connectChildrenToCurrentLayer, crossesPageBreak, detach, dumpBoxes, exportPageBoxText, forcePageBreakAfter, forcePageBreakBefore, getAbsX, getAbsY, getBorder, getBorderEdge, getBorderSides, getBoxDimensions, getChild, getChildCount, getChildren, getChildrenClipEdge, getContainingBlock, getContainingBlockWidth, getContainingLayer, getContentAreaEdge, getContentWidth, getDocumentParent, getEffBackgroundColor, getEffectiveWidth, getElement, getElementBoxes, getHeight, getIndex, getLayer, getLeftMBP, getMargin, getMarginBorderPadding, getMarginEdge, getNext, getNextSibling, getPadding, getPaddingEdge, getPaddingWidth, getPaintingBorderEdge, getPaintingInfo, getPaintingPaddingEdge, getParent, getPrevious, getPreviousSibling, getPseudoElementOrClass, getRelativeOffset, getRightMBP, getState, getStyle, getStyleMargin, getStyleMarginNoCache, getTx, getTy, getWidth, getX, getY, initContainingLayer, isAnonymous, isBody, isContainedInMarginBox, isInDocumentFlow, isInitialContainingBlock, isInlineBlock, isMarginAreaRoot, isRoot, isStyled, moveIfGreater, paintBackground, paintBorder, paintRootElementBackground, positionRelative, removeAllChildren, removeChild, removeChild, resetChildren, resetChildren, resetTopMargin, restyleChildren, 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, toString
-
Field Details
-
JUSTIFY_NON_SPACE_SHARE
private static final float JUSTIFY_NON_SPACE_SHARE- See Also:
-
JUSTIFY_SPACE_SHARE
private static final float JUSTIFY_SPACE_SHARE- See Also:
-
_endsOnNL
private boolean _endsOnNL -
_containsContent
private boolean _containsContent -
_containsBlockLevelContent
private boolean _containsBlockLevelContent -
_floatDistances
-
_textDecorations
-
_paintingTop
private int _paintingTop -
_paintingHeight
private int _paintingHeight -
_nonFlowContent
-
_markerData
-
_containsDynamicFunction
private boolean _containsDynamicFunction -
_contentStart
private int _contentStart -
_baseline
private int _baseline -
_justificationInfo
-
-
Constructor Details
-
LineBox
public LineBox()
-
-
Method Details
-
dump
-
getMarginEdge
- Overrides:
getMarginEdge
in classBox
-
paintInline
- Specified by:
paintInline
in interfaceInlinePaintable
-
lookForDynamicFunctions
-
isFirstLine
public boolean isFirstLine() -
prunePendingInlineBoxes
public void prunePendingInlineBoxes() -
isContainsContent
public boolean isContainsContent() -
setContainsContent
public void setContainsContent(boolean containsContent) -
isEndsOnNL
public boolean isEndsOnNL() -
setEndsOnNL
public void setEndsOnNL(boolean endsOnNL) -
align
public void align(boolean dynamic) -
justify
public void justify() -
adjustChildren
-
isLastLineWithContent
private boolean isLastLineWithContent() -
countJustifiableChars
-
getFloatDistances
-
setFloatDistances
-
isContainsBlockLevelContent
public boolean isContainsBlockLevelContent() -
setContainsBlockLevelContent
public void setContainsBlockLevelContent(boolean containsBlockLevelContent) -
intersects
Description copied from class:Box
NOTE: This method does not consider any children of this box- Overrides:
intersects
in classBox
-
intersectsLine
-
getPaintingClipEdge
- Overrides:
getPaintingClipEdge
in classBox
-
intersectsInlineBlocks
-
getTextDecorations
-
setTextDecorations
-
getPaintingHeight
public int getPaintingHeight() -
setPaintingHeight
public void setPaintingHeight(int paintingHeight) -
getPaintingTop
public int getPaintingTop() -
setPaintingTop
public void setPaintingTop(int paintingTop) -
addAllChildren
-
getNonFlowContent
-
addNonFlowContent
-
reset
-
calcCanvasLocation
public void calcCanvasLocation()- Specified by:
calcCanvasLocation
in classBox
-
calcChildLocations
public void calcChildLocations()- Overrides:
calcChildLocations
in classBox
-
getMarkerData
-
setMarkerData
-
isContainsDynamicFunction
public boolean isContainsDynamicFunction() -
setContainsDynamicFunction
public void setContainsDynamicFunction(boolean containsPageCounter) -
getContentStart
public int getContentStart() -
setContentStart
public void setContentStart(int contentOffset) -
findTrailingText
-
trimTrailingSpace
-
find
-
getBaseline
public int getBaseline() -
setBaseline
public void setBaseline(int baseline) -
isContainsOnlyBlockLevelContent
public boolean isContainsOnlyBlockLevelContent() -
getRestyleTarget
- Overrides:
getRestyleTarget
in classBox
-
restyle
-
isContainsVisibleContent
public boolean isContainsVisibleContent() -
clearSelection
- Overrides:
clearSelection
in classBox
-
selectAll
public void selectAll() -
collectText
- Overrides:
collectText
in classBox
- Throws:
IOException
-
exportText
- Overrides:
exportText
in classBox
- Throws:
IOException
-
analyzePageBreaks
- Overrides:
analyzePageBreaks
in classBox
-
checkPagePosition
-
getJustificationInfo
-
setJustificationInfo
-