com.lowagie.text
Class Table

java.lang.Object
  extended by com.lowagie.text.Rectangle
      extended by com.lowagie.text.Table
All Implemented Interfaces:
Element, MarkupAttributes

public class Table
extends Rectangle
implements Element, MarkupAttributes

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). I didn't want it to be something as complex as the Java GridBagLayout.

Example:

 // Remark: You MUST know the number of columns when constructing a Table.
 //         The number of rows is not important.
 Table table = new Table(3);
 table.setBorderWidth(1);
 table.setBorderColor(new Color(0, 0, 255));
 table.setPadding(5);
 table.setSpacing(5);
 Cell cell = new Cell("header");
 cell.setHeader(true);
 cell.setColspan(3);
 table.addCell(cell);
 table.endHeaders();
 cell = new Cell("example cell with colspan 1 and rowspan 2");
 cell.setRowspan(2);
 cell.setBorderColor(new Color(255, 0, 0));
 table.addCell(cell);
 table.addCell("1.1");
 table.addCell("2.1");
 table.addCell("1.2");
 table.addCell("2.2");
 table.addCell("cell test1");
 cell = new Cell("big cell");
 cell.setRowspan(2);
 cell.setColspan(2);
 table.addCell(cell);
 table.addCell("cell test2");
 
The result of this code is a table:
header
example cell with colspan 1 and rowspan 2 1.1 2.1
1.2 2.2
cell test1 big cell
cell test2

See Also:
Rectangle, Element, Row, Cell

Field Summary
protected  Hashtable alternatingRowAttributes
          contains the attributes that are added to each odd (or even) row
protected  boolean convert2pdfptable
          if you want to generate tables the old way, set this value to false.
 
Fields inherited from class com.lowagie.text.Rectangle
background, border, borderColorBottom, borderColorLeft, borderColorRight, borderColorTop, borderWidth, borderWidthBottom, borderWidthLeft, borderWidthRight, borderWidthTop, BOTTOM, BOX, color, LEFT, llx, lly, markupAttributes, NO_BORDER, RIGHT, rotation, TOP, UNDEFINED, urx, ury, useVariableBorders
 
Constructor Summary
Table(int columns)
          Constructs a Table with a certain number of columns.
Table(int columns, int rows)
          Constructs a Table with a certain number of columns and a certain number of Rows.
Table(Properties attributes)
          Returns a Table that has been constructed taking in account the value of some attributes.
 
Method Summary
 String absWidth()
          Gets the table width (in pixels).
 void addCell(Cell cell)
          Adds a Cell to the Table.
 void addCell(Cell aCell, int row, int column)
          Adds a Cell to the Table at a certain row and column.
 void addCell(Cell aCell, Point aLocation)
          Adds a Cell to the Table at a certain location.
 void addCell(Phrase content)
          Adds a Cell to the Table.
 void addCell(Phrase content, Point location)
          Adds a Cell to the Table.
 void addCell(String content)
          Adds a Cell to the Table.
 void addCell(String content, Point location)
          Adds a Cell to the Table.
 void addColumns(int aColumns)
          Gives you the posibility to add columns.
 int alignment()
          Gets the horizontal alignment.
 float bottom()
          This method throws an UnsupportedOperationException.
 float bottom(int margin)
          This method throws an UnsupportedOperationException.
 float cellpadding()
          Gets the cellpadding.
 float cellspacing()
          Gets the cellspacing.
 int columns()
          Gets the number of columns.
 void complete()
          Will fill empty cells with valid blank Cells
 PdfPTable createPdfPTable()
          Create a PdfPTable based on this Table object.
 void deleteAllRows()
          Deletes all rows in this table.
 void deleteColumn(int column)
          Deletes a column in this table.
 boolean deleteLastRow()
          Deletes the last row in this table.
 boolean deleteRow(int row)
          Deletes a row.
 int endHeaders()
          Marks the last row of the table headers.
 int firstDataRow()
          Gets the first number of the row that doesn't contain headers.
 ArrayList getChunks()
          Gets all the chunks in this element.
 Dimension getDimension()
          Gets the dimension of this table
 Object getElement(int row, int column)
          returns the element at the position row, column (Cast to Cell or Table)
 int getNextColumn()
          Returns the next column 0-based index where a new cell would be added.
 int getNextRow()
          Returns the next row 0-based index where a new cell would be added.
 float getOffset()
          Gets the offset of this table.
 float[] getProportionalWidths()
          Gets the proportional widths of the columns in this Table.
 float[] getWidths(float left, float totalWidth)
          Gets an array with the positions of the borders between every column.
 boolean hasToFitPageCells()
          Checks if the cells of this Table have to fit a page.
 boolean hasToFitPageTable()
          Checks if this Table has to fit a page.
 void insertTable(Table aTable)
          To put a table within the existing table at the current position generateTable will of course re-arrange the widths of the columns.
 void insertTable(Table aTable, int row, int column)
          To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns.
 void insertTable(Table aTable, Point aLocation)
          To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns.
 boolean isConvert2pdfptable()
          Method to check if the Table should be converted to a PdfPTable or not.
