Package com.independentsoft.office.odf
Class ListItem
java.lang.Object
com.independentsoft.office.odf.ListItem
- All Implemented Interfaces:
IContentElement
Represents an item in a list.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a Heading object to the content.voidAdds a List object to the content.voidAdds a Paragraph object to the content.clone()Creates a new object that is a deep copy of the current instance.Contains a collection of ITextContent objects.Returns all content elements.Returns the parent content element.intGets the value that restarts numbering of a list at the current item.voidsetParent(IContentElement parent)Sets the parent content element.voidsetStartValue(int startValue)Sets the value that restarts numbering of a list at the current item.toString()Converts the value of the current ListItem object to its equivalent string representation.
-
Constructor Details
-
ListItem
public ListItem()Initializes a new instance of the ListItem class.
-
-
Method Details
-
add
Adds a Paragraph object to the content.- Parameters:
paragraph- the paragraph
-
add
Adds a Heading object to the content.- Parameters:
heading- the heading
-
add
Adds a List object to the content.- Parameters:
list- the list
-
getContentElements
Returns all content elements.- Specified by:
getContentElementsin interfaceIContentElement- Returns:
- A collection of content elements.
-
getParent
Returns the parent content element.- Specified by:
getParentin interfaceIContentElement- Returns:
- the parent
-
setParent
Sets the parent content element.- Specified by:
setParentin interfaceIContentElement- Parameters:
parent- the new parent
-
clone
Creates a new object that is a deep copy of the current instance.- Specified by:
clonein interfaceIContentElement- Overrides:
clonein classObject- Returns:
- A new object that is a copy of this instance.
-
toString
Converts the value of the current ListItem object to its equivalent string representation. -
getContent
Contains a collection of ITextContent objects.- Returns:
- the content
-
getStartValue
public int getStartValue()Gets the value that restarts numbering of a list at the current item.- Returns:
- the start value
-
setStartValue
public void setStartValue(int startValue)Sets the value that restarts numbering of a list at the current item.- Parameters:
startValue- the new start value
-