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() |
<T1> T1 |
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() |
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) |
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, setMaxWidth, setMinHeight, setMinWidth, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignment
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, propagateArtifactRoleToChildElements, setAction, setNextRenderer, setPageNumber
deleteOwnProperty, 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, setWordSpacing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createRendererSubTree, getRenderer, setNextRenderer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, 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 stylepublic <T1> T1 getDefaultProperty(int property)
IPropertyContainer
getDefaultProperty
in interface IPropertyContainer
getDefaultProperty
in class BlockElement<List>
T1
- the return type associated with the propertyproperty
- the property to be retrievednull
will be returnedpublic List add(ListItem listItem)
ListItem
to the bottom of the List.listItem
- a new list itempublic List add(String text)
ListItem
to the bottom of the List.text
- textual contents of the new list itempublic 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 10public 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 textpublic String getPreSymbolText()
ListItem
symbol.public void setPreSymbolText(String preSymbolText)
ListItem
symbol.preSymbolText
- the pre symbol textpublic PdfName getRole()
public void setRole(PdfName role)
public AccessibilityProperties getAccessibilityProperties()
protected IRenderer makeNewRenderer()
makeNewRenderer
in class AbstractElement<List>
Copyright © 1998–2017 iText Group NV. All rights reserved.