static boolean isTag(String tag)
          Checks if a given tag corresponds with this object.
 Iterator iterator()
          Gets an Iterator of all the Rows.
 int lastHeaderRow()
          Gets the last number of the rows that contain headers.
 float left()
          This method throws an UnsupportedOperationException.
 float left(int margin)
          This method throws an UnsupportedOperationException.
 boolean process(ElementListener listener)
          Processes the element by adding it (or the different parts) to an ElementListener.
 float right()
          This method throws an UnsupportedOperationException.
 float right(int margin)
          This method throws an UnsupportedOperationException.
 void setAbsWidth(String width)
          Sets the width of this table (in percentage of the available space).
 void setAlignment(int value)
          Sets the horizontal alignment.
 void setAlignment(String alignment)
          Sets the alignment of this paragraph.
 void setAlternatingRowAttribute(String name, String value0, String value1)
          Allows clients to set up alternating attributes for each Row in the Table.
 void setAutoFillEmptyCells(boolean aDoAutoFill)
          Enables/disables automatic insertion of empty cells before table is rendered.
 void setBottom(int value)
          This method throws an UnsupportedOperationException.
 void setCellpadding(float value)
          Deprecated. use setSpacing instead
 void setCellsFitPage(boolean fitPage)
          Allows you to control when a page break occurs.
 void setCellspacing(float value)
          Deprecated. use setPadding instead
 void setConvert2pdfptable(boolean convert2pdfptable)
          If set to true, iText will try to convert the Table to a PdfPTable.
 void setDebug(boolean aDebug)
          Performs extra checks when executing table code (currently only when cells are added).
 void setDefaultCellBackgroundColor(Color color)
          Changes the backgroundcolor in the default layout of the Cells added with method addCell(String content).
 void setDefaultCellBorder(int value)
          Changes the border in the default layout of the Cells added with method addCell(String content).
 void setDefaultCellBorderColor(Color color)
          Changes the bordercolor in the default layout of the Cells added with method addCell(String content).
 void setDefaultCellBorderWidth(float value)
          Changes the width of the borders in the default layout of the Cells added with method addCell(String content).
 void setDefaultCellGrayFill(float value)
          Changes the grayfill in the default layout of the Cells added with method addCell(String content).
 void setDefaultColspan(int value)
          Changes the colspan in the default layout of the Cells added with method addCell(String content).
 void setDefaultHorizontalAlignment(int value)
          Changes the horizontalAlignment in the default layout of the Cells added with method addCell(String content).
 void setDefaultLayout(Cell value)
          Sets the default layout of the Table to the provided Cell
 void setDefaultRowspan(int value)
          Changes the rowspan in the default layout of the Cells added with method addCell(String content).
 void setDefaultVerticalAlignment(int value)
          Changes the verticalAlignment in the default layout of the Cells added with method addCell(String content).
 void setLastHeaderRow(int value)
          Sets the horizontal alignment.
 void setLeft(int value)
          This method throws an UnsupportedOperationException.
 void setOffset(float offset)
          Sets the offset of this table.
 void setPadding(float value)
          Sets the cellpadding.
 void setRight(int value)
          This method throws an UnsupportedOperationException.
 void setSpaceBetweenCells(float value)
          Sets the cellspacing.
 void setSpaceInsideCell(float value)
          Sets the cellpadding.
 void setSpacing(float value)
          Sets the cellspacing.
 void setTableFitsPage(boolean fitPage)
          Allows you to control when a page break occurs.
 void setTop(int value)
          This method throws an UnsupportedOperationException.
 void setWidth(float width)
          Sets the width of this table (in percentage of the available space).
 void setWidths(float[] widths)
          Sets the widths of the different columns (percentages).
 void setWidths(int[] widths)
          Sets the widths of the different columns (percentages).
 int size()
          Gets the number of rows in this Table.
 float top()
          This method throws an UnsupportedOperationException.
 float top(int margin)
          This method throws an UnsupportedOperationException.
 int type()
          Gets the type of the text element.
 float widthPercentage()
          Gets the table width (a percentage).
 
