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.
|
org.odftoolkit.odfdom.pkg.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.
|
org.odftoolkit.odfdom.dom.element.text.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 org.odftoolkit.odfdom.dom.element.text.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 org.odftoolkit.odfdom.pkg.OdfElement getListContainerElement()
ListContainergetListContainerElement in interface ListContainerpublic List addList()
ListContaineraddList in interface ListContainerpublic List addList(ListDecorator decorator)
ListContaineraddList in interface ListContainerdecorator - the specified ListDecoratorpublic void clearList()
ListContainerclearList in interface ListContainerpublic Iterator<List> getListIterator()
ListContainergetListIterator in interface ListContainerIteratorpublic boolean removeList(List list)
ListContainerremoveList in interface ListContainerCopyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2019 The Document Foundation. All rights reserved.