ASPOSE home

com.aspose.words
Class List

java.lang.Object
    extended by com.aspose.words.List
All Implemented Interfaces:
java.lang.Cloneable

public class List
extends java.lang.Object

Represents formatting of a list.

A list in a Microsoft Word document is a set of list formatting properties. Each list can have up to 9 levels and formatting properties, such as number style, start value, indent, tab position etc are defined separately for each level.

A List object always belongs to the Lists collection.

To create a new list, use the Add methods of the Lists collection.

To modify formatting of a list, use ListLevel objects found in the ListLevels collection.

To apply or remove list formatting from a paragraph, use ListFormat.

See Also:
Lists, ListLevel, ListFormat

Property Getters/Setters Summary
DocumentgetDocument()
           Gets the owner document.
booleanisListStyleDefinition()
           Returns true if this list is a definition of a list style.
booleanisListStyleReference()
           Returns true if this list is a reference a list style.
booleanisMultiLevel()
           Returns true when the list contains 9 levels; false when 1 level.
intgetListId()
           Gets the unique identifier of the list.
ListLevelsgetListLevels()
           Gets the collection of list levels for this list.
StylegetStyle()
           Gets the list style that this list references or defines.
 

Property Getters/Setters Detail

getListId

public int getListId()
Gets the unique identifier of the list.

You do not normally need to use this property. But if you use it, you normally do so in conjunction with the Lists.getListByListId(int) method to find a list by its identifier.


getDocument

public Document getDocument()
Gets the owner document.

A list always has a parent document and is valid only in the context of that document.


isMultiLevel

public boolean isMultiLevel()
Returns true when the list contains 9 levels; false when 1 level.

The lists that you create with Aspose.Words are always multi-level lists and contain 9 levels.

Microsoft Word 2003 and later always create multi-level lists with 9 levels. But in some documents, created with earlier versions of Microsoft Word you might encounter lists that have 1 level only.


getListLevels

public ListLevels getListLevels()
Gets the collection of list levels for this list.

Use this property to access and modify formatting individual to each level of the list.


isListStyleDefinition

public boolean isListStyleDefinition()
Returns true if this list is a definition of a list style.

When this property is true, the Style property returns the list style that this list defines.

By modifying properties of a list that defines a list style, you modify the properties of the list style.

A list that is a definition of a list style cannot be applied directly to paragraphs to make them numbered.

See Also:
Style, IsListStyleReference

isListStyleReference

public boolean isListStyleReference()
Returns true if this list is a reference a list style.

Note, modifying properties of a list that is a reference to list style has no effect. The list formatting specified in the list style itself always takes precedence.

See Also:
Style, IsListStyleDefinition

getStyle

public Style getStyle()
Gets the list style that this list references or defines.

If this list is not associated with a list style, the property will return null.

A list could be a reference to a list style, in this case IsListStyleReference will be true.

A list could be a definition of a list style, in this case IsListStyleDefinition will be true. Such a list cannot be applied to paragraphs in the document directly.


See Also:
          Wiki - the home page for the Aspose.Words Product Documentation that includes Programmer's Guide, Knowledge Base and other articles.
          Aspose.Words Support Forum - our preferred method of support.
          Aspose.Words Team - contact Aspose.Words Team.


ASPOSE home