iText 7 7.2.4 API
iText.Layout.Element.List Class Reference

A List is a layout element representing a series of objects that are vertically outlined with the same or very similar layout properties, giving it a sense of unity. More...

Inheritance diagram for iText.Layout.Element.List:
iText.Layout.Element.BlockElement< iText.Layout.Element.List >

Public Member Functions

  List ()
  Creates a List with the DEFAULT_LIST_SYMBOL as a prefix. More...
 
  List (ListNumberingType listNumberingType)
  Creates a List with a custom numbering type. More...
 
override T1  GetDefaultProperty< T1 > (int property)
 
virtual iText.Layout.Element.List  Add (ListItem listItem)
  Adds a new ListItem to the bottom of the List. More...
 
virtual iText.Layout.Element.List  Add (String text)
  Adds a new ListItem to the bottom of the List. More...
 
virtual iText.Layout.Element.List  SetItemStartIndex (int start)
  Customizes the index of the first item in the list. More...
 
virtual iText.Layout.Element.List  SetListSymbol (String symbol)
  Sets the list symbol to be used. More...
 
virtual iText.Layout.Element.List  SetListSymbol (Text text)
  Sets the list symbol to be used. More...
 
virtual iText.Layout.Element.List  SetListSymbol (Image image)
  Sets the list symbol to be used. More...
 
virtual iText.Layout.Element.List  SetListSymbol (ListNumberingType listNumberingType)
  Sets the list numbering type to be used. More...
 
virtual iText.Layout.Element.List  SetListSymbolAlignment (ListSymbolAlignment alignment)
  A specialized enum containing alignment properties for list symbols. More...
 
virtual ? float  GetSymbolIndent ()
  Gets the indent offset of the ListItem symbols. More...
 
virtual iText.Layout.Element.List  SetSymbolIndent (float symbolIndent)
  Sets the indent offset of the ListItem symbols. More...
 
virtual String  GetPostSymbolText ()
  Gets the piece of text that is added after the ListItem symbol. More...
 
virtual void  SetPostSymbolText (String postSymbolText)
  Sets a piece of text that should be added after the ListItem symbol. More...
 
virtual String  GetPreSymbolText ()
  Gets the piece of text that is added before the ListItem symbol. More...
 
virtual void  SetPreSymbolText (String preSymbolText)
  Sets a piece of text that should be added before the ListItem symbol. More...
 
override AccessibilityProperties  GetAccessibilityProperties ()
  Gets the accessibility properties. More...
 
- Public Member Functions inherited from iText.Layout.Element.BlockElement< iText.Layout.Element.List >
override T1  GetDefaultProperty< T1 > (int property)
  Gets the default property from this entity. More...
 
virtual UnitValue  GetMarginLeft ()
  Gets the current left margin width of the element. More...
 
virtual T  SetMarginLeft (float value)
  Sets the left margin width of the element. More...
 
virtual UnitValue  GetMarginRight ()
  Gets the current right margin width of the element. More...
 
virtual T  SetMarginRight (float value)
  Sets the right margin width of the element. More...
 
virtual UnitValue  GetMarginTop ()
  Gets the current top margin width of the element. More...
 
virtual T  SetMarginTop (float value)
  Sets the top margin width of the element. More...
 
virtual UnitValue  GetMarginBottom ()
  Gets the current bottom margin width of the element. More...
 
virtual T  SetMarginBottom (float value)
  Sets the bottom margin width of the element. More...
 
virtual T  SetMargin (float commonMargin)
  Sets all margins around the element to the same width. More...
 
virtual T  SetMargins (float marginTop, float marginRight, float marginBottom, float marginLeft)
  Sets the margins around the element to a series of new widths. More...
 
virtual UnitValue  GetPaddingLeft ()
  Gets the current left padding width of the element. More...
 
virtual T  SetPaddingLeft (float value)
  Sets the left padding width of the element. More...
 
virtual UnitValue  GetPaddingRight ()
  Gets the current right padding width of the element. More...
 
virtual T  SetPaddingRight (float value)
  Sets the right padding width of the element. More...
 
virtual UnitValue  GetPaddingTop ()
  Gets the current top padding width of the element. More...
 
virtual T  SetPaddingTop (float value)
  Sets the top padding width of the element. More...
 
