com.lowagie.text.rtf.table

Class RtfRow

public class RtfRow extends RtfElement

The RtfRow wraps one Row for a RtfTable. INTERNAL USE ONLY

Version: $Id: RtfRow.java 3735 2009-02-26 01:44:03Z xlv $

Author: Mark Hall (Mark.Hall@mail.room3b.eu) Steffen Stundzig Lorenz Maierhofer Thomas Bickel (tmb99@inode.at)

Field Summary
ArrayListcells
The cells of this RtfRow
RtfTableparentTable
The RtfTable this RtfRow belongs to
introwNumber
The row number
static byte[]ROW_ALIGN_CENTER
Constant for center alignment of this RtfRow
static byte[]ROW_ALIGN_JUSTIFIED
Constant for justified alignment of this RtfRow
static byte[]ROW_ALIGN_LEFT
Constant for left alignment of this RtfRow
static byte[]ROW_ALIGN_RIGHT
Constant for right alignment of this RtfRow
static byte[]ROW_BEGIN
Constant for the RtfRow beginning
static byte[]ROW_CELL_PADDING_LEFT
Constant for the cell left padding
static byte[]ROW_CELL_PADDING_LEFT_STYLE
Constant for the cell left padding style
static byte[]ROW_CELL_PADDING_RIGHT
Constant for the cell right padding
static byte[]ROW_CELL_PADDING_RIGHT_STYLE
Constant for the cell right padding style
static byte[]ROW_CELL_SPACING_BOTTOM
Constant for the cell bottom spacing
static byte[]ROW_CELL_SPACING_BOTTOM_STYLE
Constant for the cell bottom spacing style
static byte[]ROW_CELL_SPACING_LEFT
Constant for the cell left spacing
static byte[]ROW_CELL_SPACING_LEFT_STYLE
Constant for the cell left spacing style
static byte[]ROW_CELL_SPACING_RIGHT
Constant for the cell right spacing
static byte[]ROW_CELL_SPACING_RIGHT_STYLE
Constant for the cell right spacing style
static byte[]ROW_CELL_SPACING_TOP
Constant for the cell top spacing
static byte[]ROW_CELL_SPACING_TOP_STYLE
Constant for the cell top spacing style
static byte[]ROW_END
Constant for the end of a row
static byte[]ROW_GRAPH
Constant for the graph style of this RtfRow
static byte[]ROW_HEADER_ROW
Constant to specify that this is a header RtfRow
static byte[]ROW_KEEP_TOGETHER
Constant to specify that this RtfRow are not to be broken across pages
static byte[]ROW_WIDTH
Constant for the RtfRow width
static byte[]ROW_WIDTH_STYLE
Constant for the RtfRow width style
intwidth
The width of this row
Constructor Summary
protected RtfRow(RtfDocument doc, RtfTable rtfTable, Row row, int rowNumber)
Constructs a RtfRow for a Row.
protected RtfRow(RtfDocument doc, RtfTable rtfTable, PdfPRow row, int rowNumber)
Constructs a RtfRow for a Row.
Method Summary
protected voidcleanRow()
Cleans the deleted RtfCells from the total RtfCells.
protected ArrayListgetCells()
Gets the cells of this RtfRow
protected RtfTablegetParentTable()
Gets the parent RtfTable of this RtfRow
protected voidhandleCellSpanning()
Performs a second pass over all cells to handle cell row/column spanning.
voidimportRow(Row row)
Imports a Row and copies all settings
voidimportRow(PdfPRow row)
Imports a PdfPRow and copies all settings
voidwriteContent(OutputStream result)
Writes the content of this RtfRow
voidwriteRowDefinition(OutputStream result)
Writes the row definition/settings.

Field Detail

cells

private ArrayList cells
The cells of this RtfRow

parentTable

private RtfTable parentTable
The RtfTable this RtfRow belongs to

rowNumber

private int rowNumber
The row number

ROW_ALIGN_CENTER

private static final byte[] ROW_ALIGN_CENTER
Constant for center alignment of this RtfRow

ROW_ALIGN_JUSTIFIED

private static final byte[] ROW_ALIGN_JUSTIFIED
Constant for justified alignment of this RtfRow

ROW_ALIGN_LEFT

private static final byte[] ROW_ALIGN_LEFT
Constant for left alignment of this RtfRow

ROW_ALIGN_RIGHT

