java.lang.Object
org.openpdf.render.Box
- All Implemented Interfaces:
Styleable
- Direct Known Subclasses:
BlockBox,InlineLayoutBox,LineBox
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBox(@Nullable Box parent, @Nullable CalculatedStyle style) protectedBox(@Nullable Element element, @Nullable CalculatedStyle style, boolean anonymous) -
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, Box.Dump which) protected voiddumpBoxes(LayoutContext c, String indent, List<Box> boxes, Box.Dump which, StringBuilder result) protected voidexportPageBoxText(RenderingContext c, Writer writer, int yPos) voidexportText(RenderingContext c, Writer writer) @Nullable Boxfind(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) int@Nullable Boxprotected int@Nullable LayergetContentAreaEdge(int left, int top, CssContext cssCtx) intint@Nullable ElementgetElementBoxes(Element elem) intprotected intgetIndex()@Nullable LayergetLayer()intgetMargin(CssContext cssContext) intgetMarginBorderPadding(CssContext cssCtx, CalculatedStyle.Edge edge) getMarginEdge(int left, int top, CssContext cssCtx, int tx, int ty) getMarginEdge(CssContext cssCtx, int tx, int ty) protected @Nullable Box@Nullable BoxgetPadding(CssContext cssCtx) getPaddingEdge(int left, int top, CssContext cssCtx) protected intgetPaddingWidth(CssContext cssCtx) getPaintingBorderEdge(CssContext cssCtx) getPaintingClipEdge(CssContext cssCtx) @Nullable PaintingInfogetPaintingPaddingEdge(CssContext cssCtx) @Nullable Boxprotected @Nullable BoxgetPrevious(Box child) @Nullable Box@Nullable String@Nullable DimensionintgetState()final @Nullable CalculatedStylegetStyle()protected RectPropertySetgetStyleMargin(CssContext cssContext) protected RectPropertySetgetStyleMarginNoCache(CssContext cssContext) intgetTx()intgetTy()intgetWidth()intgetX()intgetY()voidbooleanintersects(CssContext cssCtx, @Nullable Shape clip) NOTE: This method does not consider any children of this boxbooleanbooleanisBody()booleanbooleanprotected booleanprotected booleanprotected booleanbooleanisRoot()booleanisStyled()protected voidmoveIfGreater(Dimension result, Dimension test) voidvoidvoid@Nullable DimensionpositionRelative(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) voidsetBoxDimensions(BoxDimensions dimensions) voidsetContainingBlock(Box containingBlock) voidsetContainingLayer(@Nullable Layer containingLayer) voidsetContentWidth(int contentWidth) final voidsetElement(@Nullable Element element) voidsetHeight(int height) protected voidsetIndex(int index) voidvoidsetLeftMBP(int leftMBP) protected voidsetMarginBottom(CssContext cssContext, int marginBottom) voidsetMarginLeft(CssContext cssContext, int marginLeft) protected voidsetMarginRight(CssContext cssContext, int marginRight) protected final voidsetMarginTop(CssContext cssContext, int marginTop) voidvoidsetPseudoElementOrClass(String pseudoElementOrClass) voidsetRightMBP(int rightMBP) voidvoidsetStyle(@Nullable CalculatedStyle style) voidsetTx(int tx) voidsetTy(int ty) voidsetX(int x) voidsetY(int y) toString()
-
Constructor Details
-
Box
-
Box
-
-
Method Details
-
dump
-
dumpBoxes
protected void dumpBoxes(LayoutContext c, String indent, List<Box> boxes, Box.Dump 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
-
getChildCount
public int getChildCount() -
getChild
-
getChildren
-
getState
-
setState
-
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
-
find
@CheckReturnValue public @Nullable Box find(CssContext cssCtx, int absX, int absY, boolean findAnonymous) -
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() -
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()
-