public class ListItem extends Object implements ListContainer
Modifier and Type | Method and Description |
---|---|
List |
addList()
Add a new List to this container.
|
List |
addList(ListDecorator decorator)
Add a List with specified ListDecorator to this container.
|
void |
clearList()
Remove all Lists from this container.
|
int |
getIndex()
Answers the index of the item in its owner list.
|
OdfElement |
getListContainerElement()
Get the ODF element which can have
|
Iterator<List> |
getListIterator()
Return an Iterator of the Lists in this ListContainer.
|
String |
getNumberFormat()
Get the number format of this item.
|
TextListItemElement |
getOdfElement()
Get the instance of TextListItemElement which represents this list item.
|
List |
getOwnerList()
Get the List which contains this ListItem.
|
Integer |
getStartNumber()
Get the start number of this item.
|
String |
getTextContent()
Get item text content.
|
void |
remove()
Remove this item from its owner list.
|
boolean |
removeList(List list)
Remove the existing List from this container.
|
void |
setNumberFormat(String format)
Set the number format of this item.
|
void |
setStartNumber(Integer number)
Set the start number of this item.
|
void |
setTextContent(String content)
Set item text content.
|
String |
toString() |
public TextListItemElement getOdfElement()
public String getTextContent()
public void setTextContent(String content)
content
- item text content.public void remove()
public Integer getStartNumber()
A value can be specified that restarts numbering of a list at the current item. This feature can only be applied to items in a list with a numbering list style.
null
will be returned.public void setStartNumber(Integer number)
A value can be specified that restarts numbering of a list at the current item. This feature can only be applied to items in a list with a numbering list style.
number
- the start number to be set.IllegalArgumentException
- if number < 0
.public String getNumberFormat()
List item can contain the text of a formatted number which is present when a list style is applied to an element whose corresponding list level style specifies that the list label is a number. This text may be used by consumers that do not support the automatic generation of numbering but should be ignored by consumers that do support it.
public void setNumberFormat(String format)
List item can contain the text of a formatted number which is present when a list style is applied to an element whose corresponding list level style specifies that the list label is a number. This text may be used by consumers that do not support the automatic generation of numbering but should be ignored by consumers that do support it.
format
- the number format to be set.public int getIndex()
public List getOwnerList()
public OdfElement getListContainerElement()
ListContainer
getListContainerElement
in interface ListContainer
public List addList()
ListContainer
addList
in interface ListContainer
public List addList(ListDecorator decorator)
ListContainer
addList
in interface ListContainer
decorator
- the specified ListDecoratorpublic void clearList()
ListContainer
clearList
in interface ListContainer
public Iterator<List> getListIterator()
ListContainer
getListIterator
in interface ListContainer
Iterator
public boolean removeList(List list)
ListContainer
removeList
in interface ListContainer
Copyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.