com.lowagie.text.rtf.table

Class RtfTable

public class RtfTable extends RtfElement

The RtfTable wraps a Table. INTERNAL USE ONLY

Version: $Id: RtfTable.java 2776 2007-05-23 20:01:40Z hallm $

Author: Mark Hall (mhall@edu.uni-klu.ac.at) Steffen Stundzig Benoit Wiart Thomas Bickel (tmb99@inode.at)

Field Summary
intalignment
The alignment of this RtfTable
RtfBorderGroupborders
The border style of this RtfTable
floatcellPadding
The cell padding
booleancellsFitToPage
Whether the cells in this RtfTable must fit in a page
floatcellSpacing
The cell spacing
intheaderRows
The number of header rows in this RtfTable
float[]proportionalWidths
An array with the proportional widths of the cells in each row
ArrayListrows
The rows of this RtfTable
booleantableFitToPage
Whether the whole RtfTable must fit in a page
floattableWidthPercent
The percentage of the page width that this RtfTable covers
Constructor Summary
RtfTable(RtfDocument doc, Table table)
Constructs a RtfTable based on a Table for a RtfDocument.
Method Summary
protected intgetAlignment()
Gets the alignment of this RtfTable
protected RtfBorderGroupgetBorders()
Gets the borders of this RtfTable
protected floatgetCellPadding()
Gets the cell padding of this RtfTable
protected booleangetCellsFitToPage()
Gets the cellsFitToPage setting of this RtfTable.
protected floatgetCellSpacing()
Gets the cell spacing of this RtfTable
protected intgetHeaderRows()
Gets the number of header rows of this RtfTable
protected float[]getProportionalWidths()
Gets the proportional cell widths of this RtfTable
protected ArrayListgetRows()
Gets the rows of this RtfTable
protected booleangetTableFitToPage()
Gets the tableFitToPage setting of this RtfTable.
protected floatgetTableWidthPercent()
Gets the percentage of the page width this RtfTable covers
voidimportTable(Table table)
Imports the rows and settings from the Table into this RtfTable.
byte[]write()
Writes the content of this RtfTable
voidwriteContent(OutputStream result)
Writes the content of this RtfTable

Field Detail

alignment

private int alignment
The alignment of this RtfTable

borders

private RtfBorderGroup borders
The border style of this RtfTable

cellPadding

private float cellPadding
The cell padding

cellsFitToPage

private boolean cellsFitToPage
Whether the cells in this RtfTable must fit in a page

cellSpacing

private float cellSpacing
The cell spacing

headerRows

private int headerRows
The number of header rows in this RtfTable

proportionalWidths

private float[] proportionalWidths
An array with the proportional widths of the cells in each row

rows

private ArrayList rows
The rows of this RtfTable

tableFitToPage

private boolean tableFitToPage
Whether the whole RtfTable must fit in a page

tableWidthPercent

private float tableWidthPercent
The percentage of the page width that this RtfTable covers

Constructor Detail

RtfTable

public RtfTable(RtfDocument doc, Table table)
Constructs a RtfTable based on a Table for a RtfDocument.

Parameters: doc The RtfDocument this RtfTable belongs to table The Table that this RtfTable wraps

Method Detail

getAlignment

protected int getAlignment()
Gets the alignment of this RtfTable

Returns: The alignment of this RtfTable.

getBorders

protected RtfBorderGroup getBorders()
Gets the borders of this RtfTable

Returns: The borders of this RtfTable.

getCellPadding

protected float getCellPadding()
Gets the cell padding of this RtfTable

Returns: The cell padding of this RtfTable.

getCellsFitToPage

protected boolean getCellsFitToPage()
Gets the cellsFitToPage setting of this RtfTable.

Returns: The cellsFitToPage setting of this RtfTable.

getCellSpacing

protected float getCellSpacing()
Gets the cell spacing of this RtfTable

Returns: The cell spacing of this RtfTable.

getHeaderRows

protected int getHeaderRows()
Gets the number of header rows of this RtfTable

Returns: The number of header rows

getProportionalWidths

protected float[] getProportionalWidths()
Gets the proportional cell widths of this RtfTable

Returns: The proportional widths of this RtfTable.

getRows

protected ArrayList getRows()
Gets the rows of this RtfTable

Returns: The rows of this RtfTable

getTableFitToPage

protected boolean getTableFitToPage()
Gets the tableFitToPage setting of this RtfTable.

Returns: The tableFitToPage setting of this RtfTable.

getTableWidthPercent

protected float getTableWidthPercent()
Gets the percentage of the page width this RtfTable covers

Returns: The percentage of the page width.

importTable

private void importTable(Table table)
Imports the rows and settings from the Table into this RtfTable.

Parameters: table The source Table

write

public byte[] write()

Deprecated: replaced by writeContent

Writes the content of this RtfTable

Returns: A byte array with the content of this RtfTable

writeContent

public void writeContent(OutputStream result)
Writes the content of this RtfTable