Package com.independentsoft.office.odf

# Class List

java.lang.Object
com.independentsoft.office.odf.List

All Implemented Interfaces:
  `IDrawText`, `ICellContent`, `IContentElement`, `IIndexContent`, `ITextContent`, `IHeaderFooterContent`

public class List extends Object implements ITextContent, IDrawText, IHeaderFooterContent
Represents a list.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `List()`
  Initializes a new instance of the List class.
  `List​(InternalXMLStreamReader reader)`
  Instantiates a new list.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add​(ListItem item)`
  Adds a ListItem object to the content.
  `List`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `List<IContentElement>`
  `getContentElements()`
  Returns all content elements.
  `String`
  `getContinueList()`
  Gets the id of a list that is to be continued.
  `ListHeader`
  `getHeader()`
  Gets the list header and is a kind of list item.
  `String`
  `getID()`
  Gets the id of the list.
  `List<ListItem>`
  `getItems()`
  Contains a collection of items.
  `IContentElement`
  `getParent()`
  Returns the parent content element.
  `String`
  `getStyle()`
  Gets the name of a list style that is applied to a list.
  `boolean`
  `isContinueNumbering()`
  Specifies if the numbering of the preceding list is continued or not.
  `void`
  `setContinueList​(String continueList)`
  Sets the id of a list that is to be continued.
  `void`
  `setContinueNumbering​(boolean continueNumbering)`
  Specifies if the numbering of the preceding list is continued or not.
  `void`
  `setHeader​(ListHeader header)`
  Sets the list header and is a kind of list item.
  `void`
  `setID​(String id)`
  Sets the id of the list.
  `void`
  `setParent​(IContentElement parent)`
  Sets the parent content element.
  `void`
  `setStyle​(String style)`
  Sets the name of a list style that is applied to a list.
  `String`
  `toString()`
  Converts the value of the current List object to its equivalent string representation.

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### List

    public List()
    Initializes a new instance of the List class.

  - ### List

    public List​(InternalXMLStreamReader reader) throws XMLStreamException
    Instantiates a new list.
    Parameters:
      `reader` - the reader
    Throws:
      `XMLStreamException` - the xML stream exception

- ## Method Details

  - ### add

    public void add​(ListItem item)
    Adds a ListItem object to the content.
    Parameters:
      `item` - the item

  - ### getContentElements

    public List<IContentElement> getContentElements()
    Returns all content elements.
    Specified by:
      `getContentElements` in interface `IContentElement`
    Returns:
      A collection of content elements.

  - ### getParent

    public IContentElement getParent()
    Returns the parent content element.
    Specified by:
      `getParent` in interface `IContentElement`
    Returns:
      the parent

  - ### setParent

    public void setParent​(IContentElement parent)
    Sets the parent content element.
    Specified by:
      `setParent` in interface `IContentElement`
    Parameters:
      `parent` - the new parent

  - ### clone

    public List clone()
    Creates a new object that is a deep copy of the current instance.
    Specified by:
      `clone` in interface `ICellContent`
    Specified by:
      `clone` in interface `IContentElement`
    Specified by:
      `clone` in interface `IDrawText`
    Specified by:
      `clone` in interface `IHeaderFooterContent`
    Specified by:
      `clone` in interface `IIndexContent`
    Specified by:
      `clone` in interface `ITextContent`
    Overrides:
      `clone` in class `Object`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current List object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getItems

    public List<ListItem> getItems()
    Contains a collection of items.
    Returns:
      the items

  - ### getHeader

    public ListHeader getHeader()
    Gets the list header and is a kind of list item. It contains one or more paragraphs that are displayed before a list. The paragraphs are formatted as list items but they do not have a preceding number or bullet.
    Returns:
      the header

  - ### setHeader

    public void setHeader​(ListHeader header)
    Sets the list header and is a kind of list item. It contains one or more paragraphs that are displayed before a list. The paragraphs are formatted as list items but they do not have a preceding number or bullet.
    Parameters:
      `header` - the new header

  - ### getID

    public String getID()
    Gets the id of the list.
    Returns:
      the id

  - ### setID

    public void setID​(String id)
    Sets the id of the list.
    Parameters:
      `id` - the new id

  - ### getContinueList

    public String getContinueList()
    Gets the id of a list that is to be continued.
    Returns:
      the continue list

  - ### setContinueList

    public void setContinueList​(String continueList)
    Sets the id of a list that is to be continued.
    Parameters:
      `continueList` - the new continue list

  - ### getStyle

    public String getStyle()
    Gets the name of a list style that is applied to a list.
    Returns:
      the style

  - ### setStyle

    public void setStyle​(String style)
    Sets the name of a list style that is applied to a list.
    Parameters:
      `style` - the new style

  - ### isContinueNumbering

    public boolean isContinueNumbering()
    Specifies if the numbering of the preceding list is continued or not.
    Returns:
      true, if is continue numbering

  - ### setContinueNumbering

    public void setContinueNumbering​(boolean continueNumbering)
    Specifies if the numbering of the preceding list is continued or not.
    Parameters:
      `continueNumbering` - the new continue numbering