Methods inherited from class com.lowagie.text.Rectangle
backgroundColor, border, borderColor, borderWidth, bottom, cloneNonPositionParameters, disableBorderSide, enableBorderSide, getBorderColorBottom, getBorderColorLeft, getBorderColorRight, getBorderColorTop, getBorderWidthBottom, getBorderWidthLeft, getBorderWidthRight, getBorderWidthTop, getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, getRotation, grayFill, hasBorder, hasBorders, height, isUseVariableBorders, left, normalize, rectangle, right, rotate, setBackgroundColor, setBorder, setBorderColor, setBorderColorBottom, setBorderColorLeft, setBorderColorRight, setBorderColorTop, setBorderWidth, setBorderWidthBottom, setBorderWidthLeft, setBorderWidthRight, setBorderWidthTop, setBottom, setGrayFill, setLeft, setMarkupAttribute, setMarkupAttributes, setRight, setTop, setUseVariableBorders, softCloneNonPositionParameters, top, toString, width
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.lowagie.text.MarkupAttributes
getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, setMarkupAttribute, setMarkupAttributes
 

Field Detail

alternatingRowAttributes

protected Hashtable alternatingRowAttributes
contains the attributes that are added to each odd (or even) row


convert2pdfptable

protected boolean convert2pdfptable
if you want to generate tables the old way, set this value to false.

Constructor Detail

Table

public Table(int columns)
      throws BadElementException
Constructs a Table with a certain number of columns.

Parameters:
columns - The number of columns in the table
Throws:
BadElementException - if the creator was called with less than 1 column

Table

public Table(int columns,
             int rows)
      throws BadElementException
Constructs a Table with a certain number of columns and a certain number of Rows.

Parameters:
columns - The number of columns in the table
rows - The number of rows
Throws:
BadElementException - if the creator was called with less than 1 column

Table

public Table(Properties attributes)
Returns a Table that has been constructed taking in account the value of some attributes.

Parameters:
attributes - Some attributes
Method Detail

process

public boolean process(ElementListener listener)
Processes the element by adding it (or the different parts) to an ElementListener.

Specified by:
process in interface Element
Overrides:
process in class Rectangle
Parameters:
listener - an ElementListener
Returns:
true if the element was processed successfully

setDebug

public void setDebug(boolean aDebug)
Performs extra checks when executing table code (currently only when cells are added).

Parameters:
aDebug -

setDefaultLayout

public void setDefaultLayout(Cell value)
Sets the default layout of the Table to the provided Cell

Parameters:
value - a cell with all the defaults

setAutoFillEmptyCells

public void setAutoFillEmptyCells(boolean aDoAutoFill)
Enables/disables automatic insertion of empty cells before table is rendered. (default = false) As some people may want to create a table, fill only a couple of the cells and don't bother with investigating which empty ones need to be added, this default behaviour may be very welcome. Disabling is recommended to increase speed. (empty cells should be added through extra code then)

Parameters:
aDoAutoFill - enable/disable autofill

setTableFitsPage

public void setTableFitsPage(boolean fitPage)
Allows you to control when a page break occurs.

When a table doesn't fit a page, it is split in two parts. If you want to avoid this, you should set the tableFitsPage value to true.

Parameters:
fitPage - enter true if you don't want to split cells

setCellsFitPage

