Package org.xhtmlrenderer.newtable
Class TableBox
java.lang.Object
org.xhtmlrenderer.render.Box
org.xhtmlrenderer.render.BlockBox
org.xhtmlrenderer.newtable.TableBox
- All Implemented Interfaces:
InlinePaintable
,Styleable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
private static class
A specialization ofAutoTableLayout
used for laying out the tables used to approximate the margin box layout algorithm from CSS3 GCPM.private static interface
Nested classes/interfaces inherited from class org.xhtmlrenderer.render.BlockBox
BlockBox.ContentType, BlockBox.Position
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int @Nullable []
private final List<ColumnData>
private @Nullable ContentLimitContainer
private int
private int
private boolean
private int
private @Nullable List<TableColumn>
private @Nullable TableBox.TableLayout
Fields inherited from class org.xhtmlrenderer.render.BlockBox
NO_BASELINE
-
Constructor Summary
ConstructorsConstructorDescriptionTableBox
(@Nullable Element element, @Nullable CalculatedStyle style, boolean anonymous) -
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
void
analyzePageBreaks
(LayoutContext c, @Nullable ContentLimitContainer container) void
appendColumn
(int span) private void
int
int
protected void
calcLayoutHeight
(LayoutContext c, BorderPropertySet border, RectPropertySet margin, RectPropertySet padding) void
private void
private void
protected @Nullable TableCellBox
cellAbove
(TableCellBox cell) protected TableCellBox
cellBelow
(TableCellBox cell) protected TableCellBox
cellLeft
(TableCellBox cell) protected TableCellBox
cellRight
(TableCellBox cell) @Nullable TableColumn
colElement
(int col) int
colToEffCol
(int col) copyOf()
int
effColToCol
(int effCol) getBorder
(CssContext cssCtx) getColumnBounds
(CssContext c, int col) int[]
private Rectangle
protected int
int
int
protected int
boolean
protected boolean
boolean
protected boolean
private boolean
void
protected void
layoutChildren
(LayoutContext c, int contentStart) private int
private int
private void
int
marginsBordersPaddingAndSpacing
(CssContext c, boolean ignoreAutoMargins) int
void
void
private void
void
protected void
resolveAutoMargins
(LayoutContext c, int cssWidth, RectPropertySet padding, BorderPropertySet border) protected @Nullable TableSectionBox
sectionAbove
(TableSectionBox section, boolean skipEmptySections) protected TableSectionBox
sectionBelow
(TableSectionBox section, boolean skipEmptySections) private void
private void
setColumnPos
(int[] columnPos) void
setExtraSpaceBottom
(int extraSpaceBottom) void
setExtraSpaceTop
(int extraSpaceTop) void
setMarginAreaRoot
(boolean marginAreaRoot) protected void
setPageClearance
(int pageClearance) final void
setStyle
(CalculatedStyle style) int
spanOfEffCol
(int effCol) void
splitColumn
(int pos, int firstSpan) private void
updateFooterPosition
(RenderingContext c, ContentLimit limit) void
private void
updateHeaderPosition
(RenderingContext c, ContentLimit limit) Methods inherited from class org.xhtmlrenderer.render.BlockBox
appendPositioningInfo, calcBaseline, calcBreakAtLineContext, calcCanvasLocation, calcChildLocations, calcChildPaintingInfo, calcDimensions, calcDimensions, calcInitialBreakAtLine, calcInitialFloatedCanvasLocation, checkPageContext, dump, ensureChildren, findLastNthLineBox, findOffset, getAvailableWidth, getChildrenContentType, getChildrenHeight, getCSSFitToWidth, getCSSHeight, getCSSWidth, getExtraBoxDescription, getFirstLetterStyle, getFirstLineStyle, getFloatedBoxData, getInlineContent, getLineBox, getListCounter, getMarkerData, getMaxWidth, getMinWidth, getPaintingClipEdge, getPersistentBFC, getReplacedElement, getStaticEquivalent, initStaticPos, isAutoHeight, isBottomMarginCalculated, isContainsInlineContent, isCurrentBreakAtLineContext, isFixedWidthAdvisoryOnly, isFloated, isFromCaptionedTable, isInline, isInlineBlock, isInMainFlow, isMinMaxCalculated, isNeedPageClear, isNeedsClipOnPaint, isNeedsKeepWithInline, isReplaced, isSkipWhenCollapsingMargins, isTopMarginCalculated, layout, layoutInlineChildren, paintDebugOutline, paintInline, paintListMarker, positionAbsolute, positionAbsoluteOnPage, propagateExtraSpace, setBottomMarginCalculated, setChildrenContentType, setChildrenHeight, setDimensionsCalculated, setFirstLetterStyle, setFirstLineStyle, setFloatedBoxData, setFromCaptionedTable, setInlineContent, setListCounter, setMaxWidth, setMinMaxCalculated, setMinWidth, setNeedPageClear, setNeedShrinkToFitCalculation, setPersistentBFC, setReplacedElement, setStaticEquivalent, setTopMarginCalculated, styleText, styleText, toString
Methods inherited from class org.xhtmlrenderer.render.Box
addAllChildren, addChild, addChildForLayout, appendPosition, appendSize, calcPaintingInfo, clearSelection, collectText, connectChildrenToCurrentLayer, crossesPageBreak, detach, dumpBoxes, exportPageBoxText, exportText, find, forcePageBreakAfter, forcePageBreakBefore, getAbsX, getAbsY, getBorderEdge, getBorderSides, getBoxDimensions, getChild, getChildCount, getChildren, getChildrenClipEdge, getContainingBlock, getContainingBlockWidth, getContainingLayer, getContentAreaEdge, getContentWidth, getEffBackgroundColor, getEffectiveWidth, getElement, getElementBoxes, getHeight, getIndex, getLayer, getLeftMBP, getMargin, getMarginBorderPadding, getMarginEdge, getMarginEdge, getNext, getNextSibling, getPadding, getPaddingEdge, getPaddingWidth, getPaintingBorderEdge, getPaintingInfo, getPaintingPaddingEdge, getParent, getPrevious, getPreviousSibling, getPseudoElementOrClass, getRelativeOffset, getRestyleTarget, getRightMBP, getState, getStyle, getStyleMargin, getStyleMarginNoCache, getTx, getTy, getWidth, getX, getY, initContainingLayer, intersects, isAnonymous, isBody, isContainedInMarginBox, isInDocumentFlow, isInitialContainingBlock, isRoot, isStyled, moveIfGreater, paintRootElementBackground, positionRelative, removeAllChildren, removeChild, removeChild, resetChildren, resetChildren, resetTopMargin, restyle, restyleChildren, selectAll, setAbsX, setAbsY, setBoxDimensions, setContainingBlock, setContainingLayer, setContentWidth, setElement, setHeight, setIndex, setLayer, setLeftMBP, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setParent, setPseudoElementOrClass, setRightMBP, setState, setTx, setTy, setX, setY
-
Field Details
-
_columns
-
_columnPos
private int @Nullable [] _columnPos -
_tableLayout
-
_styleColumns
-
_pageClearance
private int _pageClearance -
_marginAreaRoot
private boolean _marginAreaRoot -
_contentLimitContainer
-
_extraSpaceTop
private int _extraSpaceTop -
_extraSpaceBottom
private int _extraSpaceBottom
-
-
Constructor Details
-
TableBox
-
-
Method Details
-
isMarginAreaRoot
public boolean isMarginAreaRoot()- Overrides:
isMarginAreaRoot
in classBox
-
setMarginAreaRoot
public void setMarginAreaRoot(boolean marginAreaRoot) -
copyOf
-
addStyleColumn
-
getStyleColumns
-
getColumnPos
public int[] getColumnPos() -
setColumnPos
private void setColumnPos(int[] columnPos) -
numEffCols
public int numEffCols() -
spanOfEffCol
public int spanOfEffCol(int effCol) -
colToEffCol
public int colToEffCol(int col) -
effColToCol
public int effColToCol(int effCol) -
appendColumn
public void appendColumn(int span) -
setStyle
-
calcMinMaxWidth
- Overrides:
calcMinMaxWidth
in classBlockBox
-
splitColumn
public void splitColumn(int pos, int firstSpan) -
marginsBordersPaddingAndSpacing
-
getColumns
-
recalcSections
-
calcBorders
-
isAllowHeightToShrink
protected boolean isAllowHeightToShrink()- Overrides:
isAllowHeightToShrink
in classBlockBox
-
layout
-
resolveAutoMargins
protected void resolveAutoMargins(LayoutContext c, int cssWidth, RectPropertySet padding, BorderPropertySet border) - Overrides:
resolveAutoMargins
in classBlockBox
-
layoutTable
-
layoutChildren
- Overrides:
layoutChildren
in classBlockBox
-
layoutRunningHeader
-
isNeedAnalyzePageBreaks
private boolean isNeedAnalyzePageBreaks() -
analyzePageBreaks
-
analyzePageBreaks
- Overrides:
analyzePageBreaks
in classBox
-
paintBackground
- Overrides:
paintBackground
in classBox
-
paintBorder
- Overrides:
paintBorder
in classBox
-
getContentLimitedBorderEdge
-
updateHeaderPosition
-
calcPageClearance
-
calcWidth
private void calcWidth() -
getFirstRow
-
getFirstBodyRow
-
setCellWidths
-
calcLayoutHeight
protected void calcLayoutHeight(LayoutContext c, BorderPropertySet border, RectPropertySet margin, RectPropertySet padding) - Overrides:
calcLayoutHeight
in classBlockBox
-
reset
-
getCSSWidth
- Overrides:
getCSSWidth
in classBlockBox
-
colElement
-
getColumnBounds
-
getBorder
-
calcFixedHeightRowBottom
-
isMayCollapseMarginsWithChildren
protected boolean isMayCollapseMarginsWithChildren()- Overrides:
isMayCollapseMarginsWithChildren
in classBlockBox
-
sectionAbove
protected @Nullable TableSectionBox sectionAbove(TableSectionBox section, boolean skipEmptySections) -
sectionBelow
-
cellAbove
-
cellBelow
-
cellLeft
-
cellRight
-
calcInlineBaseline
- Overrides:
calcInlineBaseline
in classBlockBox
-
getPageClearance
protected int getPageClearance()- Overrides:
getPageClearance
in classBlockBox
-
setPageClearance
protected void setPageClearance(int pageClearance) -
hasContentLimitContainer
public boolean hasContentLimitContainer() -
getExtraSpaceTop
public int getExtraSpaceTop() -
setExtraSpaceTop
public void setExtraSpaceTop(int extraSpaceTop) -
getExtraSpaceBottom
public int getExtraSpaceBottom() -
setExtraSpaceBottom
public void setExtraSpaceBottom(int extraSpaceBottom)
-