Table of Contents

Class RtfListItem

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

The RtfListItem acts as a wrapper for a ListItem. @author Mark Hall (Mark.Hall@mail.room3b.eu)

public class RtfListItem : RtfParagraph, IRtfBasicElement, IRtfElementInterface
Inheritance
RtfListItem
Implements
Inherited Members

Constructors

RtfListItem(RtfDocument, ListItem)

Constructs a RtfListItem for a ListItem belonging to a RtfDocument.

public RtfListItem(RtfDocument doc, ListItem listItem)

Parameters

doc RtfDocument

The RtfDocument this RtfListItem belongs to.

listItem ListItem

The ListItem this RtfListItem is based on.

Methods

CorrectIndentation()

Correct the indentation of RtfLists in this RtfListItem by adding left/first line indentation from the parent RtfList. Also calls correctIndentation on all child RtfLists.

protected void CorrectIndentation()

GetLevel()

@since 2.1.3

public int GetLevel()

Returns

int

the level

GetParent()

Set the parent RtfList. @since 2.1.3

public RtfListLevel GetParent()

Returns

RtfListLevel

The parent RtfList to use.

InheritListSettings(int, int)

Inherit the list settings from the parent list to RtfLists that are contained in this RtfListItem.

public void InheritListSettings(int listNumber, int listLevel)

Parameters

listNumber int

The list number to inherit.

listLevel int

The list level to inherit.

IsContainsInnerList()

Gets whether this RtfListItem contains further RtfLists.

public bool IsContainsInnerList()

Returns

bool

Whether this RtfListItem contains further RtfLists.

SetLevel(int)

@since 2.1.3

public void SetLevel(int level)

Parameters

level int

the level to set

SetParent(RtfListLevel)

Set the parent RtfList.

public void SetParent(RtfListLevel parentList)

Parameters

parentList RtfListLevel

The parent RtfList to use.

WriteContent(Stream)

Writes the content of this RtfListItem.

public override void WriteContent(Stream outp)

Parameters

outp Stream

WriteDefinition(Stream)

Writes the definition of the first element in this RtfListItem that is an is {@link RtfList} to the given stream. If this item does not contain a {@link RtfList} element nothing is written and the method returns false . @throws IOException @see {@link RtfList#writeDefinition(Stream)}

public bool WriteDefinition(Stream outp)

Parameters

outp Stream

destination stream

Returns

bool

true if a RtfList definition was written, false otherwise