virtual UnitValue  GetPaddingBottom ()
  Gets the current bottom padding width of the element. More...
 
virtual T  SetPaddingBottom (float value)
  Sets the bottom padding width of the element. More...
 
virtual T  SetPadding (float commonPadding)
  Sets all paddings around the element to the same width. More...
 
virtual T  SetPaddings (float paddingTop, float paddingRight, float paddingBottom, float paddingLeft)
  Sets the paddings around the element to a series of new widths. More...
 
virtual T  SetVerticalAlignment (VerticalAlignment? verticalAlignment)
  Sets the vertical alignment of the element. More...
 
virtual T  SetSpacingRatio (float ratio)
  Sets a ratio which determines in which proportion will word spacing and character spacing be applied when horizontal alignment is justified. More...
 
virtual ? bool  IsKeepTogether ()
  Returns whether the BlockElement<T> should be kept together as much as possible. More...
 
virtual T  SetKeepTogether (bool keepTogether)
  Sets whether the BlockElement<T> should be kept together as much as possible. More...
 
virtual ? bool  IsKeepWithNext ()
  Returns whether the end of this BlockElement<T> and the start of the next sibling of this element should be placed in the same area. More...
 
virtual T  SetKeepWithNext (bool keepWithNext)
  Sets whether the end of this BlockElement<T> and the start of the next sibling of this element should be placed in the same area. More...
 
virtual T  SetRotationAngle (float angleInRadians)
  Sets the rotation radAngle. More...
 
virtual T  SetRotationAngle (double angleInRadians)
  Sets the rotation angle. More...
 
virtual T  SetWidth (float width)
  Sets the width property of a block element, measured in points. More...
 
virtual T  SetWidth (UnitValue width)
  Sets the width property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual UnitValue  GetWidth ()
  Gets the width property of a block element. More...
 
virtual T  SetHeight (UnitValue height)
  Sets the height property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetHeight (float height)
  Sets the height property a block element as a point-value. More...
 
virtual UnitValue  GetHeight ()
  Gets the height property of a block element. More...
 
virtual T  SetMaxHeight (float maxHeight)
  Sets the max-height of a block element as point-unit value. More...
 
virtual T  SetMaxHeight (UnitValue maxHeight)
  Sets the max-height property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMinHeight (UnitValue minHeight)
  Sets the min-height property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMinHeight (float minHeight)
  Sets the min-height of a block element as point-unit value. More...
 
virtual T  SetMaxWidth (UnitValue maxWidth)
  Sets the max-width property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMaxWidth (float maxWidth)
  Sets the max-width of a block element as point-unit value. More...
 
virtual T  SetMinWidth (UnitValue minWidth)
  Sets the min-width property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMinWidth (float minWidth)
  Sets the min-width of a block element as point-unit value. More...
 
virtual T  SetNeutralRole ()
  Give this element a neutral role. More...
 

Static Public Attributes

const String  DEFAULT_LIST_SYMBOL = "- "
 

Detailed Description

A List is a layout element representing a series of objects that are vertically outlined with the same or very similar layout properties, giving it a sense of unity.

A List is a layout element representing a series of objects that are vertically outlined with the same or very similar layout properties, giving it a sense of unity. It contains ListItem objects that can optionally be prefixed with a symbol and/or numbered.

Constructor & Destructor Documentation

◆ List() [1/2]

iText.Layout.Element.List.List ( )
inline

Creates a List with the DEFAULT_LIST_SYMBOL as a prefix.

◆ List() [2/2]

iText.Layout.Element.List.List ( ListNumberingType  listNumberingType )
inline

Creates a List with a custom numbering type.

Parameters
listNumberingType a prefix style

Member Function Documentation

◆ Add() [1/2]

virtual iText.Layout.Element.List iText.Layout.Element.List.Add ( ListItem  listItem )
inlinevirtual

Adds a new ListItem to the bottom of the List.

Parameters
listItem a new list item
Returns
this list.

◆ Add() [2/2]

virtual iText.Layout.Element.List iText.Layout.Element.List.Add ( String  text )
inlinevirtual

Adds a new ListItem to the bottom of the List.

Parameters
text textual contents of the new list item
Returns
this list.

◆ GetAccessibilityProperties()