private static final byte[] ROW_ALIGN_RIGHT
Constant for right alignment of this RtfRow

ROW_BEGIN

private static final byte[] ROW_BEGIN
Constant for the RtfRow beginning

ROW_CELL_PADDING_LEFT

private static final byte[] ROW_CELL_PADDING_LEFT
Constant for the cell left padding

ROW_CELL_PADDING_LEFT_STYLE

private static final byte[] ROW_CELL_PADDING_LEFT_STYLE
Constant for the cell left padding style

ROW_CELL_PADDING_RIGHT

private static final byte[] ROW_CELL_PADDING_RIGHT
Constant for the cell right padding

ROW_CELL_PADDING_RIGHT_STYLE

private static final byte[] ROW_CELL_PADDING_RIGHT_STYLE
Constant for the cell right padding style

ROW_CELL_SPACING_BOTTOM

private static final byte[] ROW_CELL_SPACING_BOTTOM
Constant for the cell bottom spacing

ROW_CELL_SPACING_BOTTOM_STYLE

private static final byte[] ROW_CELL_SPACING_BOTTOM_STYLE
Constant for the cell bottom spacing style

ROW_CELL_SPACING_LEFT

private static final byte[] ROW_CELL_SPACING_LEFT
Constant for the cell left spacing

ROW_CELL_SPACING_LEFT_STYLE

private static final byte[] ROW_CELL_SPACING_LEFT_STYLE
Constant for the cell left spacing style

ROW_CELL_SPACING_RIGHT

private static final byte[] ROW_CELL_SPACING_RIGHT
Constant for the cell right spacing

ROW_CELL_SPACING_RIGHT_STYLE

private static final byte[] ROW_CELL_SPACING_RIGHT_STYLE
Constant for the cell right spacing style

ROW_CELL_SPACING_TOP

private static final byte[] ROW_CELL_SPACING_TOP
Constant for the cell top spacing

ROW_CELL_SPACING_TOP_STYLE

private static final byte[] ROW_CELL_SPACING_TOP_STYLE
Constant for the cell top spacing style

ROW_END

private static final byte[] ROW_END
Constant for the end of a row

ROW_GRAPH

private static final byte[] ROW_GRAPH
Constant for the graph style of this RtfRow

ROW_HEADER_ROW

private static final byte[] ROW_HEADER_ROW
Constant to specify that this is a header RtfRow

ROW_KEEP_TOGETHER

private static final byte[] ROW_KEEP_TOGETHER
Constant to specify that this RtfRow are not to be broken across pages

ROW_WIDTH

private static final byte[] ROW_WIDTH
Constant for the RtfRow width

ROW_WIDTH_STYLE

private static final byte[] ROW_WIDTH_STYLE
Constant for the RtfRow width style

width

private int width
The width of this row

Constructor Detail

RtfRow

protected RtfRow(RtfDocument doc, RtfTable rtfTable, Row row, int rowNumber)
Constructs a RtfRow for a Row.

Parameters: doc The RtfDocument this RtfRow belongs to rtfTable The RtfTable this RtfRow belongs to row The Row this RtfRow is based on rowNumber The number of this row

RtfRow

protected RtfRow(RtfDocument doc, RtfTable rtfTable, PdfPRow row, int rowNumber)
Constructs a RtfRow for a Row.

Parameters: doc The RtfDocument this RtfRow belongs to rtfTable The RtfTable this RtfRow belongs to row The Row this RtfRow is based on rowNumber The number of this row

Since: 2.1.3

Method Detail

cleanRow

protected void cleanRow()
Cleans the deleted RtfCells from the total RtfCells.

getCells

protected ArrayList getCells()
Gets the cells of this RtfRow

Returns: The cells of this RtfRow

getParentTable

protected RtfTable getParentTable()
Gets the parent RtfTable of this RtfRow

Returns: The parent RtfTable of this RtfRow

handleCellSpanning

protected void handleCellSpanning()
Performs a second pass over all cells to handle cell row/column spanning.

importRow

private void importRow(Row row)
Imports a Row and copies all settings

Parameters: row The Row to import

importRow

private void importRow(PdfPRow row)
Imports a PdfPRow and copies all settings

Parameters: row The PdfPRow to import

Since: 2.1.3

writeContent

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

writeRowDefinition

private void writeRowDefinition(OutputStream result)
Writes the row definition/settings.

Parameters: result The OutputStream to write the definitions to.