public void setCellsFitPage(boolean fitPage)
Allows you to control when a page break occurs.

When a cell doesn't fit a page, it is split in two parts. If you want to avoid this, you should set the cellsFitPage value to true.

Parameters:
fitPage - enter true if you don't want to split cells

hasToFitPageTable

public boolean hasToFitPageTable()
Checks if this Table has to fit a page.

Returns:
true if the table may not be split

hasToFitPageCells

public boolean hasToFitPageCells()
Checks if the cells of this Table have to fit a page.

Returns:
true if the cells may not be split

setOffset

public void setOffset(float offset)
Sets the offset of this table. Normally a newline is added before you add a Table object. This newline uses the current leading. If you want to control the space between the table and the previous element yourself, you have to set the offset of this table.

Parameters:
offset - the space between this table and the previous object.

getOffset

public float getOffset()
Gets the offset of this table.

Returns:
the space between this table and the previous element.

type

public int type()
Gets the type of the text element.

Specified by:
type in interface Element
Overrides:
type in class Rectangle
Returns:
a type

getChunks

public ArrayList getChunks()
Gets all the chunks in this element.

Specified by:
getChunks in interface Element
Overrides:
getChunks in class Rectangle
Returns:
an ArrayList

addCell

public void addCell(Cell aCell,
                    int row,
                    int column)
             throws BadElementException
Adds a Cell to the Table at a certain row and column.

Parameters:
aCell - The Cell to add
row - The row where the Cell will be added
column - The column where the Cell will be added
Throws:
BadElementException

addCell

public void addCell(Cell aCell,
                    Point aLocation)
             throws BadElementException
Adds a Cell to the Table at a certain location.

Parameters:
aCell - The Cell to add
aLocation - The location where the Cell will be added
Throws:
BadElementException

addCell

public void addCell(Cell cell)
Adds a Cell to the Table.

Parameters:
cell - a Cell

addCell

public void addCell(Phrase content)
             throws BadElementException
Adds a Cell to the Table.

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

Parameters:
content - a Phrase
Throws:
BadElementException - this should never happen

addCell

public void addCell(Phrase content,
                    Point location)
             throws BadElementException
Adds a Cell to the Table.

This is a shortcut for addCell(Cell cell, Point location). The Phrase will be converted to a Cell.

Parameters:
content - a Phrase
location - a Point
Throws:
BadElementException - this should never happen

addCell

public void addCell(String content)
             throws BadElementException
Adds a Cell to the Table.

This is a shortcut for addCell(Cell cell). The String will be converted to a Cell.

Parameters:
content - a String
Throws:
BadElementException - this should never happen

addCell

public void addCell(String content,
                    Point location)
             throws BadElementException
Adds a Cell to the Table.

This is a shortcut for addCell(Cell cell, Point location). The String will be converted to a Cell.

Parameters:
content - a String
location - a Point
Throws:
BadElementException - this should never happen

insertTable

public void insertTable(Table aTable)
To put a table within the existing table at the current position generateTable will of course re-arrange the widths of the columns.

Parameters:
aTable - the table you want to insert

insertTable

public void insertTable(Table aTable,
                        int row,
                        int column)
To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns.

Parameters:
aTable - The Table to add
row - The row where the Cell will be added
column - The column where the Cell will be added

insertTable

public void insertTable(Table aTable,
                        Point aLocation)
To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns.

Parameters:
aTable - the table you want to insert
aLocation - a Point

complete

public void complete()
Will fill empty cells with valid blank Cells


setDefaultCellBorder

public void setDefaultCellBorder(int value)
Changes the border in the default layout of the Cells added with method addCell(String content).

Parameters:
value - the new border value

setDefaultCellBorderWidth

public void setDefaultCellBorderWidth(float value)
Changes the width of the borders in the default layout of the Cells added with method addCell(String content).

Parameters:
value - the new width

setDefaultCellBorderColor

public void setDefaultCellBorderColor(Color color)
Changes the bordercolor in the default layout of the Cells added with method addCell(String content).

Parameters:
color - the new color

setDefaultCellBackgroundColor

public void setDefaultCellBackgroundColor(Color color)
Changes the backgroundcolor in the default layout of the Cells added with method addCell(String content).

