public class PdfPTable extends Object implements LargeElement, Spaceable, IAccessibleElement
Table
.
A PdfPTableEvent can be associated to the table to do custom drawing when the table is rendered.
Modifier and Type | Class and Description |
---|---|
static class |
PdfPTable.ColumnMeasurementState |
static class |
PdfPTable.FittingRows |
Modifier and Type | Field and Description |
---|---|
protected float[] |
absoluteWidths |
protected HashMap<PdfName,PdfObject> |
accessibleAttributes |
static int |
BACKGROUNDCANVAS
The index of the duplicate PdfContentByte where the background will be drawn.
|
static int |
BASECANVAS
The index of the original PdfcontentByte .
|
protected boolean |
complete
Indicates if the PdfPTable is complete once added to the document.
|
protected int |
currentColIdx
The current column index.
|
protected PdfPCell[] |
currentRow |
protected PdfPCell |
defaultCell |
protected int |
headerRows
Holds value of property headerRows.
|
protected AccessibleElementId |
id |
protected boolean |
isColspan |
static int |
LINECANVAS
The index of the duplicate PdfContentByte where the border lines will be drawn.
|
protected boolean |
loopCheck |
protected float |
paddingTop |
protected float[] |
relativeWidths |
protected PdfName |
role |
protected boolean |
rowCompleted
Keeps track of the completeness of the current row.
|
protected ArrayList<PdfPRow> |
rows |
protected boolean |
rowsNotChecked |
protected int |
runDirection |
protected float |
spacingAfter
The spacing after the table.
|
protected float |
spacingBefore
The spacing before the table.
|
protected PdfPTableEvent |
tableEvent |
static int |
TEXTCANVAS
The index of the duplicate PdfContentByte where the text will be drawn.
|
protected float |
totalHeight |
protected float |
totalWidth |
protected float |
widthPercentage
Holds value of property widthPercentage.
|
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, BODY, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CHAPTER, CHUNK, CREATIONDATE, CREATOR, DIV, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LANGUAGE, LIST, LISTITEM, MARKED, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, SECTION, SUBJECT, TITLE, WRITABLE_DIRECT, YMARK
Modifier | Constructor and Description |
---|---|
protected |
PdfPTable() |
|
PdfPTable(float[] relativeWidths)
Constructs a PdfPTable with the relative column widths.
|
|
PdfPTable(int numColumns)
Constructs a PdfPTable with numColumns columns.
|
|
PdfPTable(PdfPTable table)
Constructs a copy of a PdfPTable .
|
Modifier and Type | Method and Description |
---|---|
void |
addCell(Image image)
Adds an Image as Cell.
|
PdfPCell |
addCell(PdfPCell cell)
Adds a cell element.
|
void |
addCell(PdfPTable table)
Adds a nested table.
|
void |
addCell(Phrase phrase)
Adds a cell element.
|
void |
addCell(String text)
Adds a cell element.
|
protected PdfPRow |
adjustCellsInRow(int start, int end)
Calculates the extra height needed in a row because of rowspans.
|
static PdfContentByte[] |
beginWritingRows(PdfContentByte canvas)
Gets and initializes the 4 layers where the table is written to.
|
float |
calculateHeights()
Calculates the heights of the table.
|
protected void |
calculateWidths() |
void |
completeRow()
Completes the current row with the default cell.
|
protected void |
copyFormat(PdfPTable sourceTable)
Copies the format of the sourceTable without copying the content.
|
void |
deleteBodyRows()
Removes all of the rows except headers
|
boolean |
deleteLastRow()
Deletes the last row in the table.
|
boolean |
deleteRow(int rowNumber)
Deletes a row from the table.
|
static void |
endWritingRows(PdfContentByte[] canvases)
Finishes writing the table.
|
void |
flushContent()
Flushes the content that has been added.
|
float[] |
getAbsoluteWidths()
Gets the absolute sizes of each column width.
|
PdfObject |
getAccessibleAttribute(PdfName key)
Get the attribute of accessible element (everything in A dictionary + Lang , Alt , ActualText , E ).
|
HashMap<PdfName,PdfObject> |
getAccessibleAttributes()
Gets all the properties of accessible element.
|
PdfPTableBody |
getBody() |
int |
getCellStartRowIndex(int rowIdx, int colIdx)
Gets row index where cell overlapping (rowIdx, colIdx) starts
|
List<Chunk> |
getChunks()
Gets all the chunks in this element.
|
PdfPCell |
getDefaultCell()
Gets the default PdfPCell that will be used as reference for all the addCell methods except addCell(PdfPCell) .
|
PdfPTable.FittingRows |
getFittingRows(float availableHeight, int startIdx)
Determine which rows fit on the page, respecting isSplitLate().
|
PdfPTableFooter |
getFooter() |
float |
getFooterHeight()
Gets the height of the rows that constitute the footer as defined by setFooterRows() .
|
int |
getFooterRows()
Gets the number of rows in the footer.
|
PdfPTableHeader |
getHeader() |
float |
getHeaderHeight()
Gets the height of the rows that constitute the header as defined by setHeaderRows() .
|
int |
getHeaderRows()
Gets the number of the rows that constitute the header.
|
int |
getHorizontalAlignment()
Gets the horizontal alignment of the table relative to the page.
|
AccessibleElementId |
getId() |
boolean |
getKeepTogether()
Getter for property keepTogether
|
int |
getLastCompletedRowIndex()
Returns the index of the last completed row.
|
int |
getNumberOfColumns()
Returns the number of columns.
|
float |
getPaddingTop() |
PdfName |
getRole()
Gets the role of the accessible element.
|
PdfPRow |
getRow(int idx)
Gets a row with a given index.
|
float |
getRowHeight(int idx)
Gets the height of a particular row.
|
protected float |
getRowHeight(int idx, boolean firsttime)
Gets the height of a particular row.
|
ArrayList<PdfPRow> |
getRows()
Gets an arraylist with all the rows in the table.
|
ArrayList<PdfPRow> |
getRows(int start, int end)
Gets an arraylist with a selection of rows.
|
float |
getRowspanHeight(int rowIndex, int cellIndex)
Gets the maximum height of a cell in a particular row (will only be different from getRowHeight is one of the cells in the row has a rowspan > 1).
|
int |
getRunDirection()
Returns the run direction of the contents in the table.
|
float |
getSpacingAfter()
Gets the spacing after.
|
float |
getSpacingBefore()
Gets the spacing before.
|
String |
getSummary() |
PdfPTableEvent |
getTableEvent()
Gets the table event for this page.
|
float |
getTotalHeight()
Gets the total height of the table.
|
float |
getTotalWidth()
Gets the full width of the table.
|
float |
getWidthPercentage()
Gets the width percentage that the table will occupy in the page.
|
boolean |
hasRowspan(int rowIdx)
Checks if a cell in a row has a rowspan greater than 1.
|
void |
init() |
boolean |
isComplete()
Indicates if the element is complete or not.
|
boolean |
isContent()
Checks if this element is a content object.
|
boolean |
isExtendLastRow()
Gets the value of the last row extension.
|
boolean |
isExtendLastRow(boolean newPageFollows)
Gets the value of the last row extension, taking into account if the final row is reached or not.
|
boolean |
isHeadersInEvent()
Gets the header status inclusion in PdfPTableEvent.
|
boolean |
isInline() |
boolean |
isLockedWidth()
Getter for property lockedWidth.
|
boolean |
isLoopCheck() |
boolean |
isNestable()
Checks if this element is nestable.
|
boolean |
isSkipFirstHeader()
Tells you if the first header needs to be skipped (for instance if the header says "continued from the previous page").
|
boolean |
isSkipLastFooter()
Tells you if the last footer needs to be skipped (for instance if the footer says "continued on the next page")
|
boolean |
isSplitLate()
Gets the property splitLate.
|
boolean |
isSplitRows()
Gets the split value.
|
void |
keepRowsTogether(int start)
Defines a range of rows (from the parameter to the last row) that should not allow a page break (if possible).
|
void |
keepRowsTogether(int[] rows)
Defines which rows should not allow a page break (if possible).
|
void |
keepRowsTogether(int start, int end)
Defines a range of rows that should not allow a page break (if possible).
|
void |
normalizeHeadersFooters()
Makes sure the footers value is lower than the headers value.
|
boolean |
process(ElementListener listener)
Processes the element by adding it (or the different parts) to an ElementListener .
|
void |
resetColumnCount(int newColCount)
Changes the number of columns.
|
void |
setAccessibleAttribute(PdfName key, PdfObject value)
Set the attribute of accessible element (everything in A dictionary + Lang , Alt , ActualText , E ).
|
void |
setBreakPoints(int... breakPoints)
Defines where the table may be broken (if necessary).
|
void |
setComplete(boolean complete)
If you invoke setComplete(false), you indicate that the content of the object isn't complete yet; it can be added to the document partially, but more will follow.
|
void |
setExtendLastRow(boolean extendLastRows)
When set the last row on every page will be extended to fill all the remaining space to the bottom boundary.
|
void |
setExtendLastRow(boolean extendLastRows, boolean extendFinalRow)
When set the last row on every page will be extended to fill all the remaining space to the bottom boundary; except maybe the final row.
|
void |
setFooterRows(int footerRows)
Sets the number of rows to be used for the footer.
|
void |
setHeaderRows(int headerRows)
Sets the number of the top rows that constitute the header.
|
void |
setHeadersInEvent(boolean headersInEvent)
When set the PdfPTableEvent will include the headers.
|
void |
setHorizontalAlignment(int horizontalAlignment)
Sets the horizontal alignment of the table relative to the page.
|
void |
setId(AccessibleElementId id) |
void |
setKeepTogether(boolean keepTogether)
If true the table will be kept on one page if it fits, by forcing a new page if it doesn't fit on the current page.
|
void |
setLockedWidth(boolean lockedWidth)
Uses the value in setTotalWidth() in Document.add() .
|
void |
setLoopCheck(boolean loopCheck) |
void |
setPaddingTop(float paddingTop) |
void |
setRole(PdfName role)
Sets the role of the accessiblee element.
|
void |
setRunDirection(int runDirection)
Sets the run direction of the contents of the table.
|
void |
setSkipFirstHeader(boolean skipFirstHeader)
Skips the printing of the first header.
|
void |
setSkipLastFooter(boolean skipLastFooter)
Skips the printing of the last footer.
|
void |
setSpacingAfter(float spacing)
Sets the spacing after this table.
|
void |
setSpacingBefore(float spacing)
Sets the spacing before this table.
|
void |
setSplitLate(boolean splitLate)
If true the row will only split if it's the first one in an empty page.
|
void |
setSplitRows(boolean splitRows)
When set the rows that won't fit in the page will be split.
|
void |
setSummary(String summary) |
void |
setTableEvent(PdfPTableEvent event)
Sets the table event for this table.
|
void |
setTotalWidth(float totalWidth)
Sets the full width of the table.
|
void |
setTotalWidth(float[] columnWidth)
Sets the full width of the table from the absolute column width.
|
void |
setWidthPercentage(float widthPercentage)
Sets the width percentage that the table will occupy in the page.
|
void |
setWidthPercentage(float[] columnWidth, Rectangle pageSize)
Sets the percentage width of the table from the absolute column width.
|
void |
setWidths(float[] relativeWidths)
Sets the relative widths of the table.
|
void |
setWidths(int[] relativeWidths)
Sets the relative widths of the table.
|
static PdfPTable |
shallowCopy(PdfPTable table)
Makes a shallow copy of a table (format without content).
|
int |
size()
Gets the number of rows in this table.
|
float |
spacingAfter()
Gets the spacing after this table.
|
float |
spacingBefore()
Gets the spacing before this table.
|
int |
type()
Gets the type of the text element.
|
float |
writeSelectedRows(int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte canvas)
Writes the selected rows to the document.
|
float |
writeSelectedRows(int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte[] canvases)
Writes the selected rows to the document.
|
float |
writeSelectedRows(int colStart, int colEnd, int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte canvas)
Writes the selected rows and columns to the document.
|
float |
writeSelectedRows(int colStart, int colEnd, int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte[] canvases)
Writes the selected rows and columns to the document.
|
float |
writeSelectedRows(int colStart, int colEnd, int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte[] canvases, boolean reusable)
Writes the selected rows and columns to the document.
|
float |
writeSelectedRows(int colStart, int colEnd, int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte canvas, boolean reusable)
Writes the selected rows and columns to the document.
|
public static final int BASECANVAS
PdfcontentByte
.
public static final int BACKGROUNDCANVAS
PdfContentByte
where the background will be drawn.
public static final int LINECANVAS
PdfContentByte
where the border lines will be drawn.
public static final int TEXTCANVAS
PdfContentByte
where the text will be drawn.
protected float totalHeight
protected PdfPCell[] currentRow
protected int currentColIdx
protected PdfPCell defaultCell
protected float totalWidth
protected float[] relativeWidths
protected float[] absoluteWidths
protected PdfPTableEvent tableEvent
protected int headerRows
protected float widthPercentage
protected boolean isColspan
protected int runDirection
protected float spacingBefore
protected float spacingAfter
protected float paddingTop
protected boolean complete
protected boolean rowCompleted
protected boolean loopCheck
protected boolean rowsNotChecked
protected PdfName role
protected AccessibleElementId id
protected PdfPTable()
public PdfPTable(float[] relativeWidths)
PdfPTable
with the relative column widths.
relativeWidths
- the relative column widths
public PdfPTable(int numColumns)
PdfPTable
with numColumns
columns.
numColumns
- the number of columns
public PdfPTable(PdfPTable table)
PdfPTable
.
table
- the PdfPTable
to be copied
public void init()
public static PdfPTable shallowCopy(PdfPTable table)
table
-
protected void copyFormat(PdfPTable sourceTable)
sourceTable
-
public void setWidths(float[] relativeWidths) throws DocumentException
relativeWidths
- the relative widths of the table.
DocumentException
- if the number of widths is different than the number of columns
public void setWidths(int[] relativeWidths) throws DocumentException
relativeWidths
- the relative widths of the table.
DocumentException
- if the number of widths is different than the number of columns
protected void calculateWidths()
public void setTotalWidth(float totalWidth)
totalWidth
- the full width of the table.
public void setTotalWidth(float[] columnWidth) throws DocumentException
columnWidth
- the absolute width of each column
DocumentException
- if the number of widths is different than the number of columns
public void setWidthPercentage(float[] columnWidth, Rectangle pageSize) throws DocumentException
columnWidth
- the absolute width of each column
pageSize
- the page size
DocumentException
public float getTotalWidth()
public float calculateHeights()
public void resetColumnCount(int newColCount)
newColCount
- the new number of columns
public PdfPCell getDefaultCell()
PdfPCell
that will be used as reference for all the addCell
methods except addCell(PdfPCell)
.
PdfPCell
public PdfPCell addCell(PdfPCell cell)
cell
- the cell element
public void addCell(String text)
text
- the text for the cell
public void addCell(PdfPTable table)
table
- the table to be added to the cell
public void addCell(Image image)
image
- the Image
to add to the table. This image will fit in the cell
public void addCell(Phrase phrase)
phrase
- the Phrase
to be added to the cell
public float writeSelectedRows(int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte[] canvases)
canvases
is obtained from beginWritingRows()
.
rowStart
- the first row to be written, zero index
rowEnd
- the last row to be written + 1. If it is -1 all the rows to the end are written
xPos
- the x write coordinate
yPos
- the y write coordinate
canvases
- an array of 4 PdfContentByte
obtained from beginWrittingRows()
beginWritingRows(com.itextpdf.text.pdf.PdfContentByte)
public float writeSelectedRows(int colStart, int colEnd, int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte[] canvases)
canvases
is obtained from beginWritingRows()
. The table event is only fired for complete rows.
colStart
- the first column to be written, zero index
colEnd
- the last column to be written + 1. If it is -1 all the columns to the end are written
rowStart
- the first row to be written, zero index
rowEnd
- the last row to be written + 1. If it is -1 all the rows to the end are written
xPos
- the x write coordinate
yPos
- the y write coordinate
canvases
- an array of 4 PdfContentByte
obtained from beginWritingRows()
beginWritingRows(com.itextpdf.text.pdf.PdfContentByte)
public float writeSelectedRows(int colStart, int colEnd, int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte[] canvases, boolean reusable)
canvases
is obtained from beginWritingRows()
. The table event is only fired for complete rows.
colStart
- the first column to be written, zero index
colEnd
- the last column to be written + 1. If it is -1 all the columns to the end are written
rowStart
- the first row to be written, zero index
rowEnd
- the last row to be written + 1. If it is -1 all the rows to the end are written
xPos
- the x write coordinate
yPos
- the y write coordinate
canvases
- an array of 4 PdfContentByte
obtained from beginWritingRows()
reusable
- if set to false, the content in the cells is "consumed"; if true, you can reuse the cells, the row, the parent table as many times you want.
beginWritingRows(com.itextpdf.text.pdf.PdfContentByte)
public float writeSelectedRows(int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte canvas)
rowStart
- the first row to be written, zero index
rowEnd
- the last row to be written + 1. If it is -1 all the rows to the end are written
xPos
- the x write coordinate
yPos
- the y write coordinate
canvas
- the PdfContentByte
where the rows will be written to
public float writeSelectedRows(int colStart, int colEnd, int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte canvas)
colStart
- the first column to be written, zero index
colEnd
- the last column to be written + 1. If it is -1 all the columns to the end are written
rowStart
- the first row to be written, zero index
rowEnd
- the last row to be written + 1. If it is -1 all the rows to the end are written
xPos
- the x write coordinate
yPos
- the y write coordinate
canvas
- the PdfContentByte
where the rows will be written to
public float writeSelectedRows(int colStart, int colEnd, int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte canvas, boolean reusable)
colStart
- the first column to be written, zero index
colEnd
- the last column to be written + 1. If it is -1 all the columns to the end are written
rowStart
- the first row to be written, zero index
rowEnd
- the last row to be written + 1. If it is -1 all the rows to the end are written
xPos
- the x write coordinate
yPos
- the y write coordinate
canvas
- the PdfContentByte
where the rows will be written to
reusable
- if set to false, the content in the cells is "consumed"; if true, you can reuse the cells, the row, the parent table as many times you want.
public static PdfContentByte[] beginWritingRows(PdfContentByte canvas)
PdfContentByte
returned with the following order:
PdfPtable.BASECANVAS
- the original PdfContentByte
. Anything placed here will be under the table. PdfPtable.BACKGROUNDCANVAS
- the layer where the background goes to. PdfPtable.LINECANVAS
- the layer where the lines go to. PdfPtable.TEXTCANVAS
- the layer where the text go to. Anything placed here will be over the table. The layers are placed in sequence on top of each other.
canvas
- the PdfContentByte
where the rows will be written to
PdfContentByte
writeSelectedRows(int, int, float, float, PdfContentByte[])
public static void endWritingRows(PdfContentByte[] canvases)
canvases
- the array returned by beginWritingRows()
public int size()
public float getTotalHeight()
public float getRowHeight(int idx)
idx
- the row index (starts at 0)
protected float getRowHeight(int idx, boolean firsttime)
idx
- the row index (starts at 0)
firsttime
- is this the first time the row heigh is calculated?
public float getRowspanHeight(int rowIndex, int cellIndex)
rowIndex
- the row index
cellIndex
- the cell index
public boolean hasRowspan(int rowIdx)
public void normalizeHeadersFooters()
public float getHeaderHeight()
setHeaderRows()
.
public float getFooterHeight()
setFooterRows()
.
public boolean deleteRow(int rowNumber)
rowNumber
- the row to be deleted
true
if the row was deleted
public boolean deleteLastRow()
true
if the last row was deleted
public void deleteBodyRows()
public int getNumberOfColumns()
public int getHeaderRows()
public void setHeaderRows(int headerRows)
Document
and the table crosses pages.
headerRows
- the number of the top rows that constitute the header
public int type()
public boolean isContent()
Element
isContent
in interface Element
Element.isContent()
public boolean isNestable()
Element
isNestable
in interface Element
Element.isNestable()
public boolean process(ElementListener listener)
ElementListener
.
public String getSummary()
public void setSummary(String summary)
public float getWidthPercentage()
public void setWidthPercentage(float widthPercentage)
widthPercentage
- the width percentage that the table will occupy in the page
public int getHorizontalAlignment()
public void setHorizontalAlignment(int horizontalAlignment)
horizontalAlignment
- the horizontal alignment of the table relative to the page
public PdfPRow getRow(int idx)
idx
-
public ArrayList<PdfPRow> getRows()
public int getLastCompletedRowIndex()
public void setBreakPoints(int... breakPoints)
breakPoints
- int[]
IndexOutOfBoundsException
- if a row index is passed that is out of bounds
public void keepRowsTogether(int[] rows)
rows
- int[]
IndexOutOfBoundsException
- if a row index is passed that is out of bounds
public void keepRowsTogether(int start, int end)
start
- int
end
- int
IndexOutOfBoundsException
- if a row index is passed that is out of bounds
public void keepRowsTogether(int start)
keepRowsTogether(start, rows.size()
.
start
- int
IndexOutOfBoundsException
- if a row index is passed that is out of bounds
public ArrayList<PdfPRow> getRows(int start, int end)
start
- the first row in the selection
end
- the first row that isn't part of the selection
protected PdfPRow adjustCellsInRow(int start, int end)
start
- the index of the start row (the one to adjust)
end
- the index of the end row on the page
public void setTableEvent(PdfPTableEvent event)
event
- the table event for this table
public PdfPTableEvent getTableEvent()
public float[] getAbsoluteWidths()
public boolean isSkipFirstHeader()
public boolean isSkipLastFooter()
public void setSkipFirstHeader(boolean skipFirstHeader)
skipFirstHeader
- New value of property skipFirstHeader.
public void setSkipLastFooter(boolean skipLastFooter)
skipLastFooter
- New value of property skipLastFooter.
public void setRunDirection(int runDirection)
runDirection
- One of the following values: PdfWriter.RUN_DIRECTION_DEFAULT, PdfWriter.RUN_DIRECTION_NO_BIDI, PdfWriter.RUN_DIRECTION_LTR or PdfWriter.RUN_DIRECTION_RTL.
public int getRunDirection()
public boolean isLockedWidth()
public void setLockedWidth(boolean lockedWidth)
setTotalWidth()
in Document.add()
.
lockedWidth
- true
to use the value in setTotalWidth()
in Document.add()
public boolean isSplitRows()
public void setSplitRows(boolean splitRows)
true
by default.
splitRows
- true to split; false otherwise
public void setSpacingBefore(float spacing)
setSpacingBefore
in interface Spaceable
spacing
- the new spacing
public void setSpacingAfter(float spacing)
setSpacingAfter
in interface Spaceable
spacing
- the new spacing
public float spacingBefore()
public float spacingAfter()
public float getPaddingTop()
getPaddingTop
in interface Spaceable
public void setPaddingTop(float paddingTop)
setPaddingTop
in interface Spaceable
public boolean isExtendLastRow()
public void setExtendLastRow(boolean extendLastRows)
extendLastRows
- true to extend the last row; false otherwise
public void setExtendLastRow(boolean extendLastRows, boolean extendFinalRow)
extendLastRows
- true to extend the last row on each page; false otherwise
extendFinalRow
- false if you don't want to extend the final row of the complete table
public boolean isExtendLastRow(boolean newPageFollows)
public boolean isHeadersInEvent()
public void setHeadersInEvent(boolean headersInEvent)
headersInEvent
- true to include the headers; false otherwise
public boolean isSplitLate()
public void setSplitLate(boolean splitLate)
splitLate
- the property value
public void setKeepTogether(boolean keepTogether)
keepTogether
- whether to try to keep the table on one page
public boolean getKeepTogether()
public int getFooterRows()
public void setFooterRows(int footerRows)
table.setHeaderRows(3); table.setFooterRows(1);Row 0 and 1 will be the header rows and row 2 will be the footer row.
footerRows
- the number of rows to be used for the footer
public void completeRow()
public void flushContent()
LargeElement
flushContent
in interface LargeElement
LargeElement.flushContent()
public boolean isComplete()
LargeElement
isComplete
in interface LargeElement
LargeElement.isComplete()
public void setComplete(boolean complete)
LargeElement
setComplete
in interface LargeElement
complete
- false if you'll be adding more data after adding the object to the document.
LargeElement.setComplete(boolean)
public float getSpacingBefore()
Spaceable
getSpacingBefore
in interface Spaceable
public float getSpacingAfter()
Spaceable
getSpacingAfter
in interface Spaceable
public boolean isLoopCheck()
public void setLoopCheck(boolean loopCheck)
public PdfObject getAccessibleAttribute(PdfName key)
IAccessibleElement
A
dictionary + Lang
, Alt
, ActualText
, E
).
getAccessibleAttribute
in interface IAccessibleElement
public void setAccessibleAttribute(PdfName key, PdfObject value)
IAccessibleElement
A
dictionary + Lang
, Alt
, ActualText
, E
).
setAccessibleAttribute
in interface IAccessibleElement
public HashMap<PdfName,PdfObject> getAccessibleAttributes()
IAccessibleElement
getAccessibleAttributes
in interface IAccessibleElement
public PdfName getRole()
IAccessibleElement
getRole
in interface IAccessibleElement
public void setRole(PdfName role)
IAccessibleElement
null
if you don't want to tag this element. Note that all child elements won't also be tagged.
setRole
in interface IAccessibleElement
public AccessibleElementId getId()
getId
in interface IAccessibleElement
public void setId(AccessibleElementId id)
setId
in interface IAccessibleElement
public boolean isInline()
isInline
in interface IAccessibleElement
public PdfPTableHeader getHeader()
public PdfPTableBody getBody()
public PdfPTableFooter getFooter()
public int getCellStartRowIndex(int rowIdx, int colIdx)
rowIdx
-
colIdx
-
public PdfPTable.FittingRows getFittingRows(float availableHeight, int startIdx)
Copyright © 1998–2022. All rights reserved.