java.lang.Object
org.xhtmlrenderer.render.Box
- All Implemented Interfaces:
Styleable
- Direct Known Subclasses:
BlockBox,InlineLayoutBox,LineBox
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllChildren(List<Box> children) voidvoidaddChildForLayout(LayoutContext c, Box child) voidanalyzePageBreaks(LayoutContext c, ContentLimitContainer container) protected voidappendPosition(StringBuilder result) protected voidappendSize(StringBuilder result) abstract voidvoidprotected voidcalcChildPaintingInfo(CssContext c, PaintingInfo result, boolean useCache) calcPaintingInfo(CssContext c, boolean useCache) voidclearSelection(List<Box> modified) voidcollectText(RenderingContext c, StringBuilder buffer) voidbooleanvoidabstract Stringdump(LayoutContext c, String indent, int which) protected voiddumpBoxes(LayoutContext c, String indent, List<Box> boxes, int which, StringBuilder result) protected voidexportPageBoxText(RenderingContext c, Writer writer, int yPos) voidexportText(RenderingContext c, Writer writer) find(CssContext cssCtx, int absX, int absY, boolean findAnonymous) voidforcePageBreakAfter(LayoutContext c, IdentValue pageBreakValue) intforcePageBreakBefore(LayoutContext c, IdentValue pageBreakValue, boolean pendingPageName) intgetAbsX()intgetAbsY()getBorder(CssContext cssCtx) getBorderEdge(int left, int top, CssContext cssCtx) intgetChild(int i) intprotected intgetContentAreaEdge(int left, int top, CssContext cssCtx) intintgetElementBoxes(Element elem) intprotected intgetIndex()getLayer()intgetMargin(CssContext cssContext) intgetMarginBorderPadding(CssContext cssCtx, int which) getMarginEdge(int left, int top, CssContext cssCtx, int tx, int ty) getMarginEdge(CssContext cssCtx, int tx, int ty) protected BoxgetPadding(CssContext cssCtx) getPaddingEdge(int left, int top, CssContext cssCtx) protected intgetPaddingWidth(CssContext cssCtx) getPaintingBorderEdge(CssContext cssCtx) getPaintingClipEdge(CssContext cssCtx) getPaintingPaddingEdge(CssContext cssCtx) protected BoxgetPrevious(Box child) intintgetState()final CalculatedStylegetStyle()protected RectPropertySetgetStyleMargin(CssContext cssContext) protected RectPropertySetgetStyleMarginNoCache(CssContext cssContext) intgetTx()intgetTy()intgetWidth()intgetX()intgetY()voidbooleanintersects(CssContext cssCtx, Shape clip) NOTE: This method does not consider any children of this boxbooleanbooleanisBody()booleanbooleanprotected booleanprotected booleanprotected booleanbooleanisRoot()booleanisStyled()protected voidmoveIfGreater(Dimension result, Dimension test) voidvoidvoidpositionRelative(CssContext cssCtx) voidvoidremoveChild(int i) voidremoveChild(Box target) voidprotected voidvoidresetChildren(LayoutContext c, int start, int end) protected voidresetTopMargin(CssContext cssContext) voidprotected voidvoidvoidsetAbsX(int absX) voidsetAbsY(int absY) voidsetAnonymous(boolean anonymous) voidsetBoxDimensions(BoxDimensions dimensions) voidsetContainingBlock(Box containingBlock) voidsetContainingLayer(Layer containingLayer) voidsetContentWidth(int contentWidth) final voidsetElement(Element element) voidsetHeight(int height) protected voidsetIndex(int index) voidvoidsetLeftMBP(int leftMBP) voidsetMarginBottom(CssContext cssContext, int marginBottom) voidsetMarginLeft(CssContext cssContext, int marginLeft) voidsetMarginRight(CssContext cssContext, int marginRight) voidsetMarginTop(CssContext cssContext, int marginTop) voidvoidsetPseudoElementOrClass(String pseudoElementOrClass) voidsetRelativeOffset(Dimension relativeOffset) voidsetRightMBP(int rightMBP) voidsetState(int state) voidsetStyle(CalculatedStyle style) voidsetTx(int tx) voidsetTy(int ty) voidsetX(int x) voidsetY(int y) static StringstateToString(int state) toString()
-
Field Details
-
NOTHING
public static final int NOTHING- See Also:
-
FLUX
public static final int FLUX- See Also:
-
CHILDREN_FLUX
public static final int CHILDREN_FLUX- See Also:
-
DONE
public static final int DONE- See Also:
-
DUMP_RENDER
public static final int DUMP_RENDER- See Also:
-
DUMP_LAYOUT
public static final int DUMP_LAYOUT- See Also:
-
-
Constructor Details
-
Box
protected Box()
-
-
Method Details
-
dump
-
dumpBoxes
protected void dumpBoxes(LayoutContext c, String indent, List<Box> boxes, int which, StringBuilder result) -
getWidth
public int getWidth() -
toString
-
appendPosition
-
appendSize
-
addChildForLayout
-
addChild
-
addAllChildren
-
removeAllChildren
public void removeAllChildren() -
removeChild
-
getPreviousSibling
-
getNextSibling
-
getPrevious
-
getNext
-
removeChild
public void removeChild(int i) -
setParent
-
getParent
-
getDocumentParent
-
getChildCount
public int getChildCount() -
getChild
-
getChildren
-
getState
public int getState() -
setState
public void setState(int state) -
stateToString
-
getStyle
-
setStyle
-
getContainingBlock
-
setContainingBlock
-
getMarginEdge
-
getMarginEdge
-
getPaintingBorderEdge
-
getPaintingPaddingEdge
-
getPaintingClipEdge
-
getChildrenClipEdge
-
intersects
NOTE: This method does not consider any children of this box -
getBorderEdge
-
getPaddingEdge
-
getPaddingWidth
-
getContentAreaEdge
-
getLayer
-
setLayer
-
positionRelative
-
isInlineBlock
protected boolean isInlineBlock() -
setAbsY
public void setAbsY(int absY) -
getAbsY
public int getAbsY() -
setAbsX
public void setAbsX(int absX) -
getAbsX
public int getAbsX() -
isStyled
public boolean isStyled() -
getBorderSides
public int getBorderSides() -
paintBorder
-
paintBackground
-
paintRootElementBackground
-
getContainingLayer
-
setContainingLayer
-
initContainingLayer
-
connectChildrenToCurrentLayer
-
getElementBoxes
-
reset
-
detach
-
resetChildren
-
resetChildren
-
calcCanvasLocation
public abstract void calcCanvasLocation() -
calcChildLocations
public void calcChildLocations() -
forcePageBreakBefore
public int forcePageBreakBefore(LayoutContext c, IdentValue pageBreakValue, boolean pendingPageName) -
forcePageBreakAfter
-
crossesPageBreak
-
getRelativeOffset
-
setRelativeOffset
-
find
-
isRoot
public boolean isRoot() -
isBody
public boolean isBody() -
getElement
- Specified by:
getElementin interfaceStyleable
-
setElement
- Specified by:
setElementin interfaceStyleable
-
setMarginTop
-
setMarginBottom
-
setMarginLeft
-
setMarginRight
-
getMargin
-
getStyleMargin
-
getStyleMarginNoCache
-
getPadding
-
getBorder
-
getContainingBlockWidth
protected int getContainingBlockWidth() -
resetTopMargin
-
clearSelection
-
selectAll
public void selectAll() -
calcPaintingInfo
-
calcChildPaintingInfo
-
getMarginBorderPadding
-
moveIfGreater
-
restyle
-
restyleChildren
-
getRestyleTarget
-
getIndex
protected int getIndex() -
setIndex
protected void setIndex(int index) -
getPseudoElementOrClass
- Specified by:
getPseudoElementOrClassin interfaceStyleable
-
setPseudoElementOrClass
-
setX
public void setX(int x) -
getX
public int getX() -
setY
public void setY(int y) -
getY
public int getY() -
setTy
public void setTy(int ty) -
getTy
public int getTy() -
setTx
public void setTx(int tx) -
getTx
public int getTx() -
setRightMBP
public void setRightMBP(int rightMBP) -
getRightMBP
public int getRightMBP() -
setLeftMBP
public void setLeftMBP(int leftMBP) -
getLeftMBP
public int getLeftMBP() -
setHeight
public void setHeight(int height) -
getHeight
public int getHeight() -
setContentWidth
public void setContentWidth(int contentWidth) -
getContentWidth
public int getContentWidth() -
getPaintingInfo
-
isAnonymous
public boolean isAnonymous() -
setAnonymous
public void setAnonymous(boolean anonymous) -
getBoxDimensions
-
setBoxDimensions
-
collectText
- Throws:
IOException
-
exportText
- Throws:
IOException
-
exportPageBoxText
- Throws:
IOException
-
isInDocumentFlow
public boolean isInDocumentFlow() -
analyzePageBreaks
-
getEffBackgroundColor
-
isMarginAreaRoot
protected boolean isMarginAreaRoot() -
isContainedInMarginBox
public boolean isContainedInMarginBox() -
getEffectiveWidth
public int getEffectiveWidth() -
isInitialContainingBlock
protected boolean isInitialContainingBlock()
-