Package org.xhtmlrenderer.render
Class BlockBox
- java.lang.Object
-
- org.xhtmlrenderer.render.Box
-
- org.xhtmlrenderer.render.BlockBox
-
- All Implemented Interfaces:
InlinePaintable
,Styleable
- Direct Known Subclasses:
AnonymousBlockBox
,MarginBox
,TableBox
,TableCellBox
,TableRowBox
,TableSectionBox
,ViewportBox
public class BlockBox extends Box implements InlinePaintable
A block box as defined in the CSS spec. It also provides a base class for other kinds of block content (for example table rows or cells).
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONTENT_BLOCK
static int
CONTENT_EMPTY
static int
CONTENT_INLINE
static int
CONTENT_UNKNOWN
static int
POSITION_BOTH
static int
POSITION_HORIZONTALLY
static int
POSITION_VERTICALLY
-
Fields inherited from class org.xhtmlrenderer.render.Box
CHILDREN_FLUX, DONE, DUMP_LAYOUT, DUMP_RENDER, FLUX, NOTHING
-
-
Constructor Summary
Constructors Constructor Description BlockBox()
-
Method Summary
-
Methods inherited from class org.xhtmlrenderer.render.Box
addAllChildren, addChild, addChildForLayout, analyzePageBreaks, calcPaintingInfo, clearSelection, collectText, connectChildrenToCurrentLayer, crossesPageBreak, detach, exportText, find, forcePageBreakAfter, forcePageBreakBefore, getAbsX, getAbsY, getBorder, getBorderEdge, getBorderSides, getBoxDimensions, getChild, getChildCount, getChildIterator, getChildren, getChildrenClipEdge, getContainingBlock, getContainingLayer, getContentAreaEdge, getContentWidth, getEffBackgroundColor, getEffectiveWidth, getElement, getElementBoxes, getHeight, getLayer, getLeftMBP, getMargin, getMarginBorderPadding, getMarginEdge, getMarginEdge, getNextSibling, getPadding, getPaddingEdge, getPaintingBorderEdge, getPaintingInfo, getPaintingPaddingEdge, getParent, getPreviousSibling, getPseudoElementOrClass, getRelativeOffset, getRestyleTarget, getRightMBP, getState, getStyle, getTx, getTy, getWidth, getX, getY, initContainingLayer, intersects, isAnonymous, isBody, isContainedInMarginBox, isInDocumentFlow, isRoot, isStyled, paintBackground, paintBorder, paintRootElementBackground, positionRelative, removeAllChildren, removeChild, removeChild, resetChildren, restyle, selectAll, setAbsX, setAbsY, setAnonymous, setBoxDimensions, setContainingBlock, setContainingLayer, setContentWidth, setElement, setHeight, setLayer, setLeftMBP, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setParent, setPseudoElementOrClass, setRelativeOffset, setRightMBP, setState, setStyle, setTx, setTy, setX, setY, stateToString
-
-
-
-
Field Detail
-
POSITION_VERTICALLY
public static final int POSITION_VERTICALLY
- See Also:
- Constant Field Values
-
POSITION_HORIZONTALLY
public static final int POSITION_HORIZONTALLY
- See Also:
- Constant Field Values
-
POSITION_BOTH
public static final int POSITION_BOTH
- See Also:
- Constant Field Values
-
CONTENT_UNKNOWN
public static final int CONTENT_UNKNOWN
- See Also:
- Constant Field Values
-
CONTENT_INLINE
public static final int CONTENT_INLINE
- See Also:
- Constant Field Values
-
CONTENT_BLOCK
public static final int CONTENT_BLOCK
- See Also:
- Constant Field Values
-
CONTENT_EMPTY
public static final int CONTENT_EMPTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
copyOf
public BlockBox copyOf()
-
dump
public java.lang.String dump(LayoutContext c, java.lang.String indent, int which)
-
paintListMarker
public void paintListMarker(RenderingContext c)
-
getPaintingClipEdge
public java.awt.Rectangle getPaintingClipEdge(CssContext cssCtx)
- Overrides:
getPaintingClipEdge
in classBox
-
paintInline
public void paintInline(RenderingContext c)
- Specified by:
paintInline
in interfaceInlinePaintable
-
isInline
public boolean isInline()
-
getLineBox
public LineBox getLineBox()
-
paintDebugOutline
public void paintDebugOutline(RenderingContext c)
-
getMarkerData
public MarkerData getMarkerData()
-
setMarkerData
public void setMarkerData(MarkerData markerData)
-
createMarkerData
public void createMarkerData(LayoutContext c)
-
getListCounter
public int getListCounter()
-
setListCounter
public void setListCounter(int listCounter)
-
getPersistentBFC
public PersistentBFC getPersistentBFC()
-
setPersistentBFC
public void setPersistentBFC(PersistentBFC persistentBFC)
-
getStaticEquivalent
public Box getStaticEquivalent()
-
setStaticEquivalent
public void setStaticEquivalent(Box staticEquivalent)
-
isReplaced
public boolean isReplaced()
-
calcCanvasLocation
public void calcCanvasLocation()
- Specified by:
calcCanvasLocation
in classBox
-
calcInitialFloatedCanvasLocation
public void calcInitialFloatedCanvasLocation(LayoutContext c)
-
calcChildLocations
public void calcChildLocations()
- Overrides:
calcChildLocations
in classBox
-
isNeedPageClear
public boolean isNeedPageClear()
-
setNeedPageClear
public void setNeedPageClear(boolean needPageClear)
-
positionAbsolute
public void positionAbsolute(CssContext cssCtx, int direction)
-
positionAbsoluteOnPage
public void positionAbsoluteOnPage(LayoutContext c)
-
getReplacedElement
public ReplacedElement getReplacedElement()
-
setReplacedElement
public void setReplacedElement(ReplacedElement replacedElement)
-
reset
public void reset(LayoutContext c)
-
calcDimensions
public void calcDimensions(LayoutContext c)
-
layout
public void layout(LayoutContext c)
-
layout
public void layout(LayoutContext c, int contentStart)
-
ensureChildren
public void ensureChildren(LayoutContext c)
-
getChildrenContentType
public int getChildrenContentType()
-
setChildrenContentType
public void setChildrenContentType(int contentType)
-
getInlineContent
public java.util.List getInlineContent()
-
setInlineContent
public void setInlineContent(java.util.List inlineContent)
-
isTopMarginCalculated
public boolean isTopMarginCalculated()
-
setTopMarginCalculated
public void setTopMarginCalculated(boolean topMarginCalculated)
-
isBottomMarginCalculated
public boolean isBottomMarginCalculated()
-
setBottomMarginCalculated
public void setBottomMarginCalculated(boolean bottomMarginCalculated)
-
isAutoHeight
public boolean isAutoHeight()
-
calcMinMaxWidth
public void calcMinMaxWidth(LayoutContext c)
-
getMaxWidth
public int getMaxWidth()
-
getMinWidth
public int getMinWidth()
-
styleText
public void styleText(LayoutContext c)
-
styleText
public void styleText(LayoutContext c, CalculatedStyle style)
-
getFirstLetterStyle
public CascadedStyle getFirstLetterStyle()
-
setFirstLetterStyle
public void setFirstLetterStyle(CascadedStyle firstLetterStyle)
-
getFirstLineStyle
public CascadedStyle getFirstLineStyle()
-
setFirstLineStyle
public void setFirstLineStyle(CascadedStyle firstLineStyle)
-
initStaticPos
public void initStaticPos(LayoutContext c, BlockBox parent, int childOffset)
-
calcBaseline
public int calcBaseline(LayoutContext c)
-
isCurrentBreakAtLineContext
public boolean isCurrentBreakAtLineContext(LayoutContext c)
-
calcBreakAtLineContext
public BreakAtLineContext calcBreakAtLineContext(LayoutContext c)
-
calcInlineBaseline
public int calcInlineBaseline(CssContext c)
-
findOffset
public int findOffset(Box box)
-
findLastNthLineBox
public LineBox findLastNthLineBox(int count)
-
isNeedsKeepWithInline
public boolean isNeedsKeepWithInline(LayoutContext c)
-
isFloated
public boolean isFloated()
-
getFloatedBoxData
public FloatedBoxData getFloatedBoxData()
-
setFloatedBoxData
public void setFloatedBoxData(FloatedBoxData floatedBoxData)
-
getChildrenHeight
public int getChildrenHeight()
-
isFromCaptionedTable
public boolean isFromCaptionedTable()
-
setFromCaptionedTable
public void setFromCaptionedTable(boolean fromTable)
-
isInMainFlow
public boolean isInMainFlow()
-
getDocumentParent
public Box getDocumentParent()
- Overrides:
getDocumentParent
in classBox
-
isContainsInlineContent
public boolean isContainsInlineContent(LayoutContext c)
-
checkPageContext
public boolean checkPageContext(LayoutContext c)
-
isNeedsClipOnPaint
public boolean isNeedsClipOnPaint(RenderingContext c)
-
-