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 DefaultAccessibilityProperties |
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.
|
Float |
getSymbolIndent()
Gets the indent offset of the ListItem symbols.
|
protected IRenderer |
makeNewRenderer()
Creates new renderer instance.
|
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.
|
List |
setSymbolIndent(float symbolIndent)
Sets the indent offset of the ListItem symbols.
|
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
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumber
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildren
createRendererSubTree, getRenderer, setNextRenderer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
public static final String DEFAULT_LIST_SYMBOL
protected DefaultAccessibilityProperties 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 BlockElement<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
alignment
- the alignment of the list symbols
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 AccessibilityProperties getAccessibilityProperties()
IAccessibleElement
accessibility properties
. See also IAccessibleElement
.
protected IRenderer makeNewRenderer()
AbstractElement
makeNewRenderer
in class AbstractElement<List>
IRenderer
Copyright © 1998–2022 iText Group NV. All rights reserved.