public class PdfPRow extends Object
Modifier and Type | Field and Description |
---|---|
static float |
BOTTOM_LIMIT
the bottom limit (bottom right y)
|
protected boolean |
calculated |
protected PdfPCell[] |
cells |
protected float[] |
extraHeights
extra heights that needs to be added to a cell because of rowspans.
|
protected float |
maxHeight |
static float |
RIGHT_LIMIT
the right limit
|
protected float[] |
widths |
Constructor and Description |
---|
PdfPRow(PdfPCell[] cells)
Constructs a new PdfPRow with the cells in the array that was passed
as a parameter.
|
PdfPRow(PdfPRow row)
Makes a copy of an existing row.
|
Modifier and Type | Method and Description |
---|---|
float |
calculateHeights()
Calculates the heights of each cell in the row.
|
PdfPCell[] |
getCells()
Returns the array of cells in the row.
|
float |
getMaxHeights()
Gets the maximum height of the row (i.e.
|
void |
initExtraHeights()
Initializes the extra heights array.
|
boolean |
isCalculated()
Checks if the dimensions of the columns were calculated.
|
protected void |
restoreCanvases(PdfContentByte[] canvases) |
protected void |
saveAndRotateCanvases(PdfContentByte[] canvases,
float a,
float b,
float c,
float d,
float e,
float f) |
static float |
setColumn(ColumnText ct,
float left,
float bottom,
float right,
float top) |
void |
setExtraHeight(int cell,
float height)
Sets an extra height for a cell.
|
void |
setMaxHeights(float maxHeight)
Changes the maximum height of the row (to make it higher).
|
boolean |
setWidths(float[] widths)
Sets the widths of the columns in the row.
|
PdfPRow |
splitRow(PdfPTable table,
int rowIndex,
float new_height)
Splits a row to newHeight.
|
void |
writeBorderAndBackground(float xPos,
float yPos,
float currentMaxHeight,
PdfPCell cell,
PdfContentByte[] canvases)
Writes the border and background of one cell in the row.
|
void |
writeCells(int colStart,
int colEnd,
float xPos,
float yPos,
PdfContentByte[] canvases)
Writes a number of cells (not necessarily all cells).
|
public static final float BOTTOM_LIMIT
public static final float RIGHT_LIMIT
protected PdfPCell[] cells
protected float[] widths
protected float[] extraHeights
protected float maxHeight
protected boolean calculated
public PdfPRow(PdfPCell[] cells)
cells
- public PdfPRow(PdfPRow row)
row
- public boolean setWidths(float[] widths)
widths
- public void initExtraHeights()
public void setExtraHeight(int cell, float height)
cell
- the index of the cell that needs an extra heightheight
- the extra heightpublic float calculateHeights()
public void writeBorderAndBackground(float xPos, float yPos, float currentMaxHeight, PdfPCell cell, PdfContentByte[] canvases)
xPos
- The x-coordinate where the table starts on the canvasyPos
- The y-coordinate where the table starts on the canvascurrentMaxHeight
- The height of the cell to be drawn.cell
- canvases
- protected void saveAndRotateCanvases(PdfContentByte[] canvases, float a, float b, float c, float d, float e, float f)
protected void restoreCanvases(PdfContentByte[] canvases)
public static float setColumn(ColumnText ct, float left, float bottom, float right, float top)
public void writeCells(int colStart, int colEnd, float xPos, float yPos, PdfContentByte[] canvases)
colStart
- The first column to be written.
Remember that the column index starts with 0.colEnd
- The last column to be written.
Remember that the column index starts with 0.
If -1, all the columns to the end are written.xPos
- The x-coordinate where the table starts on the canvasyPos
- The y-coordinate where the table starts on the canvaspublic boolean isCalculated()
public float getMaxHeights()
public void setMaxHeights(float maxHeight)
maxHeight
- the new maximum heightpublic PdfPRow splitRow(PdfPTable table, int rowIndex, float new_height)
new_height
- the new heightpublic PdfPCell[] getCells()
Copyright © 2020. All rights reserved.