com.lowagie.text.rtf

Class RtfRow

public class RtfRow extends Object

Deprecated: Please move to the RtfWriter2 and associated classes.

A Helper Class for the RtfWriter.

Do not use it directly ONLY FOR USE WITH THE RtfWriter NOT with the RtfWriter2. Parts of this Class were contributed by Steffen Stundzig. Many thanks for the improvements. Code added by c

Field Summary
ColorborderColor
The border color of this RtfRow
intborders
The borders of this RtfRow
floatborderWidth
The border width of this RtfRow
intcellpadding
The default cellpadding of RtfCells in this RtfRow
ArrayListcells
List of RtfCells in this RtfRow
intcellspacing
The default cellspacing of RtfCells in this RtfRow
static byte[]graphLeft
RtfTablemainTable
The RtfTable to which this RtfRow belongs
RoworigRow
Original Row
static byte[]rowAlignCenter
Table alignment center
static byte[]rowAlignLeft
Table alignment left
static byte[]rowAlignRight
Table alignment right
static byte[]rowAutofit
Table row autofit
static byte[]rowBegin
Table row defaults
static byte[]rowBorderBottom
Row border bottom
static byte[]rowBorderInlineHorizontal
Row border horiz inline
static byte[]rowBorderInlineVertical
Row border bottom
static byte[]rowBorderLeft
Row border left
static byte[]rowBorderRight
Row border right
static byte[]rowBorderTop
Row border top
static byte[]rowEnd
End of table row
static byte[]rowHeader
Table row header.
static byte[]rowKeep
Table row keep together.
static byte[]rowPaddingLeft
Default cell padding left
static byte[]rowPaddingLeftStyle
Default cell padding format left
static byte[]rowPaddingRight
Default cell padding right
static byte[]rowPaddingRightStyle
Default cell padding format right
static byte[]rowSpacingBottom
Default cell spacing bottom
static byte[]rowSpacingBottomStyle
Default cell spacing format bottom
static byte[]rowSpacingLeft
Default cell spacing left
static byte[]rowSpacingLeftStyle
Default cell spacing format left
static byte[]rowSpacingRight
Default cell spacing right
static byte[]rowSpacingRightStyle
Default cell spacing format right
static byte[]rowSpacingTop
Default cell spacing top
static byte[]rowSpacingTopStyle
Default cell spacing format top
static byte[]rowWidth
Row width
static byte[]rowWidthStyle
Row width format
static byte[]tableBorder
Table border solid
static byte[]tableBorderColor
Table border color
static byte[]tableBorderWidth
Table border width
intwidth
The width of this RtfRow (in percent)
RtfWriterwriter
The RtfWriter to which this RtfRow belongs
Constructor Summary
RtfRow(RtfWriter writer, RtfTable mainTable)
Create a new RtfRow.
Method Summary
booleanimportRow(Row row, float[] propWidths, int tableWidth, int pageWidth, int cellpadding, int cellspacing, int borders, Color borderColor, float borderWidth, int y)
Import a Row.
voidpregenerateRows(int columns)
Pregenerate the RtfCells in this RtfRow.
voidsetMerge(int x, int mergeType, RtfCell mergeCell)
RtfTables call this method from their own setMerge() to specify that a certain other cell is to be merged with it.
voidwriteBorder(ByteArrayOutputStream os, byte[] borderType)
voidwriteInt(ByteArrayOutputStream out, int i)
booleanwriteRow(ByteArrayOutputStream os, int rowNum, Table table)
Write the RtfRow to the specified OutputStream.

Field Detail

borderColor

private Color borderColor
The border color of this RtfRow

borders

private int borders
The borders of this RtfRow

borderWidth

private float borderWidth
The border width of this RtfRow

cellpadding

private int cellpadding
The default cellpadding of RtfCells in this RtfRow

cells

private ArrayList cells
List of RtfCells in this RtfRow

cellspacing

private int cellspacing
The default cellspacing of RtfCells in this RtfRow

graphLeft

private static final byte[] graphLeft

mainTable

private RtfTable mainTable
The RtfTable to which this RtfRow belongs

origRow

private Row origRow
Original Row

rowAlignCenter

private static final byte[] rowAlignCenter
Table alignment center

rowAlignLeft

private static final byte[] rowAlignLeft
Table alignment left

rowAlignRight

private static final byte[] rowAlignRight
Table alignment right

rowAutofit

