com.aspose.words
Class List

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

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 ListCollection collection.

To create a new list, use the Add methods of the ListCollection 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 Aspose.Words.ListFormat.

See Also:
ListCollection, ListLevel, Aspose.Words.ListFormat

Property Getters/Setters Summary
Aspose.Words.DocumentBasegetDocument()
           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 to a list style.
booleanisMultiLevel()
           Returns true when the list contains 9 levels; false when 1 level.
booleanisRestartAtEachSection()
voidisRestartAtEachSection(boolean value)
           Specifies whether list should be restarted at each section. Default value is false.
intgetListId()
           Gets the unique identifier of the list.
ListLevelCollectiongetListLevels()
           Gets the collection of list levels for this list.
Aspose.Words.StylegetStyle()
           Gets the list style that this list references or defines.
 
Method Summary
intcompareTo(java.lang.Object obj)
          
 

Property Getters/Setters Detail

getDocument

public Aspose.Words.DocumentBase getDocument()
Gets the owner document.

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


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 to 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

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.


isRestartAtEachSection/isRestartAtEachSection

public boolean isRestartAtEachSection() / public void isRestartAtEachSection(boolean value)
Specifies whether list should be restarted at each section. Default value is false.

This option is supported only in RTF, DOC and DOCX document formats.

This option will be written to DOCX only if OoxmlCompliance is higher then #Error Cref: F:Aspose.Words.Saving.OoxmlComplianceCore.Ecma376.


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 ListCollection.getListByListId(int) method to find a list by its identifier.


getListLevels

public ListLevelCollection 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.


getStyle

public Aspose.Words.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.


Method Detail

compareTo

public int compareTo(java.lang.Object obj)
Parameters:
obj -
Returns:

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.