com.lowagie.text.rtf.table
Class RtfTable

java.lang.Object
  extended bycom.lowagie.text.rtf.RtfElement
      extended bycom.lowagie.text.rtf.table.RtfTable
All Implemented Interfaces:
RtfBasicElement

public class RtfTable
extends RtfElement

The RtfTable wraps a Table. INTERNAL USE ONLY

Version:
$Version:$
Author:
Mark Hall (mhall@edu.uni-klu.ac.at), Steffen Stundzig, Benoit WIART

Field Summary
private  int alignment
          The alignment of this RtfTable
private  RtfBorderGroup borders
          The border style of this RtfTable
private  float cellPadding
          The cell padding
private  boolean cellsFitToPage
          Whether the cells in this RtfTable must fit in a page
private  float cellSpacing
          The cell spacing
private  int headerRows
          The number of header rows in this RtfTable
private  float[] proportionalWidths
          An array with the proportional widths of the cells in each row
private  ArrayList rows
          The rows of this RtfTable
private  boolean tableFitToPage
          Whether the whole RtfTable must fit in a page
private  float tableWidthPercent
          The percentage of the page width that this RtfTable covers
 
Fields inherited from class com.lowagie.text.rtf.RtfElement
document, inHeader, inTable
 
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
 
Constructor Summary
RtfTable(RtfDocument doc, Table table)
          Constructs a RtfTable based on a Table for a RtfDocument.
 
Method Summary
protected  int getAlignment()
          Gets the alignment of this RtfTable
protected  RtfBorderGroup getBorders()
          Gets the borders of this RtfTable
protected  float getCellPadding()
          Gets the cell padding of this RtfTable
protected  boolean getCellsFitToPage()
          Gets the cellsFitToPage setting of this RtfTable.
protected  float getCellSpacing()
          Gets the cell spacing of this RtfTable
protected  int getHeaderRows()
          Gets the number of header rows of this RtfTable
protected  float[] getProportionalWidths()
          Gets the proportional cell widths of this RtfTable
protected  ArrayList getRows()
          Gets the rows of this RtfTable
protected  boolean getTableFitToPage()
          Gets the tableFitToPage setting of this RtfTable.
protected  float getTableWidthPercent()
          Gets the percentage of the page width this RtfTable covers
private  void importTable(Table table)
          Imports the rows and settings from the Table into this RtfTable.
 byte[] write()
          Writes the content of this RtfTable
 
Methods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rows

private ArrayList rows
The rows of this RtfTable


tableWidthPercent

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


proportionalWidths

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


cellPadding

private float cellPadding
The cell padding


cellSpacing

private float cellSpacing
The cell spacing


borders

private RtfBorderGroup borders
The border style of this RtfTable


alignment

private int alignment
The alignment of this RtfTable


cellsFitToPage

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


tableFitToPage

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


headerRows

private int headerRows
The number of header rows in this RtfTable

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

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()
Writes the content of this RtfTable

Specified by:
write in interface RtfBasicElement
Overrides:
write in class RtfElement
Returns:
A byte array with the content of this RtfTable

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.

getCellSpacing

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

Returns:
The cell spacing of this RtfTable.

getProportionalWidths

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

Returns:
The proportional widths of this RtfTable.

getTableWidthPercent

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

Returns:
The percentage of the page width.

getRows

protected ArrayList getRows()
Gets the rows of this RtfTable

Returns:
The rows of this RtfTable

getCellsFitToPage

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

Returns:
The cellsFitToPage setting of this RtfTable.

getTableFitToPage

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

Returns:
The tableFitToPage setting of this RtfTable.

getHeaderRows

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

Returns:
The number of header rows