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 TypeMethodDescriptionvoid
Add a blank cell.void
addBlankCell
(int count) Add a number of blank cells.void
addBlankCell
(int count, Function<PDFCell, PDFCell> cellCustomizer) Add a number of blank cells.void
addBlankCell
(Function<PDFCell, PDFCell> cellCustomizer) Add a blank cell.void
Add a blank row.void
addBlankRow
(int fromColumn) Add a blank row.void
addBlankRow
(int fromColumn, int toColumn) Add a blank row.void
addBlankRow
(int fromColumn, int toColumn, Function<PDFCell, PDFCell> cellCustomizer) Add a blank row.void
addBlankRow
(int fromColumn, Function<PDFCell, PDFCell> cellCustomizer) Add a blank row.void
addBlankRow
(Function<PDFCell, PDFCell> cellCustomizer) Add a blank row.void
Add a cell to the table.void
Add a cell to the table.void
void
void
void
addRowCell
(PDFCell cell) Add a cell spanning the entire row.void
addRowCell
(PDFCell cell, Function<PDFCell, PDFCell> cellCustomizer) Add a cell spanning the entire row.void
boolean
boolean
deleteRow
(int rowIndex) float[]
float
int
float
int
int
boolean
int
int
float
getRowHeight
(int rowImdex) int
float
float
float
boolean
boolean
boolean
boolean
void
setBorderWidth
(float borderThickness) Set the border width for the all sides.void
setBorderWidthBottom
(float borderThickness) Set the border width for the bottom side.void
setBorderWidthLeft
(float borderThickness) Set the border width for the left side.void
setBorderWidthRight
(float borderThickness) Set the border width for the right side.void
setBorderWidthTop
(float borderThickness) Set the border width for the top side.void
setBreakPoints
(int[] breakPoints) void
setComplete
(boolean complete) void
setFooterRows
(int rows) void
setHeaderRows
(int rows) void
setHorizontalAlignment
(int alignment) void
setKeepTogether
(boolean keepTogether) void
setSkipFirstHeader
(boolean skip) void
setSkipLastFooter
(boolean skip) void
setSplitRows
(boolean split) void
setTextDirection
(int direction) void
setTotalWidth
(float totalWidth) void
setTotalWidth
(float[] columnWidth) void
setWidthPercentage
(float widthPercentage) void
setWidthPercentage
(float[] columnWidth, PDFRectangle pageSize) void
setWidths
(float[] relativeWidths) void
setWidths
(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.
-