override AccessibilityProperties iText.Layout.Element.List.GetAccessibilityProperties ( )
inlinevirtual

Gets the accessibility properties.

Gets the accessibility properties . See also IAccessibleElement.

Returns
an interface that allows to specify properties of a tagged element in Tagged PDF.

Implements iText.Layout.Element.BlockElement< iText.Layout.Element.List >.

◆ GetPostSymbolText()

virtual String iText.Layout.Element.List.GetPostSymbolText ( )
inlinevirtual

Gets the piece of text that is added after the ListItem symbol.

Returns
the post symbol text

◆ GetPreSymbolText()

virtual String iText.Layout.Element.List.GetPreSymbolText ( )
inlinevirtual

Gets the piece of text that is added before the ListItem symbol.

Returns
the pre symbol text

◆ GetSymbolIndent()

virtual ? float iText.Layout.Element.List.GetSymbolIndent ( )
inlinevirtual

Gets the indent offset of the ListItem symbols.

Returns
the indent offset as a float.

◆ SetItemStartIndex()

virtual iText.Layout.Element.List iText.Layout.Element.List.SetItemStartIndex ( int  start )
inlinevirtual

Customizes the index of the first item in the list.

Parameters
start the custom index, as an int
Returns
this list.

◆ SetListSymbol() [1/4]

virtual iText.Layout.Element.List iText.Layout.Element.List.SetListSymbol ( Image  image )
inlinevirtual

Sets the list symbol to be used.

Sets the list symbol to be used. This will create an unordered list, i.e. all list items will be shown with the same prefix.

Parameters
image the Image object to be used for all items.
Returns
this list.

◆ SetListSymbol() [2/4]

virtual iText.Layout.Element.List iText.Layout.Element.List.SetListSymbol ( ListNumberingType  listNumberingType )
inlinevirtual

Sets the list numbering type to be used.

Sets the list numbering type to be used. This will create an ordered list, i.e. every ListItem will have a unique prefix.

Parameters
listNumberingType the iText.Layout.Properties.ListNumberingType that will generate appropriate prefixes for the ListItem s.
Returns
this list.

◆ SetListSymbol() [3/4]

virtual iText.Layout.Element.List iText.Layout.Element.List.SetListSymbol ( String  symbol )
inlinevirtual

Sets the list symbol to be used.

Sets the list symbol to be used. This will create an unordered list, i.e. all list items will be shown with the same prefix.

Parameters
symbol the textual symbol to be used for all items.
Returns
this list.

◆ SetListSymbol() [4/4]

virtual iText.Layout.Element.List iText.Layout.Element.List.SetListSymbol ( Text  text )
inlinevirtual

Sets the list symbol to be used.

Sets the list symbol to be used. This will create an unordered list, i.e. all list items will be shown with the same prefix.

Parameters
text the Text object to be used for all items.
Returns
this list.

◆ SetListSymbolAlignment()

virtual iText.Layout.Element.List iText.Layout.Element.List.SetListSymbolAlignment ( ListSymbolAlignment  alignment )
inlinevirtual

A specialized enum containing alignment properties for list symbols.

A specialized enum containing alignment properties for list symbols. iText.Layout.Properties.ListSymbolAlignment.LEFT means that the items will be aligned as follows:

  1. Item 9
  2. Item 10

Whereas iText.Layout.Properties.ListSymbolAlignment.RIGHT means the items will be aligned as follows:

  1. Item 9
  2. Item 10
Parameters
alignment the alignment of the list symbols
Returns
this element

◆ SetPostSymbolText()

virtual void iText.Layout.Element.List.SetPostSymbolText ( String  postSymbolText )
inlinevirtual

Sets a piece of text that should be added after the ListItem symbol.

Parameters
postSymbolText the post symbol text

◆ SetPreSymbolText()

virtual void iText.Layout.Element.List.SetPreSymbolText ( String  preSymbolText )
inlinevirtual

Sets a piece of text that should be added before the ListItem symbol.

Parameters
preSymbolText the pre symbol text

◆ SetSymbolIndent()

virtual iText.Layout.Element.List iText.Layout.Element.List.SetSymbolIndent ( float  symbolIndent )
inlinevirtual

Sets the indent offset of the ListItem symbols.

Parameters
symbolIndent the new indent offset.
Returns
this list.