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
RtfDocumentThe RtfDocument this RtfListItem belongs to.
listItem
ListItemThe 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
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
intthe level to set
SetParent(RtfListLevel)
Set the parent RtfList.
public void SetParent(RtfListLevel parentList)
Parameters
parentList
RtfListLevelThe 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
Streamdestination stream
Returns
- bool
true if a RtfList definition was written, false otherwise