Package com.openhtmltopdf.newtable
Class TableSectionBox
- java.lang.Object
-
- com.openhtmltopdf.render.Box
-
- com.openhtmltopdf.render.BlockBox
-
- com.openhtmltopdf.newtable.TableSectionBox
-
- All Implemented Interfaces:
InlinePaintable
,Styleable
,DisplayListItem
public class TableSectionBox extends BlockBox
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openhtmltopdf.render.BlockBox
BlockBox.ContentType, BlockBox.MarginCollapseResult
-
Nested classes/interfaces inherited from class com.openhtmltopdf.render.Box
Box.ChildIteratorOfType<T>
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
_capturedOriginalAbsY
private boolean
_footer
private java.util.List<RowData>
_grid
private boolean
_header
private boolean
_needCellRecalc
private boolean
_needCellWidthCalc
private int
_originalAbsY
-
Fields inherited from class com.openhtmltopdf.render.BlockBox
NO_BASELINE, POSITION_BOTH, POSITION_HORIZONTALLY, POSITION_VERTICALLY
-
Fields inherited from class com.openhtmltopdf.render.Box
CHILDREN_FLUX, DONE, DUMP_LAYOUT, DUMP_RENDER, FLUX, LINE_SEPARATOR, NOTHING
-
-
Constructor Summary
Constructors Constructor Description TableSectionBox()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addCell(TableRowBox row, TableCellBox cell, int cRow)
void
calcBorders(LayoutContext c)
TableCellBox
cellAt(int row, int col)
BlockBox
copyOf()
private void
ensureRows(int numRows)
void
extendGridToColumnCount(int columnCount)
java.util.List<RowData>
getGrid()
TableRowBox
getLastRow()
int
getOriginalAbsY()
TableBox
getTable()
boolean
isAutoHeight()
boolean
isCapturedOriginalAbsY()
boolean
isFooter()
boolean
isHeader()
private boolean
isNeedCellRecalc()
(package private) boolean
isNeedCellWidthCalc()
protected boolean
isSkipWhenCollapsingMargins()
void
layout(LayoutContext c, int contentStart)
protected void
layoutChildren(LayoutContext c, int contentStart)
int
numRows()
void
paintBackground(RenderingContext c)
void
paintBorder(RenderingContext c)
void
recalcCells(LayoutContext c)
void
reset(LayoutContext c)
Responsible for resetting the state of the box before a repeat call toBlockBox.layout(LayoutContext)
or other layout methods.void
setCapturedOriginalAbsY(boolean capturedOriginalAbsY)
private void
setCellAt(int row, int col, TableCellBox cell)
(package private) void
setCellWidths(LayoutContext c)
void
setFooter(boolean footer)
void
setHeader(boolean header)
private void
setNeedCellRecalc(boolean needCellRecalc)
(package private) void
setNeedCellWidthCalc(boolean needCellWidthCalc)
void
setOriginalAbsY(int originalAbsY)
void
splitColumn(int pos)
-
Methods inherited from class com.openhtmltopdf.render.BlockBox
addBoxID, appendPositioningInfo, calcBaseline, calcBreakAtLineContext, calcCanvasLocation, calcChildLocations, calcChildPaintingInfo, calcDimensions, calcDimensions, calcInitialBreakAtLine, calcInitialFloatedCanvasLocation, calcInlineBaseline, calcLayoutHeight, calcMinMaxWidth, checkPageContext, checkPopBfc, checkPushBfc, checkPushLayer, collapseMargins, createMarkerData, dump, ensureChildren, findLastNthLineBox, findOffset, getAvailableWidth, getChildrenContentType, getChildrenHeight, getCSSFitToWidth, getCSSHeight, getCSSWidth, getCSSWidth, getDocumentParent, getExtraBoxDescription, getFirstLetterStyle, getFirstLineStyle, getFloatedBoxData, getInlineContent, getLineBox, getListCounter, getMarkerData, getMaxWidth, getMinWidth, getNextCollapsableSibling, getPageClearance, getPaintingClipEdge, getPersistentBFC, getReplacedElement, getStaticEquivalent, initStaticPos, isAllowHeightToShrink, isBottomMarginCalculated, isContainsInlineContent, isCurrentBreakAtLineContext, isFixedWidthAdvisoryOnly, isFloated, isFromCaptionedTable, isInline, isInlineBlock, isInMainFlow, isListItem, isMayCollapseMarginsWithChildren, isMinMaxCalculated, isNeedPageClear, isNeedsClipOnPaint, isNeedsKeepWithInline, isPageBreakNeededBecauseOfMinHeight, isReplaced, isTopMarginCalculated, layout, layoutInlineChildren, paintDebugOutline, paintInline, paintListMarker, positionAbsolute, positionAbsoluteOnPage, propagateExtraSpace, resolveAutoMargins, setBottomMarginCalculated, setChildrenContentType, setChildrenHeight, setDimensionsCalculated, setElement, setFirstLetterStyle, setFirstLineStyle, setFloatedBoxData, setFromCaptionedTable, setInlineContent, setListCounter, setMarkerData, setMaxWidth, setMinMaxCalculated, setMinWidth, setNeedPageClear, setNeedShrinkToFitCalculatation, setPersistentBFC, setReplacedElement, setStaticEquivalent, setTopMarginCalculated, shouldBeReplaced, styleText, styleText, toString
-
Methods inherited from class com.openhtmltopdf.render.Box
addAllChildren, addChild, addChildForLayout, analyzePageBreaks, ancestors, ancestorsWhile, calcPaintingInfo, collectText, connectChildrenToCurrentLayer, crossesPageBreak, detach, dumpBoxes, exportPageBoxText, exportText, find, findAncestor, findColumnBreakOpportunities, forcePageBreakAfter, forcePageBreakBefore, forcePageBreakBefore, getAbsoluteClipBox, getAbsX, getAbsY, getAccessibilityObject, getBorder, getBorderBox, getBorderBoxHeight, getBorderBoxWidth, getBorderEdge, getBorderSides, getBoxDimensions, getChild, getChildCount, getChildIterator, getChildIteratorOfType, getChildren, getChildrenClipEdge, getClipBox, 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, getParentClipBox, getPrevious, getPreviousSibling, getPseudoElementOrClass, getRelativeOffset, getRightMBP, getState, getStyle, getStyleMargin, getStyleMargin, getTx, getTy, getWidth, getX, getY, hasNonTextContent, hasRootElementBackground, initContainingLayer, intersects, isAnonymous, isBody, isContainedInMarginBox, isFirstChild, isInDocumentFlow, isInitialContainingBlock, isMarginAreaRoot, isRoot, isStyled, isTerminalColumnBreak, moveIfGreater, paintRootElementBackground, positionRelative, removeAllChildren, removeChild, removeChild, resetChildren, resetChildren, resetTopMargin, rootBox, setAbsX, setAbsY, setAccessiblityObject, setAnonymous, setBorderBoxHeight, setBorderBoxWidth, setBoxDimensions, setContainingBlock, setContainingLayer, setContentWidth, setHeight, setIndex, setLayer, setLeftMBP, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setParent, setPseudoElementOrClass, setRelativeOffset, setRightMBP, setState, setStyle, setTx, setTy, setX, setY, stateToString
-
-
-
-
Field Detail
-
_grid
private final java.util.List<RowData> _grid
-
_needCellWidthCalc
private boolean _needCellWidthCalc
-
_needCellRecalc
private boolean _needCellRecalc
-
_footer
private boolean _footer
-
_header
private boolean _header
-
_capturedOriginalAbsY
private boolean _capturedOriginalAbsY
-
_originalAbsY
private int _originalAbsY
-
-
Method Detail
-
getGrid
public java.util.List<RowData> getGrid()
-
extendGridToColumnCount
public void extendGridToColumnCount(int columnCount)
-
splitColumn
public void splitColumn(int pos)
-
recalcCells
public void recalcCells(LayoutContext c)
-
calcBorders
public void calcBorders(LayoutContext c)
-
cellAt
public TableCellBox cellAt(int row, int col)
-
setCellAt
private void setCellAt(int row, int col, TableCellBox cell)
-
ensureRows
private void ensureRows(int numRows)
-
getTable
public TableBox getTable()
-
layoutChildren
protected void layoutChildren(LayoutContext c, int contentStart)
- Overrides:
layoutChildren
in classBlockBox
-
addCell
private void addCell(TableRowBox row, TableCellBox cell, int cRow)
-
reset
public void reset(LayoutContext c)
Description copied from class:Box
Responsible for resetting the state of the box before a repeat call toBlockBox.layout(LayoutContext)
or other layout methods.
Any layout operation that is not idempotent MUST be reset in this method. Layout may be called several times on the one box.
-
setCellWidths
void setCellWidths(LayoutContext c)
-
isAutoHeight
public boolean isAutoHeight()
- Overrides:
isAutoHeight
in classBlockBox
-
numRows
public int numRows()
-
isSkipWhenCollapsingMargins
protected boolean isSkipWhenCollapsingMargins()
- Overrides:
isSkipWhenCollapsingMargins
in classBlockBox
-
paintBorder
public void paintBorder(RenderingContext c)
- Overrides:
paintBorder
in classBox
-
paintBackground
public void paintBackground(RenderingContext c)
- Overrides:
paintBackground
in classBox
-
getLastRow
public TableRowBox getLastRow()
-
isNeedCellWidthCalc
boolean isNeedCellWidthCalc()
-
setNeedCellWidthCalc
void setNeedCellWidthCalc(boolean needCellWidthCalc)
-
isNeedCellRecalc
private boolean isNeedCellRecalc()
-
setNeedCellRecalc
private void setNeedCellRecalc(boolean needCellRecalc)
-
layout
public void layout(LayoutContext c, int contentStart)
-
isFooter
public boolean isFooter()
-
setFooter
public void setFooter(boolean footer)
-
isHeader
public boolean isHeader()
-
setHeader
public void setHeader(boolean header)
-
isCapturedOriginalAbsY
public boolean isCapturedOriginalAbsY()
-
setCapturedOriginalAbsY
public void setCapturedOriginalAbsY(boolean capturedOriginalAbsY)
-
getOriginalAbsY
public int getOriginalAbsY()
-
setOriginalAbsY
public void setOriginalAbsY(int originalAbsY)
-
-