List
List Public class
Description
A List contains several ListItems.
Diagram
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph iTextSharp.text
iTextSharp.text.List[[List]]
iTextSharp.text.ITextElementArray[[ITextElementArray]]
class iTextSharp.text.ITextElementArray interfaceStyle;
iTextSharp.text.IElement[[IElement]]
class iTextSharp.text.IElement interfaceStyle;
end
subgraph iTextSharp.text.api
iTextSharp.text.api.IIndentable[[IIndentable]]
class iTextSharp.text.api.IIndentable interfaceStyle;
end
subgraph iTextSharp.text.pdf.interfaces
iTextSharp.text.pdf.interfaces.IAccessibleElement[[IAccessibleElement]]
class iTextSharp.text.pdf.interfaces.IAccessibleElement interfaceStyle;
end
iTextSharp.text.ITextElementArray --> iTextSharp.text.List
iTextSharp.text.IElement --> iTextSharp.text.ITextElementArray
iTextSharp.text.api.IIndentable --> iTextSharp.text.List
iTextSharp.text.pdf.interfaces.IAccessibleElement --> iTextSharp.text.List
Members
Properties
Public properties
Type | Name | Methods |
---|---|---|
bool | Alignindent | get, set |
bool | Autoindent | get, set |
IList <Chunk > | Chunks Gets all the chunks in this element. | get |
int | First Get/set the first number | get, set |
AccessibleElementId | ID | get, set |
float | IndentationLeft Get/set the indentation of this paragraph on the left side. | get, set |
float | IndentationRight Get/set the indentation of this paragraph on the right side. | get, set |
bool | IsInline | get |
bool | IsLowercase Alias for VB.NET compatibility. | get, set |
List <IElement > | Items Gets all the items in the list. | get |
bool | Lettered | get, set |
Chunk | ListSymbol Sets the symbol | set |
bool | Lowercase | get, set |
bool | Numbered | get, set |
string | PostSymbol | get, set |
string | PreSymbol | get, set |
PdfName | Role | get, set |
int | Size Gets the size of the list. | get |
Chunk | Symbol Get/set the symbol indentation. | get, set |
float | SymbolIndent Gets the symbol indentation. | get, set |
float | TotalLeading Gets the leading of the first listitem. | get |
int | Type Gets the type of the text element. | get |
Methods
Public methods
Returns | Name |
---|---|
bool | Add (... ) |
List | CloneShallow () |
PdfObject | GetAccessibleAttribute (PdfName key) |
Dictionary <PdfName , PdfObject > | GetAccessibleAttributes () |
ListItem | GetFirstItem () |
ListItem | GetLastItem () |
bool | IsContent () |
bool | IsEmpty () |
bool | IsNestable () |
void | NormalizeIndentation () |
bool | Process (IElementListener listener)Processes the element by adding it (or the different parts) to an IElementListener. |
void | SetAccessibleAttribute (PdfName key, PdfObject value) |
void | SetListSymbol (string symbol)Sets the listsymbol. |
string | getPostSymbol () |
Protected methods
Returns | Name |
---|---|
void | PopulateProperties (List clone) |
Details
Summary
A List contains several ListItems.
Example
Example 1:
List list = new List(true, 20);
list.Add(new ListItem("First line"));
list.Add(new ListItem("The second line is longer to see what happens once the end of the line is reached. Will it start on a new line?"));
list.Add(new ListItem("Third line"));
The result of this code looks like this: First line The second line is longer to see what happens once the end of the line is reached. Will it start on a new line? Third line Example 2:
List overview = new List(false, 10);
overview.Add(new ListItem("This is an item"));
overview.Add("This is another item");
Inheritance
Constructors
List [1/6]
public List()
List [2/6]
public List(float symbolIndent)
Arguments
Type | Name | Description |
---|---|---|
float | symbolIndent |
List [3/6]
public List(bool numbered)
Arguments
Type | Name | Description |
---|---|---|
bool | numbered |
List [4/6]
public List(bool numbered, bool lettered)
Arguments
Type | Name | Description |
---|---|---|
bool | numbered | |
bool | lettered |
List [5/6]
public List(bool numbered, float symbolIndent)
Arguments
Type | Name | Description |
---|---|---|
bool | numbered | a bool |
float | symbolIndent | the indentation that has to be used for the listsymbol |
Summary
Constructs a List.
Remarks
the parameter symbolIndent is important for instance when generating PDF-documents; it indicates the indentation of the listsymbol.
List [6/6]
public List(bool numbered, bool lettered, float symbolIndent)
Arguments
Type | Name | Description |
---|---|---|
bool | numbered | a bool |
bool | lettered | a bool |
float | symbolIndent | the indentation that has to be used for the listsymbol |
Summary
Constructs a List.
Methods
Process
public virtual bool Process(IElementListener listener)
Arguments
Type | Name | Description |
---|---|---|
IElementListener | listener | an IElementListener |
Summary
Processes the element by adding it (or the different parts) to an IElementListener.
Returns
true if the element was processed successfully
Add [1/2]
public virtual bool Add(string s)
Arguments
Type | Name | Description |
---|---|---|
string | s |
Add [2/2]
public virtual bool Add(IElement o)
Arguments
Type | Name | Description |
---|---|---|
IElement | o | the object to add |
Summary
Adds an Object to the List.
Returns
true is successful
CloneShallow
public virtual List CloneShallow()
PopulateProperties
protected void PopulateProperties(List clone)
Arguments
Type | Name | Description |
---|---|---|
List | clone |
NormalizeIndentation
public virtual void NormalizeIndentation()
SetListSymbol
public virtual void SetListSymbol(string symbol)
Arguments
Type | Name | Description |
---|---|---|
string | symbol | a string |
Summary
Sets the listsymbol.
Remarks
This is a shortcut for SetListSymbol(Chunk symbol).
IsContent
public virtual bool IsContent()
IsNestable
public virtual bool IsNestable()
IsEmpty
public virtual bool IsEmpty()
getPostSymbol
public virtual string getPostSymbol()
GetFirstItem
public virtual ListItem GetFirstItem()
GetLastItem
public virtual ListItem GetLastItem()
GetAccessibleAttribute
public virtual PdfObject GetAccessibleAttribute(PdfName key)
Arguments
Type | Name | Description |
---|---|---|
PdfName | key |
SetAccessibleAttribute
public virtual void SetAccessibleAttribute(PdfName key, PdfObject value)
Arguments
GetAccessibleAttributes
public virtual Dictionary<PdfName, PdfObject> GetAccessibleAttributes()
Properties
Type
public virtual int Type { get; }
Summary
Gets the type of the text element.
Value
a type
Chunks
public virtual IList<Chunk> Chunks { get; }
Summary
Gets all the chunks in this element.
Value
an ArrayList
Numbered
public virtual bool Numbered { get; set; }
Lettered
public virtual bool Lettered { get; set; }
Lowercase
public virtual bool Lowercase { get; set; }
IsLowercase
public virtual bool IsLowercase { get; set; }
Summary
Alias for VB.NET compatibility.
Autoindent
public virtual bool Autoindent { get; set; }
Alignindent
public virtual bool Alignindent { get; set; }
First
public virtual int First { get; set; }
Summary
Get/set the first number
Value
an int
ListSymbol
public virtual Chunk ListSymbol { set; }
Summary
Sets the symbol
Value
a Chunk
IndentationLeft
public virtual float IndentationLeft { get; set; }
Summary
Get/set the indentation of this paragraph on the left side.
Value
the indentation
IndentationRight
public virtual float IndentationRight { get; set; }
Summary
Get/set the indentation of this paragraph on the right side.
Value
the indentation
SymbolIndent
public virtual float SymbolIndent { get; set; }
Summary
Gets the symbol indentation.
Value
the symbol indentation
Items
public virtual List<IElement> Items { get; }
Summary
Gets all the items in the list.
Value
an ArrayList containing ListItems
Size
public virtual int Size { get; }
Summary
Gets the size of the list.
Value
a size
TotalLeading
public virtual float TotalLeading { get; }
Summary
Gets the leading of the first listitem.
Value
a leading
Symbol
public virtual Chunk Symbol { get; set; }
Summary
Get/set the symbol indentation.
Value
a Chunk
PostSymbol
public virtual string PostSymbol { get; set; }
PreSymbol
public virtual string PreSymbol { get; set; }
Role
public virtual PdfName Role { get; set; }
ID
public virtual AccessibleElementId ID { get; set; }
IsInline
public virtual bool IsInline { get; }
Generated with ModularDoc