Class PdfTable
java.lang.Object
com.aowagie.text.Rectangle
com.aowagie.text.pdf.PdfTable
- All Implemented Interfaces:
Element
PdfTable is an object that contains the graphics and text of a table.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ArrayListthis is the ArrayList with all the cells in the table.private final intthis is the number of columns in the table.private final ArrayListthis is the ArrayList with all the cell of the table header.private final float[]Cached column widths.private final TableOriginal table used to build this objectFields inherited from class Rectangle
border, borderWidth, BOTTOM, BOX, LEFT, llx, lly, NO_BORDER, RIGHT, rotation, TOP, UNDEFINED, urx, uryFields inherited from interface Element
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate final floatReturns the cellpadding of the table.(package private) final floatReturns the cellspacing of the table.(package private) intcolumns()Returns the number of columns of the table.(package private) ArrayListgetCells()Returns the arraylist with the cells of the table.(package private) ArrayListReturns the arraylist with the cells of the table header.floatGets the offset of this table.(package private) final booleanChecks if the cells of thisTablehave to fit a page.private introws()Get the number of rowsinttype()Gets the type of the text element.private voidUpdates the table row additions in the underlying table objectMethods inherited from class Rectangle
cloneNonPositionParameters, disableBorderSide, enableBorderSide, getBackgroundColor, getBorder, getBorderColor, getBorderColorBottom, getBorderColorLeft, getBorderColorRight, getBorderColorTop, getBorderWidth, getBorderWidthBottom, getBorderWidthLeft, getBorderWidthRight, getBorderWidthTop, getBottom, getBottom, getChunks, getGrayFill, getHeight, getLeft, getLeft, getRight, getRight, getRotation, getTop, getTop, getWidth, hasBorder, hasBorders, isContent, isNestable, isUseVariableBorders, normalize, process, rectangle, rotate, setBackgroundColor, setBorder, setBorderColor, setBorderColorBottom, setBorderColorLeft, setBorderColorRight, setBorderColorTop, setBorderWidth, setBorderWidthBottom, setBorderWidthLeft, setBorderWidthRight, setBorderWidthTop, setBottom, setGrayFill, setLeft, setRight, setTop, setUseVariableBorders, softCloneNonPositionParameters, toString
-
Field Details
-
columns
private final int columnsthis is the number of columns in the table. -
headercells
this is the ArrayList with all the cell of the table header. -
cells
this is the ArrayList with all the cells in the table. -
table
Original table used to build this object -
positions
private final float[] positionsCached column widths.
-
-
Constructor Details
-
PdfTable
PdfTable(Table table, float left, float right, float top) Constructs aPdfTable-object.- Parameters:
table- aTableleft- the left border on the pageright- the right border on the pagetop- the start position of the top of the table- Since:
- a parameter of this method has been removed in iText 2.0.8
-
-
Method Details
-
updateRowAdditionsInternal
private void updateRowAdditionsInternal()Updates the table row additions in the underlying table object -
rows
private int rows()Get the number of rows -
type
-
getHeaderCells
ArrayList getHeaderCells()Returns the arraylist with the cells of the table header.- Returns:
- an
ArrayList
-
getCells
-
columns
int columns()Returns the number of columns of the table.- Returns:
- the number of columns
-
cellpadding
private final float cellpadding()Returns the cellpadding of the table.- Returns:
- the cellpadding
-
cellspacing
final float cellspacing()Returns the cellspacing of the table.- Returns:
- the cellspacing
-
hasToFitPageCells
final boolean hasToFitPageCells()Checks if the cells of thisTablehave to fit a page.- Returns:
- true if the cells may not be split
-
getOffset
public float getOffset()Gets the offset of this table.- Returns:
- the space between this table and the previous element.
-