HiraokaHyperTools.iTextSharp-LGPL
0.2.5
|
Public Member Functions | |
PdfPTable (float[] relativeWidths) | |
PdfPTable (int numColumns) | |
PdfPTable (PdfPTable table) | |
void | SetWidths (float[] relativeWidths) |
void | SetWidths (int[] relativeWidths) |
void | SetTotalWidth (float[] columnWidth) |
void | SetWidthPercentage (float[] columnWidth, Rectangle pageSize) |
float | CalculateHeights (bool firsttime) |
void | CalculateHeightsFast () |
void | AddCell (PdfPCell cell) |
void | AddCell (String text) |
void | AddCell (PdfPTable table) |
void | AddCell (Image image) |
void | AddCell (Phrase phrase) |
float | WriteSelectedRows (int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte[] canvases) |
float | WriteSelectedRows (int colStart, int colEnd, int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte[] canvases) |
float | WriteSelectedRows (int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte canvas) |
float | WriteSelectedRows (int colStart, int colEnd, int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte canvas) |
float | GetRowHeight (int idx) |
float | GetRowHeight (int idx, bool firsttime) |
float | GetRowspanHeight (int rowIndex, int cellIndex) |
bool | DeleteRow (int rowNumber) |
bool | DeleteLastRow () |
void | DeleteBodyRows () |
bool | IsContent () |
bool | IsNestable () |
bool | Process (IElementListener listener) |
PdfPRow | GetRow (int idx) |
ArrayList | GetRows (int start, int end) |
void | CompleteRow () |
void | FlushContent () |
![]() | |
string | ToString () |
Gets the content of the text element. More... | |
Static Public Member Functions | |
static PdfPTable | ShallowCopy (PdfPTable table) |
static PdfContentByte[] | BeginWritingRows (PdfContentByte canvas) |
static void | EndWritingRows (PdfContentByte[] canvases) |
Static Public Attributes | |
const int | BASECANVAS = 0 |
const int | BACKGROUNDCANVAS = 1 |
const int | LINECANVAS = 2 |
const int | TEXTCANVAS = 3 |
Protected Member Functions | |
PdfPTable () | |
PdfPRow | AdjustCellsInRow (int start, int end) |
Protected Attributes | |
ArrayList | rows = new ArrayList() |
float | totalHeight = 0 |
PdfPCell[] | currentRow |
int | currentRowIdx = 0 |
PdfPCell | defaultCell = new PdfPCell((Phrase)null) |
float | totalWidth = 0 |
float[] | relativeWidths |
float[] | absoluteWidths |
IPdfPTableEvent | tableEvent |
int | headerRows |
float | widthPercentage = 80 |
bool | isColspan = false |
int | runDirection = PdfWriter.RUN_DIRECTION_DEFAULT |
float | spacingBefore |
float | spacingAfter |
bool | complete = true |
bool | rowCompleted = true |
Properties | |
float | TotalWidth [get, set] |
PdfPCell | DefaultCell [get] |
int | Size [get] |
float | TotalHeight [get] |
float | HeaderHeight [get] |
float | FooterHeight [get] |
int | NumberOfColumns [get] |
int | HeaderRows [get, set] |
int | FooterRows [get, set] |
ArrayList | Chunks [get] |
int | Type [get] |
float | WidthPercentage [get, set] |
int | HorizontalAlignment [get, set] |
ArrayList | Rows [get] |
IPdfPTableEvent | TableEvent [get, set] |
float[] | AbsoluteWidths [get] |
bool | SkipFirstHeader [get, set] |
bool | SkipLastFooter [get, set] |
int | RunDirection [get, set] |
bool | LockedWidth [get, set] |
bool | SplitRows [get, set] |
float | SpacingBefore [get, set] |
float | SpacingAfter [get, set] |
bool | ExtendLastRow [get, set] |
bool | HeadersInEvent [get, set] |
bool | SplitLate [get, set] |
bool | KeepTogether [get, set] |
bool | ElementComplete [get, set] |
![]() | |
bool | ElementComplete [get, set] |
![]() | |
int | Type [get] |
Gets the type of the text element. More... | |
ArrayList | Chunks [get] |
Gets all the chunks in this element. More... | |
This is a table that can be put at an absolute position but can also be added to the document as the class Table
. In the last case when crossing pages the table always break at full rows; if a row is bigger than the page it is dropped silently to avoid infinite loops.
A PdfPTableEvent can be associated to the table to do custom drawing when the table is rendered.
|
protected |
iTextSharp.text.pdf.PdfPTable.PdfPTable | ( | float[] | relativeWidths | ) |
Constructs a PdfPTable
with the relative column widths.
relativeWidths | the relative column widths |
iTextSharp.text.pdf.PdfPTable.PdfPTable | ( | int | numColumns | ) |
Constructs a PdfPTable
with numColumns
columns.
numColumns | the number of columns |
iTextSharp.text.pdf.PdfPTable.PdfPTable | ( | PdfPTable | table | ) |
void iTextSharp.text.pdf.PdfPTable.AddCell | ( | Image | image | ) |
void iTextSharp.text.pdf.PdfPTable.AddCell | ( | PdfPCell | cell | ) |
Adds a cell element.
cell | the cell element |
void iTextSharp.text.pdf.PdfPTable.AddCell | ( | PdfPTable | table | ) |
Adds a nested table.
table | the table to be added to the cell |
void iTextSharp.text.pdf.PdfPTable.AddCell | ( | Phrase | phrase | ) |
Adds a cell element.
phrase | the Phrase to be added to the cell |
void iTextSharp.text.pdf.PdfPTable.AddCell | ( | String | text | ) |
Adds a cell element.
text | the text for the cell |
|
protected |
Calculates the extra height needed in a row because of rowspans.
start | the index of the start row (the one to adjust) |
end | the index of the end row on the page |
|
static |
Gets and initializes the 4 layers where the table is written to. The text or graphics are added to one of the 4 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
float iTextSharp.text.pdf.PdfPTable.CalculateHeights | ( | bool | firsttime | ) |
Calculates the heights of the table.
firsttime | if true, the heights of the rows will be recalculated. This takes time; normally the heights of the rows are already calcultated, so in most cases, it's save to use false as parameter. |
void iTextSharp.text.pdf.PdfPTable.CalculateHeightsFast | ( | ) |
Calculates the heights of the table.
void iTextSharp.text.pdf.PdfPTable.CompleteRow | ( | ) |
Completes the current row with the default cell. An incomplete row will be dropped but calling this method will make sure that it will be present in the table.
void iTextSharp.text.pdf.PdfPTable.DeleteBodyRows | ( | ) |
Removes all of the rows except headers
bool iTextSharp.text.pdf.PdfPTable.DeleteLastRow | ( | ) |
Deletes the last row in the table.
true
if the last row was deleted bool iTextSharp.text.pdf.PdfPTable.DeleteRow | ( | int | rowNumber | ) |
Deletes a row from the table.
rowNumber | the row to be deleted |
true
if the row was deleted
|
static |
Finishes writing the table.
canvases | the array returned by beginWritingRows() |
void iTextSharp.text.pdf.PdfPTable.FlushContent | ( | ) |
Implements iTextSharp.text.ILargeElement.
PdfPRow iTextSharp.text.pdf.PdfPTable.GetRow | ( | int | idx | ) |
Gets a row with a given index (added by Jin-Hsia Yang).
idx |
float iTextSharp.text.pdf.PdfPTable.GetRowHeight | ( | int | idx | ) |
Gets the height of a particular row.
idx | the row index (starts at 0) |
float iTextSharp.text.pdf.PdfPTable.GetRowHeight | ( | int | idx, |
bool | firsttime | ||
) |
Gets the height of a particular row.
idx | the row index (starts at 0) |
firsttime | is this the first time the row heigh is calculated? |
ArrayList iTextSharp.text.pdf.PdfPTable.GetRows | ( | int | start, |
int | end | ||
) |
Gets an arraylist with a selection of rows.
start | the first row in the selection |
end | the first row that isn't part of the selection |
float iTextSharp.text.pdf.PdfPTable.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).
rowIndex | the row index |
cellIndex | the cell index |
bool iTextSharp.text.pdf.PdfPTable.IsContent | ( | ) |
bool iTextSharp.text.pdf.PdfPTable.IsNestable | ( | ) |
Implements iTextSharp.text.IElement.
bool iTextSharp.text.pdf.PdfPTable.Process | ( | IElementListener | listener | ) |
Processes the element by adding it (or the different parts) to an ElementListener
.
listener | an ElementListener |
true
if the element was processed successfully Implements iTextSharp.text.IElement.
void iTextSharp.text.pdf.PdfPTable.SetTotalWidth | ( | float[] | columnWidth | ) |
Sets the full width of the table from the absolute column width.
columnWidth | the absolute width of each column |
DocumentException | if the number of widths is different than the number of columns |
void iTextSharp.text.pdf.PdfPTable.SetWidthPercentage | ( | float[] | columnWidth, |
Rectangle | pageSize | ||
) |
Sets the percentage width of the table from the absolute column width.
columnWidth | the absolute width of each column |
pageSize | the page size |
DocumentException |
void iTextSharp.text.pdf.PdfPTable.SetWidths | ( | float[] | relativeWidths | ) |
Sets the relative widths of the table.
relativeWidths | the relative widths of the table. |
DocumentException | if the number of widths is different than the number of columns |
void iTextSharp.text.pdf.PdfPTable.SetWidths | ( | int[] | relativeWidths | ) |
Sets the relative widths of the table.
relativeWidths | the relative widths of the table. |
DocumentException | if the number of widths is different than the number of columns |
Makes a shallow copy of a table (format without content).
table |
float iTextSharp.text.pdf.PdfPTable.WriteSelectedRows | ( | int | colStart, |
int | colEnd, | ||
int | rowStart, | ||
int | rowEnd, | ||
float | xPos, | ||
float | yPos, | ||
PdfContentByte | canvas | ||
) |
Writes the selected rows to the document. This method clips the columns; this is only important if there are columns with colspan at boundaries.
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 |
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 coodinate |
yPos | the y write coodinate |
canvas | the PdfContentByte where the rows will be written to |
float iTextSharp.text.pdf.PdfPTable.WriteSelectedRows | ( | int | colStart, |
int | colEnd, | ||
int | rowStart, | ||
int | rowEnd, | ||
float | xPos, | ||
float | yPos, | ||
PdfContentByte[] | canvases | ||
) |
Writes the selected rows and columns to the document. This method does not clip the columns; this is only important if there are columns with colspan at boundaries.
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 coodinate |
yPos | the y write coodinate |
canvases | an array of 4 PdfContentByte obtained from beginWrittingRows() |
float iTextSharp.text.pdf.PdfPTable.WriteSelectedRows | ( | int | rowStart, |
int | rowEnd, | ||
float | xPos, | ||
float | yPos, | ||
PdfContentByte | canvas | ||
) |
Writes the selected rows to the document.
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 coodinate |
yPos | the y write coodinate |
canvas | the PdfContentByte where the rows will be written to |
float iTextSharp.text.pdf.PdfPTable.WriteSelectedRows | ( | int | rowStart, |
int | rowEnd, | ||
float | xPos, | ||
float | yPos, | ||
PdfContentByte[] | canvases | ||
) |
Writes the selected rows to the document.
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 coodinate |
yPos | the y write coodinate |
canvases | an array of 4 PdfContentByte obtained from beginWrittingRows() |
|
protected |
|
static |
The index of the duplicate PdfContentByte
where the background will be drawn.
|
static |
The index of the original PdfcontentByte
.
|
protected |
Indicates if the PdfPTable is complete once added to the document.
|
protected |
|
protected |
|
protected |
Holds value of property headerRows.
|
protected |
|
static |
The index of the duplicate PdfContentByte
where the border lines will be drawn.
|
protected |
|
protected |
Keeps track of the completeness of the current row.
|
protected |
|
protected |
|
protected |
The spacing after the table.
|
protected |
The spacing before the table.
|
protected |
|
static |
The index of the duplicate PdfContentByte
where the text will be drawn.
|
protected |
|
protected |
|
protected |
Holds value of property widthPercentage.
|
get |
Gets the absolute sizes of each column width.
|
get |
Gets all the chunks in this element.
ArrayList
|
get |
|
getset |
|
getset |
|
get |
Gets the height of the rows that constitute the header as defined by setFooterRows()
.
|
getset |
|
get |
Gets the height of the rows that constitute the header as defined by setHeaderRows()
.
|
getset |
|
getset |
|
getset |
|
getset |
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. The default is to split the table over multiple pages.
p_KeepTogether | whether to try to keep the table on one page |
|
getset |
|
get |
Returns the number of columns.
|
get |
Gets an arraylist with all the rows in the table.
|
getset |
|
get |
Gets the number of rows in this table.
|
getset |
|
getset |
Tells you if the last footer needs to be skipped (for instance if the footer says "continued on the next page")
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
get |
Gets the total height of the table.
|
getset |
Gets the full width of the table.
|
get |
Gets the type of the text element.
|
getset |