Class Table
- java.lang.Object
-
- All Implemented Interfaces:
IAbstractElement,IBlockElement,IElement,ILargeElement,IPropertyContainer,IAccessibleElement
public class Table extends BlockElement<Table> implements ILargeElement
ATableis a layout element that represents data in a two-dimensional grid. It is filled withcells, ordered in rows and columns.It is an implementation of
ILargeElement, which means it can be flushed to the canvas, in order to reclaim memory that is locked up.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTable.RowRangeA simple object which holds the row numbers of a section of a table.
-
Field Summary
Fields Modifier and Type Field Description private Divcaptionprivate UnitValue[]columnWidthsprivate intcurrentColumnprivate intcurrentRowprivate Documentdocumentprivate Tablefooterprivate Tableheaderprivate booleanisCompleteprivate Cell[]lastAddedRowprivate java.util.List<Table.RowRange>lastAddedRowGroupsprivate java.util.List<Cell[]>rowsprivate introwWindowStartprivate booleanskipFirstHeaderprivate booleanskipLastFooterprotected DefaultAccessibilityPropertiestagProperties-
Fields inherited from class com.itextpdf.layout.element.AbstractElement
childElements, nextRenderer, styles
-
Fields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties
-
-
Constructor Summary
Constructors Constructor Description Table(float[] pointColumnWidths)Constructs aTablewith the preferable column widths.Table(float[] columnWidths, boolean largeTable)Constructs aTablewith the preferable column widths.Table(int numColumns)Constructs aTablewith specified number of columns.Table(int numColumns, boolean largeTable)Constructs aTablewith specified number of columns.Table(UnitValue[] columnWidths)Constructs aTablewith the preferable column widths.Table(UnitValue[] columnWidths, boolean largeTable)Constructs aTablewith the preferable column widths.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends IElement>
TableaddCell(BlockElement<T> blockElement)Adds a new cell with received blockElement as a content.TableaddCell(Cell cell)Adds a new cell to the table.TableaddCell(Image image)Adds a new cell with received image as a content.TableaddCell(java.lang.String content)Adds a new cell with received string as a content.<T extends IElement>
TableaddFooterCell(BlockElement<T> blockElement)Adds a new cell with received blockElement as a content to the footer of the table.TableaddFooterCell(Cell footerCell)Adds a new cell to the footer of the table.TableaddFooterCell(Image image)Adds a new cell with received image as a content to the footer of the table.TableaddFooterCell(java.lang.String content)Adds a new cell with received string as a content to the footer of the table.<T extends IElement>
TableaddHeaderCell(BlockElement<T> blockElement)Adds a new cell with received blockElement as a content to the header of the table.TableaddHeaderCell(Cell headerCell)Adds a new cell to the header of the table.TableaddHeaderCell(Image image)Adds a new cell with received image to the header of the table.TableaddHeaderCell(java.lang.String content)Adds a new cell with received string as a content to the header of the table.private booleancellBelongsToAnyRowGroup(Cell cell, java.util.List<Table.RowRange> rowGroups)voidcomplete()Indicates that all the desired content has been added to this large element and no more content will be added.IRenderercreateRendererSubTree()Creates a renderer subtree with root in the current table element.private voidensureCaptionPropertiesAreSet()private voidensureFooterIsInitialized()private voidensureHeaderIsInitialized()voidflush()Writes the newly added content to the document.voidflushContent()Writes to the output document the content which has just been added to it.AccessibilityPropertiesgetAccessibilityProperties()Gets theaccessibility properties.DivgetCaption()Gets the table's caption.CellgetCell(int row, int column)Returns a cell as specified by its location.UnitValuegetColumnWidth(int column)Returns the column width for the specified column.TablegetFooter()Gets the footer of the table.TablegetHeader()Gets the header of the table.java.util.List<Border>getLastRowBottomBorder()Gets the markup properties of the bottom border of the (current) last row.intgetNumberOfColumns()Returns the number of columns.intgetNumberOfRows()Returns the number of rows.IRenderergetRenderer()Gets a table renderer for this element.protected java.util.List<Table.RowRange>getRowGroups()Returns the list of all row groups.private voidinitializeLargeTable(boolean largeTable)private voidinitializeRows()booleanisComplete()Checks whether an element has already been marked as complete.booleanisSkipFirstHeader()Tells you if the first header needs to be skipped (for instance if the header says "continued from the previous page").booleanisSkipLastFooter()Tells you if the last footer needs to be skipped (for instance if the footer says "continued on the next page")protected IRenderermakeNewRenderer()Creates a new renderer instance.private static UnitValue[]normalizeColumnWidths(float[] pointColumnWidths)private static UnitValue[]normalizeColumnWidths(int numberOfColumns)private static UnitValue[]normalizeColumnWidths(UnitValue[] unitColumnWidths)TablesetAutoLayout()Set auto layout.TablesetBorderCollapse(BorderCollapsePropertyValue collapsePropertyValue)Sets the type of border collapse.TablesetCaption(Div caption)Sets the table's caption.TablesetCaption(Div caption, CaptionSide side)Sets the table's caption and its caption side.voidsetDocument(Document document)Sets the document this element is bound to.TablesetExtendBottomRow(boolean isExtended)Defines whether theTableshould be extended to occupy all the space left in the available area in case it is the last element in this area.TablesetExtendBottomRowOnSplit(boolean isExtended)Defines whether theTableshould be extended to occupy all the space left in the available area in case the area has been split and it is the last element in the split part of this area.TablesetFixedLayout()Set fixed layout.TablesetHorizontalBorderSpacing(float spacing)TablesetSkipFirstHeader(boolean skipFirstHeader)Skips the printing of the first header.TablesetSkipLastFooter(boolean skipLastFooter)Skips the printing of the last footer.TablesetVerticalBorderSpacing(float spacing)TablestartNewRow()Starts new row.TableuseAllAvailableWidth()SetProperty.WIDTH= 100%.-
Methods inherited from class com.itextpdf.layout.element.BlockElement
getDefaultProperty, getHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getWidth, isKeepTogether, isKeepWithNext, setHeight, setHeight, setKeepTogether, setKeepWithNext, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setNeutralRole, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignment, setWidth, setWidth
-
Methods inherited from class com.itextpdf.layout.element.AbstractElement
addStyle, getChildren, getProperty, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumber
-
Methods inherited from class com.itextpdf.layout.ElementPropertyContainer
deleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getTransparentStrokeColor, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDashPattern, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing, simulateBold, simulateItalic
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.itextpdf.layout.element.IAbstractElement
getChildren
-
Methods inherited from interface com.itextpdf.layout.element.IElement
setNextRenderer
-
Methods inherited from interface com.itextpdf.layout.IPropertyContainer
deleteOwnProperty, getDefaultProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
-
-
-
-
Field Detail
-
tagProperties
protected DefaultAccessibilityProperties tagProperties
-
rows
private java.util.List<Cell[]> rows
-
columnWidths
private UnitValue[] columnWidths
-
currentColumn
private int currentColumn
-
currentRow
private int currentRow
-
header
private Table header
-
footer
private Table footer
-
skipFirstHeader
private boolean skipFirstHeader
-
skipLastFooter
private boolean skipLastFooter
-
isComplete
private boolean isComplete
-
lastAddedRowGroups
private java.util.List<Table.RowRange> lastAddedRowGroups
-
rowWindowStart
private int rowWindowStart
-
document
private Document document
-
lastAddedRow
private Cell[] lastAddedRow
-
caption
private Div caption
-
-
Constructor Detail
-
Table
public Table(float[] columnWidths, boolean largeTable)Constructs aTablewith the preferable column widths.
Since 7.0.2 table layout algorithms were introduced. Auto layout is default, except large tables. For large table 100% width and fixed layout set implicitly.
Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, wherecolumnWidthsis <colgroup>'s widths. For more information seesetAutoLayout()andsetFixedLayout().- Parameters:
columnWidths- preferable column widths in points. Values must be greater than or equal to zero, otherwise it will be interpreted as undefined.largeTable- whether parts of the table will be written before all data is added. Note, large table does not support auto layout, table width shall not be removed.- See Also:
setAutoLayout(),setFixedLayout()
-
Table
public Table(UnitValue[] columnWidths, boolean largeTable)
Constructs aTablewith the preferable column widths.
Since 7.0.2 table layout algorithms were introduced. Auto layout is default, except large tables. For large table 100% width and fixed layout set implicitly.
Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, wherecolumnWidthsis <colgroup>'s widths. For more information seesetAutoLayout()andsetFixedLayout().- Parameters:
columnWidths- preferable column widths, points and/or percents. Values must be greater than or equal to zero, otherwise it will be interpreted as undefined.largeTable- whether parts of the table will be written before all data is added. Note, large table does not support auto layout, table width shall not be removed.- See Also:
setAutoLayout(),setFixedLayout()
-
Table
public Table(UnitValue[] columnWidths)
Constructs aTablewith the preferable column widths.
Since 7.0.2 table layout algorithms were introduced. Auto layout is default.
Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, wherecolumnWidthsis <colgroup>'s widths. For more information seesetAutoLayout()andsetFixedLayout().- Parameters:
columnWidths- preferable column widths, points and/or percents. Values must be greater than or equal to zero, otherwise it will be interpreted as undefined.- See Also:
setAutoLayout(),setFixedLayout()
-
Table
public Table(float[] pointColumnWidths)
Constructs aTablewith the preferable column widths.
Since 7.0.2 table layout algorithms were introduced. Auto layout is default.
Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, wherecolumnWidthsis <colgroup>'s widths. For more information seesetAutoLayout()andsetFixedLayout().- Parameters:
pointColumnWidths- preferable column widths in points. Values must be greater than or equal to zero, otherwise it will be interpreted as undefined.- See Also:
setAutoLayout(),setFixedLayout()
-
Table
public Table(int numColumns, boolean largeTable)Constructs aTablewith specified number of columns. The final column widths depend on selected table layout.
Since 7.0.2 table layout algorithms were introduced. Auto layout is default, except large tables. For large table fixed layout set implicitly.
Since 7.1 table will have undefined column widths, that will be determined during layout. In oder to set equal percent width as column width, useUnitValue.createPercentArray(int)
Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, wherecolumnWidthsis <colgroup>'s widths. For more information seesetAutoLayout()andsetFixedLayout().- Parameters:
numColumns- the number of columns, each column will have equal percent width.largeTable- whether parts of the table will be written before all data is added. Note, large table does not support auto layout, table width shall not be removed.- See Also:
setAutoLayout(),setFixedLayout()
-
Table
public Table(int numColumns)
Constructs aTablewith specified number of columns. The final column widths depend on selected table layout.
Since 7.0.2 table layout was introduced. Auto layout is default, except large tables. For large table fixed layout set implicitly.Since 7.1 table will have undefined column widths, that will be determined during layout. In oder to set equal percent width as column width, use
UnitValue.createPercentArray(int)Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, where
columnWidthsis <colgroup>'s widths. For more information seesetAutoLayout()andsetFixedLayout().- Parameters:
numColumns- the number of columns, each column will have equal percent width.- See Also:
setAutoLayout(),setFixedLayout()
-
-
Method Detail
-
setFixedLayout
public Table setFixedLayout()
Set fixed layout. Analog oftable-layout:fixedCSS property. Note, the table must have width property, otherwise auto layout will be used.Algorithm description
1. Scan columns for width property and set it. All the rest columns get undefined value. Column width includes borders and paddings. Columns have set in constructor, analog of<colgroup>element in HTML.
2. Scan the very first row of table for width property and set it to undefined columns. Cell width has lower priority in comparing with column. Cell width doesn't include borders and paddings.
2.1 If cell has colspan and all columns are undefined, each column will get equal width:width/colspan.
2.2 If some columns already have width, equal remain (original width minus existed) width will be addedremainWidth/colspanto each column.
3. If sum of columns is less, than table width, there are two options:
3.1. If undefined columns still exist, they will get the rest remaining width.
3.2. Otherwise all columns will be expanded proportionally based on its width.
4. If sum of columns is greater, than table width, nothing to do.- Returns:
- this element.
-
setAutoLayout
public Table setAutoLayout()
Set auto layout. Analog oftable-layout:autoCSS property.
Note, large table does not support auto layout.Algorithm principles.
1. Column width cannot be less, than min-width of any cell in the column (calculated by layout).
2. Specified table width has higher priority, than sum of column and cell widths.
3. Percent value of cell and column width has higher priority, than point value.
4. Cell width has higher priority, than column width.
5. If column has no width, it will try to reach max-value (calculated by layout).- Returns:
- this element.
-
useAllAvailableWidth
public Table useAllAvailableWidth()
SetProperty.WIDTH= 100%.- Returns:
- this element
-
getColumnWidth
public UnitValue getColumnWidth(int column)
Returns the column width for the specified column.- Parameters:
column- index of the column- Returns:
- the width of the column
-
getNumberOfColumns
public int getNumberOfColumns()
Returns the number of columns.- Returns:
- the number of columns.
-
getNumberOfRows
public int getNumberOfRows()
Returns the number of rows.- Returns:
- the number of rows.
-
addHeaderCell
public Table addHeaderCell(Cell headerCell)
Adds a new cell to the header of the table. The header will be displayed in the top of every area of this table. See alsosetSkipFirstHeader(boolean).- Parameters:
headerCell- a header cell to be added- Returns:
- this element
-
addHeaderCell
public <T extends IElement> Table addHeaderCell(BlockElement<T> blockElement)
Adds a new cell with received blockElement as a content to the header of the table. The header will be displayed in the top of every area of this table. See alsosetSkipFirstHeader(boolean).- Type Parameters:
T- any IElement- Parameters:
blockElement- an element to be added to a header cell- Returns:
- this element
-
addHeaderCell
public Table addHeaderCell(Image image)
Adds a new cell with received image to the header of the table. The header will be displayed in the top of every area of this table. See alsosetSkipFirstHeader(boolean).- Parameters:
image- an element to be added to a header cell- Returns:
- this element
-
addHeaderCell
public Table addHeaderCell(java.lang.String content)
Adds a new cell with received string as a content to the header of the table. The header will be displayed in the top of every area of this table. See alsosetSkipFirstHeader(boolean).- Parameters:
content- a string to be added to a header cell- Returns:
- this element
-
getHeader
public Table getHeader()
Gets the header of the table. The header is represented as a distinct table and might have its own properties.- Returns:
- table header or
null, ifaddHeaderCell(Cell)hasn't been called.
-
addFooterCell
public Table addFooterCell(Cell footerCell)
Adds a new cell to the footer of the table. The footer will be displayed in the bottom of every area of this table. See alsosetSkipLastFooter(boolean).- Parameters:
footerCell- a footer cell- Returns:
- this element
-
addFooterCell
public <T extends IElement> Table addFooterCell(BlockElement<T> blockElement)
Adds a new cell with received blockElement as a content to the footer of the table. The footer will be displayed in the bottom of every area of this table. See alsosetSkipLastFooter(boolean).- Type Parameters:
T- IElement instance- Parameters:
blockElement- an element to be added to a footer cell- Returns:
- this element
-
addFooterCell
public Table addFooterCell(Image image)
Adds a new cell with received image as a content to the footer of the table. The footer will be displayed in the bottom of every area of this table. See alsosetSkipLastFooter(boolean).- Parameters:
image- an image to be added to a footer cell- Returns:
- this element
-
addFooterCell
public Table addFooterCell(java.lang.String content)
Adds a new cell with received string as a content to the footer of the table. The footer will be displayed in the bottom of every area of this table. See alsosetSkipLastFooter(boolean).- Parameters:
content- a content string to be added to a footer cell- Returns:
- this element
-
getFooter
public Table getFooter()
Gets the footer of the table. The footer is represented as a distinct table and might have its own properties.- Returns:
- table footer or
null, ifaddFooterCell(Cell)hasn't been called.
-
isSkipFirstHeader
public boolean isSkipFirstHeader()
Tells you if the first header needs to be skipped (for instance if the header says "continued from the previous page").- Returns:
- Value of property skipFirstHeader.
-
setSkipFirstHeader
public Table setSkipFirstHeader(boolean skipFirstHeader)
Skips the printing of the first header. Used when printing tables in succession belonging to the same printed table aspect.- Parameters:
skipFirstHeader- New value of property skipFirstHeader.- Returns:
- this element
-
isSkipLastFooter
public boolean isSkipLastFooter()
Tells you if the last footer needs to be skipped (for instance if the footer says "continued on the next page")- Returns:
- Value of property skipLastFooter.
-
setSkipLastFooter
public Table setSkipLastFooter(boolean skipLastFooter)
Skips the printing of the last footer. Used when printing tables in succession belonging to the same printed table aspect.- Parameters:
skipLastFooter- New value of property skipLastFooter.- Returns:
- this element
-
setCaption
public Table setCaption(Div caption)
Sets the table's caption. If there is noProperty.CAPTION_SIDEset (note that it's an inheritable property),CaptionSide.TOPwill be used. Also theStandardRoles.CAPTIONwill be set on the element.- Parameters:
caption- The element to be set as a caption.- Returns:
- this element
-
setCaption
public Table setCaption(Div caption, CaptionSide side)
Sets the table's caption and its caption side. Also theStandardRoles.CAPTIONwill be set on the element.- Parameters:
caption- The element to be set as a caption.side- The caption side to be set on the caption.- Returns:
- this element
-
ensureCaptionPropertiesAreSet
private void ensureCaptionPropertiesAreSet()
-
getCaption
public Div getCaption()
Gets the table's caption.- Returns:
- the table's caption.
-
startNewRow
public Table startNewRow()
Starts new row. This mean that next cell will be added at the beginning of next line.- Returns:
- this element
-
addCell
public Table addCell(Cell cell)
Adds a new cell to the table. The implementation decides for itself which row the cell will be placed on.- Parameters:
cell-Cellto add.- Returns:
- this element
-
addCell
public <T extends IElement> Table addCell(BlockElement<T> blockElement)
Adds a new cell with received blockElement as a content.- Type Parameters:
T- IElement instance- Parameters:
blockElement- a blockElement to add to the cell and then to the table- Returns:
- this element
-
addCell
public Table addCell(Image image)
Adds a new cell with received image as a content.- Parameters:
image- an image to add to the cell and then to the table- Returns:
- this element
-
addCell
public Table addCell(java.lang.String content)
Adds a new cell with received string as a content.- Parameters:
content- a string to add to the cell and then to the table- Returns:
- this element
-
getCell
public Cell getCell(int row, int column)
Returns a cell as specified by its location. If the cell is in a col-span or row-span and is not the top left cell, thennullis returned.- Parameters:
row- the row of the cell. indexes are zero-basedcolumn- the column of the cell. indexes are zero-based- Returns:
- the cell at the specified position.
-
createRendererSubTree
public IRenderer createRendererSubTree()
Creates a renderer subtree with root in the current table element. Compared togetRenderer(), the renderer returned by this method should contain all the child renderers for children of the current element.- Specified by:
createRendererSubTreein interfaceIElement- Overrides:
createRendererSubTreein classAbstractElement<Table>- Returns:
- a
TableRenderersubtree for this element
-
getRenderer
public IRenderer getRenderer()
Gets a table renderer for this element. Note that this method can be called more than once. By default each element should define its own renderer, but the renderer can be overridden byAbstractElement.setNextRenderer(IRenderer)method call.- Specified by:
getRendererin interfaceIElement- Overrides:
getRendererin classAbstractElement<Table>- Returns:
- a table renderer for this element
-
isComplete
public boolean isComplete()
Description copied from interface:ILargeElementChecks whether an element has already been marked as complete.- Specified by:
isCompletein interfaceILargeElement- Returns:
- the completion marker boolean
-
complete
public void complete()
Indicates that all the desired content has been added to this large element and no more content will be added. After this method is called, more precise rendering is activated. For instance, a table may have asetSkipLastFooter(boolean)method set to true, and in case of large table onflush()we do not know if any more content will be added, so we might not place the content in the bottom of the page where it would fit, but instead add a footer, and place that content in the start of the page. Technically such result would look all right, but it would be more concise if we placed the content in the bottom and did not start new page. For such cases to be renderered more accurately, one can call complete() when some content is still there and not flushed.- Specified by:
completein interfaceILargeElement
-
flush
public void flush()
Writes the newly added content to the document.- Specified by:
flushin interfaceILargeElement
-
flushContent
public void flushContent()
Description copied from interface:ILargeElementWrites to the output document the content which has just been added to it.This method is called automatically for the newly added
ILargeElementto be immediately placed in the page contents after it is added to theDocument, so it shouldn't be used in any other places.- Specified by:
flushContentin interfaceILargeElement
-
setDocument
public void setDocument(Document document)
Description copied from interface:ILargeElementSets the document this element is bound to. We cannot write a large element into several documents simultaneously because we would need more bulky interfaces for this feature. For now we went for simplicity.- Specified by:
setDocumentin interfaceILargeElement- Parameters:
document- the document
-
getLastRowBottomBorder
public java.util.List<Border> getLastRowBottomBorder()
Gets the markup properties of the bottom border of the (current) last row.- Returns:
- an array of
Borderobjects
-
setExtendBottomRow
public Table setExtendBottomRow(boolean isExtended)
Defines whether theTableshould be extended to occupy all the space left in the available area in case it is the last element in this area.
-
setExtendBottomRowOnSplit
public Table setExtendBottomRowOnSplit(boolean isExtended)
Defines whether theTableshould be extended to occupy all the space left in the available area in case the area has been split and it is the last element in the split part of this area.
-
setBorderCollapse
public Table setBorderCollapse(BorderCollapsePropertyValue collapsePropertyValue)
Sets the type of border collapse.- Parameters:
collapsePropertyValue-BorderCollapsePropertyValueto be set as the border collapse type- Returns:
- this
Table
-
setHorizontalBorderSpacing
public Table setHorizontalBorderSpacing(float spacing)
-
setVerticalBorderSpacing
public Table setVerticalBorderSpacing(float spacing)
-
getAccessibilityProperties
public AccessibilityProperties getAccessibilityProperties()
Description copied from interface:IAccessibleElementGets theaccessibility properties. See alsoIAccessibleElement.- Specified by:
getAccessibilityPropertiesin interfaceIAccessibleElement- Returns:
- an interface that allows to specify properties of a tagged element in Tagged PDF.
-
makeNewRenderer
protected IRenderer makeNewRenderer()
Description copied from class:AbstractElementCreates a new renderer instance.- Specified by:
makeNewRendererin classAbstractElement<Table>- Returns:
- new
IRenderer
-
normalizeColumnWidths
private static UnitValue[] normalizeColumnWidths(float[] pointColumnWidths)
-
normalizeColumnWidths
private static UnitValue[] normalizeColumnWidths(UnitValue[] unitColumnWidths)
-
normalizeColumnWidths
private static UnitValue[] normalizeColumnWidths(int numberOfColumns)
-
getRowGroups
protected java.util.List<Table.RowRange> getRowGroups()
Returns the list of all row groups.- Returns:
- a list of a
Table.RowRangewhich holds the row numbers of a section of a table
-
initializeRows
private void initializeRows()
-
cellBelongsToAnyRowGroup
private boolean cellBelongsToAnyRowGroup(Cell cell, java.util.List<Table.RowRange> rowGroups)
-
ensureHeaderIsInitialized
private void ensureHeaderIsInitialized()
-
ensureFooterIsInitialized
private void ensureFooterIsInitialized()
-
initializeLargeTable
private void initializeLargeTable(boolean largeTable)
-
-