Package com.storedobject.pdf
Class PDFTable
java.lang.Object
com.storedobject.pdf.PDFTable
- All Implemented Interfaces:
PDFElement
- Direct Known Subclasses:
PDF.ObjectFormTable,PDF.ObjectTable
Table object that can be added to PDF document.
-
Field Summary
Fields inherited from interface com.storedobject.pdf.PDFElement
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, TEXT_DIRECTION_DEFAULT, TEXT_DIRECTION_LTR, TEXT_DIRECTION_NO_BIDI, TEXT_DIRECTION_RTL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a blank cell.voidaddBlankCell(int count) Add a number of blank cells.voidaddBlankCell(int count, Function<PDFCell, PDFCell> cellCustomizer) Add a number of blank cells.voidaddBlankCell(Function<PDFCell, PDFCell> cellCustomizer) Add a blank cell.voidAdd a blank row.voidaddBlankRow(int fromColumn) Add a blank row.voidaddBlankRow(int fromColumn, int toColumn) Add a blank row.voidaddBlankRow(int fromColumn, int toColumn, Function<PDFCell, PDFCell> cellCustomizer) Add a blank row.voidaddBlankRow(int fromColumn, Function<PDFCell, PDFCell> cellCustomizer) Add a blank row.voidaddBlankRow(Function<PDFCell, PDFCell> cellCustomizer) Add a blank row.voidAdd a cell to the table.voidAdd a cell to the table.voidvoidvoidvoidaddRowCell(PDFCell cell) Add a cell spanning the entire row.voidaddRowCell(PDFCell cell, Function<PDFCell, PDFCell> cellCustomizer) Add a cell spanning the entire row.voidbooleanbooleandeleteRow(int rowIndex) float[]floatintfloatintintbooleanintintfloatgetRowHeight(int rowImdex) intfloatfloatfloatbooleanbooleanbooleanbooleanvoidsetBorderWidth(float borderThickness) Set the border width for the all sides.voidsetBorderWidthBottom(float borderThickness) Set the border width for the bottom side.voidsetBorderWidthLeft(float borderThickness) Set the border width for the left side.voidsetBorderWidthRight(float borderThickness) Set the border width for the right side.voidsetBorderWidthTop(float borderThickness) Set the border width for the top side.voidsetBreakPoints(int[] breakPoints) voidsetComplete(boolean complete) voidsetFooterRows(int rows) voidsetHeaderRows(int rows) voidsetHorizontalAlignment(int alignment) voidsetKeepTogether(boolean keepTogether) voidsetSkipFirstHeader(boolean skip) voidsetSkipLastFooter(boolean skip) voidsetSplitRows(boolean split) voidsetTextDirection(int direction) voidsetTotalWidth(float totalWidth) voidsetTotalWidth(float[] columnWidth) voidsetWidthPercentage(float widthPercentage) voidsetWidthPercentage(float[] columnWidth, PDFRectangle pageSize) voidsetWidths(float[] relativeWidths) voidsetWidths(int[] relativeWidths)
-
Constructor Details
-
PDFTable
public PDFTable(float[] relativeWidths) -
PDFTable
public PDFTable(int columnCount)
-
-
Method Details
-
addBlankCell
public void addBlankCell()Add a blank cell. -
addBlankCell
-
addBlankCell
public void addBlankCell(int count) Add a number of blank cells.- Parameters:
count- Number of blank cells to add.
-
addBlankCell
-
addCell
-
addCell
-
addCell
-
addCell
-
addCell
-
addRowCell
Add a cell spanning the entire row.- Parameters:
cell- Cell to be added.
-
addRowCell
-
getDefaultCell
-
setHorizontalAlignment
public void setHorizontalAlignment(int alignment) -
setTotalWidth
public void setTotalWidth(float totalWidth) -
setTotalWidth
-
getTotalHeight
public float getTotalHeight() -
getTotalWidth
public float getTotalWidth() -
setWidths
- Throws:
PDFException
-
setWidths
- Throws:
PDFException
-
getNumberOfColumns
public int getNumberOfColumns() -
getNumberOfRows
public int getNumberOfRows() -
setWidthPercentage
- Throws:
PDFException
-
setWidthPercentage
public void setWidthPercentage(float widthPercentage) -
isComplete
public boolean isComplete() -
setComplete
public void setComplete(boolean complete) -
deleteBodyRows
public void deleteBodyRows() -
setSkipFirstHeader
public void setSkipFirstHeader(boolean skip) -
getChunks
-
getWidthPercentage
public float getWidthPercentage() -
deleteRow
public boolean deleteRow(int rowIndex) -
setHeaderRows
public void setHeaderRows(int rows) -
getRowHeight
public float getRowHeight(int rowImdex) -
getTextDirection
public int getTextDirection() -
setTextDirection
public void setTextDirection(int direction) -
getHeaderHeight
public float getHeaderHeight() -
deleteLastRow
public boolean deleteLastRow() -
getHeaderRows
public int getHeaderRows() -
getHorizontalAlignment
public int getHorizontalAlignment() -
setBreakPoints
public void setBreakPoints(int[] breakPoints) -
getAbsoluteWidths
public float[] getAbsoluteWidths() -
isSkipFirstHeader
public boolean isSkipFirstHeader() -
isSplitRows
public boolean isSplitRows() -
setSplitRows
public void setSplitRows(boolean split) -
setKeepTogether
public void setKeepTogether(boolean keepTogether) -
getKeepTogether
public boolean getKeepTogether() -
addBlankRow
public void addBlankRow()Add a blank row. -
addBlankRow
-
addBlankRow
public void addBlankRow(int fromColumn) Add a blank row.- Parameters:
fromColumn- From column.
-
addBlankRow
-
addBlankRow
public void addBlankRow(int fromColumn, int toColumn) Add a blank row.- Parameters:
fromColumn- From column.toColumn- To column.
-
addBlankRow
-
setBorderWidthLeft
public void setBorderWidthLeft(float borderThickness) Set the border width for the left side. Default is no border.- Parameters:
borderThickness- Border width.
-
setBorderWidthRight
public void setBorderWidthRight(float borderThickness) Set the border width for the right side. Default is no border.- Parameters:
borderThickness- Border width.
-
setBorderWidthTop
public void setBorderWidthTop(float borderThickness) Set the border width for the top side. Default is no border.- Parameters:
borderThickness- Border width.
-
setBorderWidthBottom
public void setBorderWidthBottom(float borderThickness) Set the border width for the bottom side. Default is no border.- Parameters:
borderThickness- Border width.
-
setBorderWidth
public void setBorderWidth(float borderThickness) Set the border width for the all sides. Default is no border.- Parameters:
borderThickness- Border width.
-