com.lowagie.text

Class SimpleTable

public class SimpleTable extends Rectangle implements PdfPTableEvent, TextElementArray

Rectangle that can be used for Cells. This Rectangle is padded and knows how to draw itself in a PdfPTable or PdfPcellEvent.
Field Summary
intalignment
the alignment of the table.
floatcellpadding
the padding of the Cells.
floatcellspacing
the spacing of the Cells.
ArrayListcontent
the content of a Table.
floatwidth
the width of the Table.
floatwidthpercentage
the widthpercentage of the Table.
Constructor Summary
SimpleTable()
A RectangleCell is always constructed without any dimensions.
Method Summary
booleanadd(Object o)
voidaddElement(SimpleCell element)
Adds content to this object.
PdfPTablecreatePdfPTable()
Creates a PdfPTable object based on this TableAttributes object.
TablecreateTable()
Creates a Table object based on this TableAttributes object.
intgetAlignment()
floatgetCellpadding()
floatgetCellspacing()
static SimpleTablegetDimensionlessInstance(Rectangle rectangle, float spacing)
floatgetWidth()
floatgetWidthpercentage()
booleanisNestable()
voidsetAlignment(int alignment)
voidsetCellpadding(float cellpadding)
voidsetCellspacing(float cellspacing)
voidsetWidth(float width)
voidsetWidthpercentage(float widthpercentage)
voidtableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases)
inttype()

Field Detail

alignment

private int alignment
the alignment of the table.

cellpadding

private float cellpadding
the padding of the Cells.

cellspacing

private float cellspacing
the spacing of the Cells.

content

private ArrayList content
the content of a Table.

width

private float width
the width of the Table.

widthpercentage

private float widthpercentage
the widthpercentage of the Table.

Constructor Detail

SimpleTable

public SimpleTable()
A RectangleCell is always constructed without any dimensions. Dimensions are defined after creation.

Method Detail

add

public boolean add(Object o)

See Also: TextElementArray

addElement

public void addElement(SimpleCell element)
Adds content to this object.

Parameters: element

Throws: BadElementException

createPdfPTable

public PdfPTable createPdfPTable()
Creates a PdfPTable object based on this TableAttributes object.

Returns: a com.lowagie.text.pdf.PdfPTable object

Throws: DocumentException

createTable

public Table createTable()
Creates a Table object based on this TableAttributes object.

Returns: a com.lowagie.text.Table object

Throws: BadElementException

getAlignment

public int getAlignment()

Returns: Returns the alignment.

getCellpadding

public float getCellpadding()

Returns: Returns the cellpadding.

getCellspacing

public float getCellspacing()

Returns: Returns the cellspacing.

getDimensionlessInstance

public static SimpleTable getDimensionlessInstance(Rectangle rectangle, float spacing)

Parameters: rectangle spacing

Returns: a rectangle

getWidth

public float getWidth()

Returns: Returns the width.

getWidthpercentage

public float getWidthpercentage()

Returns: Returns the widthpercentage.

isNestable

public boolean isNestable()

Since: iText 2.0.8

See Also: isNestable

setAlignment

public void setAlignment(int alignment)

Parameters: alignment The alignment to set.

setCellpadding

public void setCellpadding(float cellpadding)

Parameters: cellpadding The cellpadding to set.

setCellspacing

public void setCellspacing(float cellspacing)

Parameters: cellspacing The cellspacing to set.

setWidth

public void setWidth(float width)

Parameters: width The width to set.

setWidthpercentage

public void setWidthpercentage(float widthpercentage)

Parameters: widthpercentage The widthpercentage to set.

tableLayout

public void tableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases)

See Also: (com.lowagie.text.pdf.PdfPTable, float[][], float[], int, int, com.lowagie.text.pdf.PdfContentByte[])

type

public int type()

See Also: type