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, styles
properties
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, setKeepTogether, setKeepWithNext, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignment
addStyle, createRendererSubTree, getProperty, getRenderer, hasProperty, isEmpty, propagateArtifactRoleToChildElements, setAction, setNextRenderer, setPageNumber
deleteOwnProperty, getHeight, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getWidth, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderLeft, setBorderRight, setBorderTop, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontKerning, setFontScript, setFontSize, setHeight, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setWidth, setWidth, setWidthPercent, setWordSpacing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deleteOwnProperty, getOwnProperty, hasOwnProperty, setProperty
public 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 ListItem
s.
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–2016 iText Group NV. All rights reserved.