org.odftoolkit.simple.text.list
Interface ListContainer

All Known Implementing Classes:
AbstractListContainer, Cell, ListItem, Notes, Slide, Textbox, TextDocument

public interface ListContainer

ListContainer is a container which maintains List(s) as element(s). List(s) can be added, removed and iterated in this container.

All of the components which need to hold a List, must implement this interface. For example, element is under element according to ODF specification. So TextDocument is a type of ListContainer which holds List directly. TextDocument must implement this interface. While Presentation Notes is also a type of ListContainer, although is not a element with which the element is usable. can have child element and can have child element . is usable with the element. Notes is an indirectly ListContainer which let user operate List easily.

Since:
0.4
See Also:
List, TextDocument, Notes

Method Summary
 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.
 OdfElement getListContainerElement()
          Get the ODF element which can have as child element directly according to ODF specification.
 Iterator<List> getListIterator()
          Return an Iterator of the Lists in this ListContainer.
 boolean removeList(List list)
          Remove the existing List from this container.
 

Method Detail

getListContainerElement

OdfElement getListContainerElement()
Get the ODF element which can have as child element directly according to ODF specification. This Element will help to find the position to insert a new List. For example, element is usable with element, so TextDocument will return OfficeTextElement. While Presentation Notes is an indirectly ListContainer, which holds List with the help of its grand-child element , so for Notes, DrawTextBoxElement should be return.

Returns:
container element which can hold .

addList

List addList()
Add a new List to this container.

Returns:
added list.

addList

List addList(ListDecorator decorator)
Add a List with specified ListDecorator to this container.

Parameters:
decorator - the specified ListDecorator
Returns:
added list.

removeList

boolean removeList(List list)
Remove the existing List from this container.

Returns:
true, if the container contains this List.

clearList

void clearList()
Remove all Lists from this container.


getListIterator

Iterator<List> getListIterator()
Return an Iterator of the Lists in this ListContainer. The Lists are iterated in the same order that they occur in the ListContainer.

Returns:
an Iterator of the Lists in this ListContainer
See Also:
Iterator


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.