C# 클래스 iTextSharp.text.Table

A Table is a Rectangle that contains Cells, ordered in some kind of matrix.
Tables that span multiple pages are cut into different parts automatically. If you want a table header to be repeated on every page, you may not forget to mark the end of the header section by using the method EndHeaders().

The matrix of a table is not necessarily an m x n-matrix. It can contain holes or cells that are bigger than the unit. Believe me or not, but it took some serious thinking to make this as userfriendly as possible. I hope you wil find the result quite simple (I love simple solutions, especially for complex problems).

상속: Rectangle, ILargeElement
파일 보기 프로젝트 열기: red-gate/iTextSharp-4.1.6 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
autoFillEmptyCells bool
complete bool
convert2pdfptable bool
notAddedYet bool

Private Properties

프로퍼티 타입 설명
AssumeTableDefaults void
ErrorDimensions void
FillEmptyMatrixCells void
IsValidLocation bool
MergeInsertedTables void
PlaceCell void

공개 메소드들

메소드 설명
AddCell ( Cell cell ) : void

Adds a Cell to the Table.

AddCell ( Cell aCell, int row, int column ) : void

Adds a Cell to the Table at a certain row and column.

AddCell ( Cell aCell, object aLocation ) : void

Adds a Cell to the Table at a certain location.

AddCell ( Phrase content ) : void

Adds a Cell to the Table.

This is a shortcut for AddCell(Cell cell). The Phrase will be converted to a Cell.

AddCell ( Phrase content, System location ) : void

Adds a Cell to the Table.

AddCell ( string content ) : void

Adds a Cell to the Table.

This is a shortcut for AddCell(Cell cell). The string will be converted to a Cell.

AddCell ( string content, System location ) : void

Adds a Cell to the Table.

This is a shortcut for AddCell(Cell cell, System.Drawing.Point location). The string will be converted to a Cell.

AddColumns ( int aColumns ) : void

Gives you the posibility to add columns.

Complete ( ) : void

Will fill empty cells with valid blank Cells

CreatePdfPTable ( ) : PdfPTable
DeleteAllRows ( ) : void
DeleteColumn ( int column ) : void

Deletes a column in this table.

DeleteLastRow ( ) : bool

Deletes the last row in this table.

DeleteRow ( int row ) : bool

Deletes a row.

EndHeaders ( ) : int

Marks the last row of the table headers.

FlushContent ( ) : void
GetBottom ( float margin ) : float
GetElement ( int row, int column ) : object

returns the element at the position row, column (Cast to Cell or Table)

GetEnumerator ( ) : IEnumerator

Gets an Iterator of all the Rows.

GetLeft ( float margin ) : float
GetRight ( float margin ) : float
GetTop ( float margin ) : float
GetWidths ( float left, float totalWidth ) : float[]

Gets an array with the positions of the borders between every column.

This method translates the widths expressed in percentages into the x-coordinate of the borders of the columns on a real document.

InsertTable ( Table aTable ) : void

To put a table within the existing table at the current position generateTable will of course re-arrange the widths of the columns.

InsertTable ( Table aTable, System p ) : void

To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns.

InsertTable ( Table aTable, int row, int column ) : void

To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns.

IsNestable ( ) : bool
Process ( IElementListener listener ) : bool

Processes the element by adding it (or the different parts) to an IElementListener.

SetAlignment ( string alignment ) : void

Sets the alignment of this paragraph.

SetWidths ( int widths ) : void

Sets the widths of the different columns (percentages).

You can give up relative values of borderwidths. The sum of these values will be considered 100%. The values will be recalculated as percentages of this sum.

Table ( int columns ) : System

Constructs a Table with a certain number of columns.

Table ( int columns, int rows ) : System

Constructs a Table with a certain number of columns and a certain number of Rows.

비공개 메소드들

메소드 설명
AssumeTableDefaults ( Cell aCell ) : void

Sets the unset cell properties to be the table defaults.

ErrorDimensions ( ) : void
FillEmptyMatrixCells ( ) : void

Integrates all added tables and recalculates column widths.

IsValidLocation ( Cell aCell, System aLocation ) : bool

check if Cell 'fits' the table.

  • rowspan/colspan not beyond borders
  • spanned cell don't overlap existing cells
MergeInsertedTables ( ) : void

Integrates all added tables and recalculates column widths.

PlaceCell ( ArrayList someRows, Cell aCell, System aPosition ) : void

Inserts a Cell in a cell-array and reserves cells defined by row-/colspan.

메소드 상세

AddCell() 공개 메소드

Adds a Cell to the Table.
public AddCell ( Cell cell ) : void
cell Cell a Cell
리턴 void

AddCell() 공개 메소드

Adds a Cell to the Table at a certain row and column.
public AddCell ( Cell aCell, int row, int column ) : void
aCell Cell The Cell to add
row int The row where the Cell will be added
column int The column where the Cell will be added
리턴 void

AddCell() 공개 메소드

Adds a Cell to the Table at a certain location.
public AddCell ( Cell aCell, object aLocation ) : void
aCell Cell The Cell to add
aLocation object The location where the Cell will be added
리턴 void

AddCell() 공개 메소드

