public class TabStopCollection extends InternableComplexAttr implements java.lang.Cloneable
TabStop objects that represent custom tabs for a paragraph or a style.
To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article.
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 combination 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.
| Modifier and Type | Method and Description |
|---|---|
void |
add(double position,
int alignment,
int leader) |
void |
add(TabStop tabStop)
Adds or replaces a tab stop in the collection.
|
TabStop |
after(double position)
Gets a first tab stop to the right of the specified position.
|
TabStop |
before(double position)
Gets a first tab stop to the left of the specified position.
|
void |
clear()
Deletes all tab stop positions.
|
boolean |
equals(java.lang.Object obj)
Determines whether the specified object is equal in value to the current object.
|
boolean |
equals(TabStopCollection rhs)
Determines whether the specified TabStopCollection is equal in value to the current TabStopCollection.
|
TabStop |
get(double position)
Gets a tab stop at the specified position.
|
TabStop |
get(int index)
|
int |
getCount()
Gets the number of tab stops in the collection.
|
int |
getIndexByPosition(double position)
Gets the index of a tab stop with the specified position in points.
|
double |
getPositionByIndex(int index)
Gets the position (in points) of the tab stop at the specified index.
|
int |
hashCode() |
boolean |
isInheritedComplexAttr() |
protected java.lang.Object |
memberwiseClone() |
void |
removeByIndex(int index)
Removes a tab stop at the specified index from the collection.
|
void |
removeByPosition(double position)
Removes a tab stop at the specified position from the collection.
|
notifyChangingpublic boolean equals(TabStopCollection rhs)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int getCount()
public TabStop get(int index)
index - An index into the collection of tab stops.TabStop value.public TabStop get(double position)
position - The position (in points) of the tab stop.public void clear()
public double getPositionByIndex(int index)
index - An index into the collection of tab stops.public int getIndexByPosition(double position)
public void add(TabStop tabStop)
If a tab stop already exists at the specified position, it is replaced.
tabStop - A tab stop object to add.public void add(double position,
int alignment,
int leader)
public void removeByPosition(double position)
position - The position (in points) of the tab stop to remove.public void removeByIndex(int index)
index - An index into the collection of tab stops.public TabStop after(double position)
Skips tab stops with Alignment set to TabAlignment.Bar.
position - The reference position (in points).public TabStop before(double position)
Skips tab stops with Alignment set to TabAlignment.Bar.
position - The reference position (in points).public boolean isInheritedComplexAttr()
protected java.lang.Object memberwiseClone()