Parameters:
color - the new color

setDefaultCellGrayFill

public void setDefaultCellGrayFill(float value)
Changes the grayfill in the default layout of the Cells added with method addCell(String content).

Parameters:
value - the new value

setDefaultHorizontalAlignment

public void setDefaultHorizontalAlignment(int value)
Changes the horizontalAlignment in the default layout of the Cells added with method addCell(String content).

Parameters:
value - the new alignment value

setDefaultVerticalAlignment

public void setDefaultVerticalAlignment(int value)
Changes the verticalAlignment in the default layout of the Cells added with method addCell(String content).

Parameters:
value - the new alignment value

setDefaultRowspan

public void setDefaultRowspan(int value)
Changes the rowspan in the default layout of the Cells added with method addCell(String content).

Parameters:
value - the new rowspan value

setDefaultColspan

public void setDefaultColspan(int value)
Changes the colspan in the default layout of the Cells added with method addCell(String content).

Parameters:
value - the new colspan value

deleteColumn

public void deleteColumn(int column)
                  throws BadElementException
Deletes a column in this table.

Parameters:
column - the number of the column that has to be deleted
Throws:
BadElementException

deleteRow

public boolean deleteRow(int row)
Deletes a row.

Parameters:
row - the number of the row to delete
Returns:
boolean true if the row was deleted; false if not

deleteAllRows

public void deleteAllRows()
Deletes all rows in this table. (contributed by dperezcar@fcc.es)


deleteLastRow

public boolean deleteLastRow()
Deletes the last row in this table.

Returns:
boolean true if the row was deleted; false if not

endHeaders

public int endHeaders()
Marks the last row of the table headers.

Returns:
the number of the last row of the table headers

setLastHeaderRow

public void setLastHeaderRow(int value)
Sets the horizontal alignment.

Parameters:
value - the new value

setAlignment

public void setAlignment(int value)
Sets the horizontal alignment.

Parameters:
value - the new value

setAlignment

public void setAlignment(String alignment)
Sets the alignment of this paragraph.

Parameters:
alignment - the new alignment as a String

setSpaceInsideCell

public void setSpaceInsideCell(float value)
Sets the cellpadding.

Parameters:
value - the new value

setSpaceBetweenCells

public void setSpaceBetweenCells(float value)
Sets the cellspacing.

Parameters:
value - the new value

setPadding

public void setPadding(float value)
Sets the cellpadding.

Parameters:
value - the new value

setSpacing

public void setSpacing(float value)
Sets the cellspacing.

Parameters:
value - the new value

setCellpadding

public void setCellpadding(float value)
Deprecated. use setSpacing instead

Sets the cellspacing (the meaning of cellpadding and cellspacing was inverted by mistake).

Parameters:
value - the new value

setCellspacing

public void setCellspacing(float value)
Deprecated. use setPadding instead

Sets the cellpadding (the meaning of cellpadding and cellspacing was inverted by mistake).

Parameters:
value - the new value

setWidth

public void setWidth(float width)
Sets the width of this table (in percentage of the available space).

Parameters:
width - the width

setAbsWidth

public void setAbsWidth(String width)
Sets the width of this table (in percentage of the available space).

Parameters:
width - the width

setWidths

public void setWidths(float[] widths)
               throws BadElementException
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.

example:

 float[] widths = {2, 1, 1};
 table.setWidths(widths)
 
The widths will be: a width of 50% for the first column, 25% for the second and third column.

Parameters:
widths - an array with values
Throws:
BadElementException

setWidths

public void setWidths(int[] widths)
               throws DocumentException
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.

Parameters:
widths - an array with values
Throws:
DocumentException

columns

public int columns()
Gets the number of columns.

Returns:
a value

size

public int size()
Gets the number of rows in this Table.

Returns:
the number of rows in this Table

getProportionalWidths

public float[] getProportionalWidths()
Gets the proportional widths of the columns in this Table.

Returns:
the proportional widths of the columns in this Table

iterator

public Iterator iterator()
Gets an Iterator of all the Rows.

Returns:
an Iterator

alignment

public int alignment()
Gets the horizontal alignment.

Returns:
a value