Adds a Cell to the Table.
This is a shortcut for AddCell(Cell cell). The Phrase will be converted to a Cell.
public AddCell ( Phrase content ) : void
content Phrase a Phrase
리턴 void

AddCell() 공개 메소드

Adds a Cell to the Table.
public AddCell ( Phrase content, System location ) : void
content Phrase a Phrase
location System a System.Drawing.Point
리턴 void

AddCell() 공개 메소드

Adds a Cell to the Table.
This is a shortcut for AddCell(Cell cell). The string will be converted to a Cell.
public AddCell ( string content ) : void
content string a string
리턴 void

AddCell() 공개 메소드

Adds a Cell to the Table.
This is a shortcut for AddCell(Cell cell, System.Drawing.Point location). The string will be converted to a Cell.
public AddCell ( string content, System location ) : void
content string a string
location System a point
리턴 void

AddColumns() 공개 메소드

Gives you the posibility to add columns.
public AddColumns ( int aColumns ) : void
aColumns int the number of columns to add
리턴 void

Complete() 공개 메소드

Will fill empty cells with valid blank Cells
public Complete ( ) : void
리턴 void

CreatePdfPTable() 공개 메소드

public CreatePdfPTable ( ) : PdfPTable
리턴 iTextSharp.text.pdf.PdfPTable

DeleteAllRows() 공개 메소드

public DeleteAllRows ( ) : void
리턴 void

DeleteColumn() 공개 메소드

Deletes a column in this table.
public DeleteColumn ( int column ) : void
column int the number of the column that has to be deleted
리턴 void

DeleteLastRow() 공개 메소드

Deletes the last row in this table.
public DeleteLastRow ( ) : bool
리턴 bool

DeleteRow() 공개 메소드

Deletes a row.
public DeleteRow ( int row ) : bool
row int the number of the row to delete
리턴 bool

EndHeaders() 공개 메소드

Marks the last row of the table headers.
public EndHeaders ( ) : int
리턴 int

FlushContent() 공개 메소드

public FlushContent ( ) : void
리턴 void

GetBottom() 공개 메소드

public GetBottom ( float margin ) : float
margin float
리턴 float

GetElement() 공개 메소드

returns the element at the position row, column (Cast to Cell or Table)
public GetElement ( int row, int column ) : object
row int
column int
리턴 object

GetEnumerator() 공개 메소드

Gets an Iterator of all the Rows.
public GetEnumerator ( ) : IEnumerator
리턴 IEnumerator

GetLeft() 공개 메소드

public GetLeft ( float margin ) : float
margin float
리턴 float

GetRight() 공개 메소드

public GetRight ( float margin ) : float
margin float
리턴 float

GetTop() 공개 메소드

public GetTop ( float margin ) : float
margin float
리턴 float

GetWidths() 공개 메소드

Gets an array with the positions of the borders between every column.
This method translates the widths expressed in percentages into the x-coordinate of the borders of the columns on a real document.
public GetWidths ( float left, float totalWidth ) : float[]
left float this is the position of the first border at the left (cellpadding not included)
totalWidth float /// this is the space between the first border at the left /// and the last border at the right (cellpadding not included) ///
리턴 float[]

InsertTable() 공개 메소드

To put a table within the existing table at the current position generateTable will of course re-arrange the widths of the columns.
public InsertTable ( Table aTable ) : void
aTable Table the table you want to insert
리턴 void

InsertTable() 공개 메소드

To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns.
public InsertTable ( Table aTable, System p ) : void
aTable Table the table you want to insert
p System
리턴 void

InsertTable() 공개 메소드

To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns.
public InsertTable ( Table aTable, int row, int column ) : void
aTable Table The Table to add
row int The row where the Cell will be added
column int The column where the Cell will be added
리턴 void

IsNestable() 공개 메소드

public IsNestable ( ) : bool
리턴 bool

Process() 공개 메소드

Processes the element by adding it (or the different parts) to an IElementListener.
public Process ( IElementListener listener ) : bool
listener IElementListener an IElementListener
리턴 bool

SetAlignment() 공개 메소드

Sets the alignment of this paragraph.
public SetAlignment ( string alignment ) : void
alignment string the new alignment as a string
리턴 void

SetWidths() 공개 메소드

Sets the widths of the different columns (percentages).
You can give up relative values of borderwidths. The sum of these values will be considered 100%. The values will be recalculated as percentages of this sum.
public SetWidths ( int widths ) : void
widths int an array with values
리턴 void

Table() 공개 메소드

Constructs a Table with a certain number of columns.
public Table ( int columns ) : System
columns int The number of columns in the table
리턴 System

Table() 공개 메소드

Constructs a Table with a certain number of columns and a certain number of Rows.
public Table ( int columns, int rows ) : System
columns int The number of columns in the table
rows int The number of rows
리턴 System

프로퍼티 상세

autoFillEmptyCells 보호되어 있는 프로퍼티

Boolean to automatically fill empty cells before a table is rendered (takes CPU so may be set to false in case of certainty)
protected bool autoFillEmptyCells
리턴 bool

complete 보호되어 있는 프로퍼티

protected bool complete
리턴 bool

convert2pdfptable 보호되어 있는 프로퍼티

protected bool convert2pdfptable
리턴 bool

notAddedYet 보호되어 있는 프로퍼티

protected bool notAddedYet
리턴 bool