Package com.lowagie.text.rtf.table
Class RtfTable
java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.table.RtfTable
- All Implemented Interfaces:
RtfBasicElement
,com.lowagie.text.RtfElementInterface
The RtfTable wraps a Table.
INTERNAL USE ONLY
- Version:
- $Id: RtfTable.java 3533 2008-07-07 21:27:13Z Howard_s $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
The alignment of this RtfTableprivate RtfBorderGroup
The border style of this RtfTableprivate float
The cell paddingprivate boolean
Whether the cells in this RtfTable must fit in a pageprivate float
The cell spacingprivate int
The number of header rows in this RtfTableprivate int
The offset from the previous textprivate float[]
An array with the proportional widths of the cells in each rowThe rows of this RtfTableprivate boolean
Whether the whole RtfTable must fit in a pageprivate float
The percentage of the page width that this RtfTable coversFields 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
ConstructorsConstructorDescriptionRtfTable
(RtfDocument doc, com.lowagie.text.pdf.PdfPTable table) Constructs a RtfTable based on a PdfTable for a RtfDocument.RtfTable
(RtfDocument doc, com.lowagie.text.Table table) Constructs a RtfTable based on a Table for a RtfDocument. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Gets the alignment of this RtfTableprotected RtfBorderGroup
Gets the borders of this RtfTableprotected float
Gets the cell padding of this RtfTableprotected boolean
Gets the cellsFitToPage setting of this RtfTable.protected float
Gets the cell spacing of this RtfTableprotected int
Gets the number of header rows of this RtfTableprotected float[]
Gets the proportional cell widths of this RtfTablegetRows()
Gets the rows of this RtfTableprotected boolean
Gets the tableFitToPage setting of this RtfTable.protected float
Gets the percentage of the page width this RtfTable coversprivate void
importTable
(com.lowagie.text.pdf.PdfPTable table) Imports the rows and settings from the Table into this RtfTable.private void
importTable
(com.lowagie.text.Table table) Imports the rows and settings from the Table into this RtfTable.void
writeContent
(OutputStream result) Writes the content of this RtfTableMethods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument
-
Field Details
-
rows
The rows of this RtfTable -
tableWidthPercent
private float tableWidthPercentThe percentage of the page width that this RtfTable covers -
proportionalWidths
private float[] proportionalWidthsAn array with the proportional widths of the cells in each row -
cellPadding
private float cellPaddingThe cell padding -
cellSpacing
private float cellSpacingThe cell spacing -
borders
The border style of this RtfTable -
alignment
private int alignmentThe alignment of this RtfTable -
cellsFitToPage
private boolean cellsFitToPageWhether the cells in this RtfTable must fit in a page -
tableFitToPage
private boolean tableFitToPageWhether the whole RtfTable must fit in a page -
headerRows
private int headerRowsThe number of header rows in this RtfTable -
offset
private int offsetThe offset from the previous text
-
-
Constructor Details
-
RtfTable
Constructs a RtfTable based on a Table for a RtfDocument.- Parameters:
doc
- The RtfDocument this RtfTable belongs totable
- The Table that this RtfTable wraps
-
RtfTable
Constructs a RtfTable based on a PdfTable for a RtfDocument.- Parameters:
doc
- The RtfDocument this RtfTable belongs totable
- The PdfPTable that this RtfTable wraps- Since:
- 2.1.3
-
-
Method Details
-
importTable
private void importTable(com.lowagie.text.Table table) Imports the rows and settings from the Table into this RtfTable.- Parameters:
table
- The source Table
-
importTable
private void importTable(com.lowagie.text.pdf.PdfPTable table) Imports the rows and settings from the Table into this RtfTable.- Parameters:
table
- The source PdfPTable- Since:
- 2.1.3
-
writeContent
Writes the content of this RtfTable- Specified by:
writeContent
in interfaceRtfBasicElement
- Specified by:
writeContent
in classRtfElement
- Parameters:
result
- TheOutputStream
to write the content to- Throws:
IOException
-
getAlignment
protected int getAlignment()Gets the alignment of this RtfTable- Returns:
- The alignment of this RtfTable.
-
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
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
-