public class List extends BlockElement<List>
ListItem objects that can optionally be prefixed with a symbol and/or numbered.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LIST_SYMBOL |
protected PdfName |
role |
protected AccessibilityProperties |
tagProperties |
childElements, nextRenderer, stylesproperties| Constructor and Description |
|---|
List()
Creates a List with the DEFAULT_LIST_SYMBOL as a prefix.
|
List(ListNumberingType listNumberingType)
Creates a List with a custom numbering type.
|
| Modifier and Type | Method and Description |
|---|---|
List |
add(ListItem listItem)
Adds a new ListItem to the bottom of the List.
|
List |
add(String text)
Adds a new ListItem to the bottom of the List.
|
AccessibilityProperties |
getAccessibilityProperties()
Gets the accessibility properties.
|
|
getDefaultProperty(int property)
Gets the default property from this entity.
|
String |
getPostSymbolText()
Gets the piece of text that is added after the ListItem symbol.
|
String |
getPreSymbolText()
Gets the piece of text that is added before the ListItem symbol.
|
PdfName |
getRole()
Gets the element's role.
|
Float |
getSymbolIndent()
Gets the indent offset of the ListItem symbols.
|
protected IRenderer |
makeNewRenderer() |
List |
setItemStartIndex(int start)
Customizes the index of the first item in the list.
|
List |
setListSymbol(Image image)
Sets the list symbol to be used.
|
List |
setListSymbol(ListNumberingType listNumberingType)
Sets the list numbering type to be used.
|
List |
setListSymbol(String symbol)
Sets the list symbol to be used.
|
List |
setListSymbol(Text text)
Sets the list symbol to be used.
|
List |
setListSymbolAlignment(ListSymbolAlignment alignment)
A specialized enum containing alignment properties for list symbols.
|
void |
setPostSymbolText(String postSymbolText)
Sets a piece of text that should be added after the ListItem symbol.
|
void |
setPreSymbolText(String preSymbolText)
Sets a piece of text that should be added before the ListItem symbol.
|
void |
setRole(PdfName role)
Sets the element's role.
|
List |
setSymbolIndent(float symbolIndent)
Sets the indent offset of the ListItem symbols.
|
getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, isKeepTogether, isKeepWithNext, setHeight, setKeepTogether, setKeepWithNext, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setMaxHeight, setMinHeight, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignmentaddStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, propagateArtifactRoleToChildElements, setAction, setNextRenderer, setPageNumberdeleteOwnProperty, getHeight, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getWidth, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderLeft, setBorderRight, setBorderTop, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFont, setFontColor, setFontColor, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWidth, setWidth, setWidthPercent, setWordSpacingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateRendererSubTree, getRenderer, setNextRendererdeleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setPropertypublic static final String DEFAULT_LIST_SYMBOL
protected PdfName role
protected AccessibilityProperties tagProperties
public List()
DEFAULT_LIST_SYMBOL as a prefix.
public List(ListNumberingType listNumberingType)
listNumberingType - a prefix style
publicT1 getDefaultProperty(int property)
IPropertyContainer
getDefaultProperty in interface IPropertyContainer
getDefaultProperty in class ElementPropertyContainer<List>
T1 - the return type associated with the property
property - the property to be retrieved
null will be returned
public List add(ListItem listItem)
ListItem to the bottom of the List.
listItem - a new list item
public List add(String text)
ListItem to the bottom of the List.
text - textual contents of the new list item
public List setItemStartIndex(int start)
start - the custom index, as an int
public List setListSymbol(String symbol)
list items will be shown with the same prefix.
symbol - the textual symbol to be used for all items.
public List setListSymbol(Text text)
list items will be shown with the same prefix.
text - the Text object to be used for all items.
public List setListSymbol(Image image)
list items will be shown with the same prefix.
image - the Image object to be used for all items.
public List setListSymbol(ListNumberingType listNumberingType)
ListItem will have a unique prefix.
listNumberingType - the ListNumberingType that will generate appropriate prefixes for the ListItems.
public List setListSymbolAlignment(ListSymbolAlignment alignment)
ListSymbolAlignment.LEFT means that the items will be aligned as follows: 9. Item 9 10. Item 10 Whereas ListSymbolAlignment.RIGHT means the items will be aligned as follows: 9. Item 9 10. Item 10
public Float getSymbolIndent()
ListItem symbols.
float.
public List setSymbolIndent(float symbolIndent)
ListItem symbols.
symbolIndent - the new indent offset.
public String getPostSymbolText()
ListItem symbol.
public void setPostSymbolText(String postSymbolText)
ListItem symbol.
postSymbolText - the post symbol text
public String getPreSymbolText()
ListItem symbol.
public void setPreSymbolText(String preSymbolText)
ListItem symbol.
preSymbolText - the pre symbol text
public PdfName getRole()
IAccessibleElement
PdfName containing the name of the role
public void setRole(PdfName role)
IAccessibleElement
role - the new role which the IAccessibleElement should take
public AccessibilityProperties getAccessibilityProperties()
IAccessibleElement
accessibility properties.
protected IRenderer makeNewRenderer()
makeNewRenderer in class AbstractElement<List>
Copyright © 1998–2017 iText Group NV. All rights reserved.