private static final byte[] rowAutofit
Table row autofit

rowBegin

private static final byte[] rowBegin
Table row defaults

rowBorderBottom

private static final byte[] rowBorderBottom
Row border bottom

rowBorderInlineHorizontal

private static final byte[] rowBorderInlineHorizontal
Row border horiz inline

rowBorderInlineVertical

private static final byte[] rowBorderInlineVertical
Row border bottom

rowBorderLeft

private static final byte[] rowBorderLeft
Row border left

rowBorderRight

private static final byte[] rowBorderRight
Row border right

rowBorderTop

private static final byte[] rowBorderTop
Row border top

rowEnd

private static final byte[] rowEnd
End of table row

rowHeader

private static final byte[] rowHeader
Table row header. This row should appear at the top of every page the current table appears on.

rowKeep

private static final byte[] rowKeep
Table row keep together. This row cannot be split by a page break. This property is assumed to be off unless the control word is present.

rowPaddingLeft

private static final byte[] rowPaddingLeft
Default cell padding left

rowPaddingLeftStyle

private static final byte[] rowPaddingLeftStyle
Default cell padding format left

rowPaddingRight

private static final byte[] rowPaddingRight
Default cell padding right

rowPaddingRightStyle

private static final byte[] rowPaddingRightStyle
Default cell padding format right

rowSpacingBottom

private static final byte[] rowSpacingBottom
Default cell spacing bottom

rowSpacingBottomStyle

private static final byte[] rowSpacingBottomStyle
Default cell spacing format bottom

rowSpacingLeft

private static final byte[] rowSpacingLeft
Default cell spacing left

rowSpacingLeftStyle

private static final byte[] rowSpacingLeftStyle
Default cell spacing format left

rowSpacingRight

private static final byte[] rowSpacingRight
Default cell spacing right

rowSpacingRightStyle

private static final byte[] rowSpacingRightStyle
Default cell spacing format right

rowSpacingTop

private static final byte[] rowSpacingTop
Default cell spacing top

rowSpacingTopStyle

private static final byte[] rowSpacingTopStyle
Default cell spacing format top

rowWidth

private static final byte[] rowWidth
Row width

rowWidthStyle

private static final byte[] rowWidthStyle
Row width format

tableBorder

public static final byte[] tableBorder
Table border solid

tableBorderColor

public static final byte[] tableBorderColor
Table border color

tableBorderWidth

public static final byte[] tableBorderWidth
Table border width

width

private int width
The width of this RtfRow (in percent)

writer

private RtfWriter writer
The RtfWriter to which this RtfRow belongs

Constructor Detail

RtfRow

public RtfRow(RtfWriter writer, RtfTable mainTable)
Create a new RtfRow.

Parameters: writer The RtfWriter that this RtfRow belongs to mainTable The RtfTable that created this RtfRow

Method Detail

importRow

public boolean importRow(Row row, float[] propWidths, int tableWidth, int pageWidth, int cellpadding, int cellspacing, int borders, Color borderColor, float borderWidth, int y)
Import a Row.

All the parameters are taken from the RtfTable which contains this RtfRow and they do exactely what they say

Parameters: row propWidths in percent tableWidth in percent pageWidth cellpadding cellspacing borders borderColor borderWidth y

Returns: true if importing the row succeeded

pregenerateRows

public void pregenerateRows(int columns)
Pregenerate the RtfCells in this RtfRow.

Parameters: columns The number of RtfCells to be generated.

setMerge

public void setMerge(int x, int mergeType, RtfCell mergeCell)
RtfTables call this method from their own setMerge() to specify that a certain other cell is to be merged with it.

Parameters: x The column position of the cell to be merged mergeType The merge type specifies the kind of merge to be applied (MERGE_HORIZ_PREV, MERGE_VERT_PREV, MERGE_BOTH_PREV) mergeCell The RtfCell that the cell at x and y is to be merged with

writeBorder

private void writeBorder(ByteArrayOutputStream os, byte[] borderType)

writeInt

private void writeInt(ByteArrayOutputStream out, int i)

writeRow

public boolean writeRow(ByteArrayOutputStream os, int rowNum, Table table)
Write the RtfRow to the specified OutputStream.

Parameters: os The OutputStream to which this RtfRow should be written to. rowNum The index of this row in the containing table. table The Table which contains the original Row.

Returns: true if writing the row succeeded

Throws: DocumentException IOException