com.aspose.words
Class TabStopCollection

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

public class TabStopCollection 
extends java.lang.Object

A collection of TabStop objects that represent custom tabs for a paragraph or a style.

In Microsoft Word documents, a tab stop can be defined in the properties of a paragraph style or directly in the properties of a paragraph. A style can be based on another style. Therefore, the complete set of tab stops for a given object is a combintation of tab stops defined directly on this object and tab stops inherited from the parent styles.

In Aspose.Words, when you obtain a TabStops collection for a paragraph or a style, it contains only the custom tab stops defined directly for this paragraph or style. The collection does not include tab stops defined in the parent styles or default tab stops.

See Also:
ParagraphFormat, TabStop, Document.DefaultTabStop

Property Getters/Setters Summary
intgetCount()
           Gets the number of tab stops in the collection.
TabStopget(double position)
           Gets a tab stop at the specified position.
TabStopget(int index)
           Gets a tab stop at the given index.
 
Method Summary
voidadd(TabStop tabStop)
           Adds or replaces a tab stop in the collection.
voidadd(double position, int alignment, int leader)
           Adds or replaces a tab stop in the collection.
TabStopafter(double position)
           Gets a first tab stop to the right of the specified position.
TabStopbefore(double position)
           Gets a first tab stop to the left of the specified position.
voidclear()
           Deletes all tab stop positions.
voidcollapse(Aspose.Words.IExpandableAttr parentAttr)
          Reserved for internal use.
com.aspose.words.IComplexAttrdeepCloneComplexAttr()
          Reserved for internal use.
booleanequals(Aspose.Words.IEquatableAttr rhs)
          Reserved for internal use.
Aspose.Words.IExpandableAttrexpand(Aspose.Words.IExpandableAttr parentAttr)
          Reserved for internal use.
intgetIndexByPosition(double position)
           Gets the index of a tab stop with the specified position in points.
doublegetPositionByIndex(int index)
           Gets the position (in points) of the tab stop at the specified index.
booleanisInherited()
          Reserved for internal use.
voidremoveByIndex(int index)
           Removes a tab stop at the specified index from the collection.
voidremoveByPosition(double position)
           Removes a tab stop at the specified position from the collection.
 

Property Getters/Setters Detail

getCount

public int getCount()
Gets the number of tab stops in the collection.

get

public TabStop get(int index)
Gets a tab stop at the given index.
Parameters:
index - An index into the collection of tab stops.

get

public TabStop get(double position)
Gets a tab stop at the specified position. Returns null if no tab stop is found at the specified position.
Parameters:
position - The position (in points) of the tab stop.

Method Detail

clear

public void clear()
Deletes all tab stop positions.

getPositionByIndex

public double getPositionByIndex(int index)
Gets the position (in points) of the tab stop at the specified index.
Parameters:
index - An index into the collection of tab stops.
Returns:
The position of the tab stop.

getIndexByPosition

public int getIndexByPosition(double position)
Gets the index of a tab stop with the specified position in points.

add

public void add(TabStop tabStop)
Adds or replaces a tab stop in the collection.

If a tab stop already exists at the specified position, it is replaced.

Parameters:
tabStop - A tab stop object to add.

add

public void add(double position, int alignment, int leader)
Adds or replaces a tab stop in the collection.

If a tab stop already exists at the specified position, it is replaced.

Parameters:
position - A position (in points) where to add the tab stop.
alignment - A TabAlignment value that specifies the alignment of text at the tab stop.
leader - A TabLeader value that specifies the type of the leader line displayed under the tab character.

removeByPosition

public void removeByPosition(double position)
Removes a tab stop at the specified position from the collection.
Parameters:
position - The position (in points) of the tab stop to remove.

removeByIndex

public void removeByIndex(int index)
Removes a tab stop at the specified index from the collection.
Parameters:
index - An index into the collection of tab stops.

after

public TabStop after(double position)
Gets a first tab stop to the right of the specified position.

Skips tab stops with Alignment set to TabAlignment.Bar.

Parameters:
position - The reference position (in points).
Returns:
A tab stop object or null if a suitable tab stop was not found.

before

public TabStop before(double position)
Gets a first tab stop to the left of the specified position.

Skips tab stops with Alignment set to TabAlignment.Bar.

Parameters:
position - The reference position (in points).
Returns:
A tab stop object or null if a suitable tab stop was not found.

equals

public boolean equals(Aspose.Words.IEquatableAttr rhs)
Reserved for internal use.

isInherited

public boolean isInherited()
Reserved for internal use.

deepCloneComplexAttr

public com.aspose.words.IComplexAttr deepCloneComplexAttr()
                                 throws java.lang.Exception
Reserved for internal use.

expand

public Aspose.Words.IExpandableAttr expand(Aspose.Words.IExpandableAttr parentAttr)
                      throws java.lang.Exception
Reserved for internal use.

collapse

public void collapse(Aspose.Words.IExpandableAttr parentAttr)
Reserved for internal use.

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