Package com.itextpdf.layout.element
Class ListItem
- All Implemented Interfaces:
-
IAbstractElement
,IBlockElement
,IElement
,IPropertyContainer
,IAccessibleElement
A list item is a layout element that is one entry in a
List
. The list object controls the prefix, postfix, and numbering of the list items.
-
Field Summary
Fields inherited from class com.itextpdf.layout.element.Div
tagProperties
Fields inherited from class com.itextpdf.layout.element.AbstractElement
childElements, nextRenderer, styles
Fields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets theaccessibility properties
.T1 getDefaultProperty
(int property) Gets the default property from this entity.protected IRenderer
Creates new renderer instance.setListSymbol
(Image image) Sets the list item symbol to be used.setListSymbol
(Text text) Sets the list item symbol to be used.setListSymbol
(ListNumberingType listNumberingType) Sets the list item numbering type to be used.setListSymbol
(String symbol) Sets the list item symbol to be used.setListSymbolOrdinalValue
(int ordinalValue) Customizes the index of the item in the list.Methods inherited from class com.itextpdf.layout.element.Div
add, add, add, setFillAvailableArea, setFillAvailableAreaOnSplit
Methods inherited from class com.itextpdf.layout.element.BlockElement
getHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getWidth, isKeepTogether, isKeepWithNext, setHeight, setHeight, setKeepTogether, setKeepWithNext, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setNeutralRole, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignment, setWidth, setWidth
Methods inherited from class com.itextpdf.layout.element.AbstractElement
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumber
Methods inherited from class com.itextpdf.layout.ElementPropertyContainer
deleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.itextpdf.layout.element.IAbstractElement
getChildren
Methods inherited from interface com.itextpdf.layout.element.IElement
createRendererSubTree, getRenderer, setNextRenderer
Methods inherited from interface com.itextpdf.layout.IPropertyContainer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
-
Constructor Details
-
ListItem
public ListItem()Creates a ListItem. -
ListItem
Creates a list item with text.- Parameters:
-
text
- the textual contents of the list item
-
ListItem
Creates a list item with an image.- Parameters:
-
image
- the graphical contents of the list item
-
-
Method Details
-
setListSymbolOrdinalValue
Customizes the index of the item in the list.- Parameters:
-
ordinalValue
- the custom value property of an ordered list's list item. - Returns:
- this listItem.
-
getDefaultProperty
publicT1 getDefaultProperty (int property) Description copied from interface:IPropertyContainer
Gets the default property from this entity.- Specified by:
-
getDefaultProperty
in interfaceIPropertyContainer
- Overrides:
-
getDefaultProperty
in classBlockElement<Div>
- Type Parameters:
-
T1
- the return type associated with the property - Parameters:
-
property
- the property to be retrieved - Returns:
-
the default property value. If the default property is not defined,
null
will be returned
-
setListSymbol
Sets the list item symbol to be used.- Parameters:
-
symbol
- the textual symbol to be used for the item. - Returns:
- this list item.
-
setListSymbol
Sets the list item symbol to be used.- Parameters:
-
text
- theText
object to be used for the item. - Returns:
- this list item.
-
setListSymbol
Sets the list item symbol to be used.- Parameters:
-
image
- theImage
object to be used for the item. - Returns:
- this list.
-
setListSymbol
Sets the list item numbering type to be used.- Parameters:
-
listNumberingType
- theListNumberingType
that will generate appropriate prefixes for theListItem
. - Returns:
- this list item.
-
getAccessibilityProperties
Description copied from interface:IAccessibleElement
Gets theaccessibility properties
. See alsoIAccessibleElement
.- Specified by:
-
getAccessibilityProperties
in interfaceIAccessibleElement
- Overrides:
-
getAccessibilityProperties
in classDiv
- Returns:
- an interface that allows to specify properties of a tagged element in Tagged PDF.
-
makeNewRenderer
Description copied from class:AbstractElement
Creates new renderer instance.- Overrides:
-
makeNewRenderer
in classDiv
- Returns:
-
new
IRenderer
-