cellpadding

public float cellpadding()
Gets the cellpadding.

Returns:
a value

cellspacing

public float cellspacing()
Gets the cellspacing.

Returns:
a value

widthPercentage

public float widthPercentage()
Gets the table width (a percentage).

Returns:
the table width

absWidth

public String absWidth()
Gets the table width (in pixels).

Returns:
the table width

firstDataRow

public int firstDataRow()
Gets the first number of the row that doesn't contain headers.

Returns:
a rownumber

lastHeaderRow

public int lastHeaderRow()
Gets the last number of the rows that contain headers.

Returns:
a rownumber

getDimension

public Dimension getDimension()
Gets the dimension of this table

Returns:
dimension

getElement

public Object getElement(int row,
                         int column)
returns the element at the position row, column (Cast to Cell or Table)

Parameters:
row -
column -
Returns:
dimension

addColumns

public void addColumns(int aColumns)
Gives you the posibility to add columns.

Parameters:
aColumns - the number of columns to add

getWidths

public float[] getWidths(float left,
                         float totalWidth)
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.

Parameters:
left - this is the position of the first border at the left (cellpadding not included)
totalWidth - this is the space between the first border at the left and the last border at the right (cellpadding not included)
Returns:
an array with borderpositions

isTag

public static boolean isTag(String tag)
Checks if a given tag corresponds with this object.

Parameters:
tag - the given tag
Returns:
true if the tag corresponds

setAlternatingRowAttribute

public void setAlternatingRowAttribute(String name,
                                       String value0,
                                       String value1)
Allows clients to set up alternating attributes for each Row in the Table.

This code was contributed by Matt Benson.

Parameters:
name - the name of the attribute
value0 - the value of the attribute for even rows
value1 - the value of the attribute for odd rows

top

public float top()
This method throws an UnsupportedOperationException.

Overrides:
top in class Rectangle
Returns:
NA

bottom

public float bottom()
This method throws an UnsupportedOperationException.

Overrides:
bottom in class Rectangle
Returns:
NA

left

public float left()
This method throws an UnsupportedOperationException.

Overrides:
left in class Rectangle
Returns:
NA

right

public float right()
This method throws an UnsupportedOperationException.

Overrides:
right in class Rectangle
Returns:
NA

top

public float top(int margin)
This method throws an UnsupportedOperationException.

Parameters:
margin - NA
Returns:
NA

bottom

public float bottom(int margin)
This method throws an UnsupportedOperationException.

Parameters:
margin - NA
Returns:
NA

left

public float left(int margin)
This method throws an UnsupportedOperationException.

Parameters:
margin - NA
Returns:
NA

right

public float right(int margin)
This method throws an UnsupportedOperationException.

Parameters:
margin - NA
Returns:
NA

setTop

public void setTop(int value)
This method throws an UnsupportedOperationException.

Parameters:
value - NA

setBottom

public void setBottom(int value)
This method throws an UnsupportedOperationException.

Parameters:
value - NA

setLeft

public void setLeft(int value)
This method throws an UnsupportedOperationException.

Parameters:
value - NA

setRight

public void setRight(int value)
This method throws an UnsupportedOperationException.

Parameters:
value - NA

getNextRow

public int getNextRow()
Returns the next row 0-based index where a new cell would be added. (contributed by dperezcar@fcc.es)

Returns:
x coordinate for the next row

getNextColumn

public int getNextColumn()
Returns the next column 0-based index where a new cell would be added. (contributed by dperezcar@fcc.es)

Returns:
y coordinate for the next row

createPdfPTable

public PdfPTable createPdfPTable()
                          throws BadElementException
Create a PdfPTable based on this Table object.

Returns:
a PdfPTable object
Throws:
BadElementException

isConvert2pdfptable

public boolean isConvert2pdfptable()
Method to check if the Table should be converted to a PdfPTable or not.

Returns:
false if the table should be handled the oldfashioned way.

setConvert2pdfptable

public void setConvert2pdfptable(boolean convert2pdfptable)
If set to true, iText will try to convert the Table to a PdfPTable.

Parameters:
convert2pdfptable - true if you want iText to try to convert the Table to a PdfPTable


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.