Table of Contents

Class RtfCell

Namespace
iTextSharp.text.rtf.table
Assembly
iTextSharp.LGPLv2.Core.dll

The RtfCell wraps a Cell, but can also be added directly to a Table. The RtfCell is an extension of Cell, that supports a multitude of different borderstyles. @version $Id: RtfCell.cs,v 1.14 2008/05/16 19:31:18 psoares33 Exp $ @author Mark Hall (Mark.Hall@mail.room3b.eu) @author Steffen Stundzig @author Benoit WIART @see com.lowagie.text.rtf.table.RtfBorder

public class RtfCell : Cell, ITextElementArray, IElement, IRtfExtendedElement, IRtfBasicElement, IRtfElementInterface
Inheritance
RtfCell
Implements
Inherited Members

Constructors

RtfCell()

Constructs an empty RtfCell

public RtfCell()

RtfCell(bool)

Constructs a deleted RtfCell.

protected RtfCell(bool deleted)

Parameters

deleted bool

Whether this RtfCell is actually deleted.

RtfCell(string)

Constructs a RtfCell based upon a String

public RtfCell(string content)

Parameters

content string

The String to base the RtfCell on

RtfCell(IElement)

Constructs a RtfCell based upon an Element @throws BadElementException If the Element is not valid

public RtfCell(IElement element)

Parameters

element IElement

The Element to base the RtfCell on

RtfCell(RtfDocument, RtfRow, Cell)

Constructs a RtfCell based on a Cell.

protected RtfCell(RtfDocument doc, RtfRow row, Cell cell)

Parameters

doc RtfDocument

The RtfDocument this RtfCell belongs to

row RtfRow

The RtfRow this RtfCell lies in

cell Cell

The Cell to base this RtfCell on

RtfCell(RtfDocument, RtfRow, PdfPCell)

Constructs a RtfCell based on a Cell. @since 2.1.3

protected RtfCell(RtfDocument doc, RtfRow row, PdfPCell cell)

Parameters

doc RtfDocument

The RtfDocument this RtfCell belongs to

row RtfRow

The RtfRow this RtfCell lies in

cell PdfPCell

The PdfPCell to base this RtfCell on

Methods

GetBorders()

Gets the borders of this RtfCell

protected RtfBorderGroup GetBorders()

Returns

RtfBorderGroup

The borders of this RtfCell

GetCellRight()

Gets the right margin of this RtfCell

protected int GetCellRight()

Returns

int

The right margin of this RtfCell.

GetCellWidth()

Gets the cell width of this RtfCell

protected int GetCellWidth()

Returns

int

The cell width of this RtfCell

GetCellpadding()

Gets the cell padding of this RtfCell

protected int GetCellpadding()

Returns

int

The cell padding of this RtfCell

GetRtfBackgroundColor()

Get the background color of this RtfCell

protected RtfColor GetRtfBackgroundColor()

Returns

RtfColor

The background color of this RtfCell

IsDeleted()

Checks whether this RtfCell is a placeholder for a table cell that has been removed due to col/row spanning.

public bool IsDeleted()

Returns

bool

True if this RtfCell is deleted, false otherwise.

IsInHeader()

Gets whether this RtfCell is in a header

public bool IsInHeader()

Returns

bool

True if this RtfCell is in a header, false otherwise

SetBorders(RtfBorderGroup)

Set the borders of this RtfCell

public void SetBorders(RtfBorderGroup borderGroup)

Parameters

borderGroup RtfBorderGroup

The RtfBorderGroup to use as borders

SetCellMergeChild(RtfCell)

Merge this cell into the parent cell.

protected void SetCellMergeChild(RtfCell mergeParent)

Parameters

mergeParent RtfCell

The RtfCell to merge with

SetCellRight(int)

Sets the right margin of this cell. Used in merge operations

protected void SetCellRight(int cellRight)

Parameters

cellRight int

The right margin to use

SetCellWidth(int)

Sets the cell width of this RtfCell. Used in merge operations.

protected void SetCellWidth(int cellWidth)

Parameters

cellWidth int

The cell width to use

SetInHeader(bool)

Sets whether this RtfCell is in a header

public void SetInHeader(bool inHeader)

Parameters

inHeader bool

True if this RtfCell is in a header, false otherwise

SetInTable(bool)

Unused

public void SetInTable(bool inTable)

Parameters

inTable bool

SetRtfDocument(RtfDocument)

Sets the RtfDocument this RtfCell belongs to

public void SetRtfDocument(RtfDocument doc)

Parameters

doc RtfDocument

The RtfDocument to use

WriteContent(Stream)

Write the content of this RtfCell

public virtual void WriteContent(Stream outp)

Parameters

outp Stream

WriteDefinition(Stream)

Write the cell definition part of this RtfCell

public virtual void WriteDefinition(Stream outp)

Parameters

outp Stream