javax.swing.text
Class TabSet

java.lang.Object
  extended by javax.swing.text.TabSet
All Implemented Interfaces:
Serializable

public class TabSet
extends Object
implements Serializable

A set of tab stops. Instances of this class are immutable.

See Also:
Serialized Form

Constructor Summary
TabSet(TabStop[] t)
          Creates a new TabSet containing the specified tab stops.
 
Method Summary
 boolean equals(Object obj)
          Tests this TabSet for equality with an arbitrary object.
 TabStop getTab(int i)
          Returns the tab stop with the specified index.
 TabStop getTabAfter(float location)
          Returns the tab following the specified location.
 int getTabCount()
          Returns the number of tab stops in this tab set.
 int getTabIndex(TabStop tab)
          Returns the index of the specified tab, or -1 if the tab is not found.
 int getTabIndexAfter(float location)
          Returns the index of the tab at or after the specified location.
 int hashCode()
          Returns a hash code for this TabSet.
 String toString()
          Returns a string representation of this TabSet.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TabSet

public TabSet(TabStop[] t)
Creates a new TabSet containing the specified tab stops.

Parameters:
t - the tab stops (null permitted).
Method Detail

getTab

public TabStop getTab(int i)
Returns the tab stop with the specified index.

Parameters:
i - the index.
Returns:
The tab stop.
Throws:
IllegalArgumentException - if i is not in the range 0 to getTabCount() - 1.

getTabAfter

public TabStop getTabAfter(float location)
Returns the tab following the specified location.

Parameters:
location - the location.
Returns:
The tab following the specified location (or null).

getTabCount

public int getTabCount()
Returns the number of tab stops in this tab set.

Returns:
The number of tab stops in this tab set.

getTabIndex

public int getTabIndex(TabStop tab)
Returns the index of the specified tab, or -1 if the tab is not found.

Parameters:
tab - the tab (null permitted).
Returns:
The index of the specified tab, or -1.

getTabIndexAfter

public int getTabIndexAfter(float location)
Returns the index of the tab at or after the specified location.

Parameters:
location - the tab location.
Returns:
The index of the tab stop, or -1.

equals

public boolean equals(Object obj)
Tests this TabSet for equality with an arbitrary object.

Overrides:
equals in class Object
Parameters:
obj - the object (null permitted).
Returns:
true if this TabSet is equal to obj, and false otherwise.
Since:
1.5
See Also:
Object.hashCode()

hashCode

public int hashCode()
Returns a hash code for this TabSet.

Overrides:
hashCode in class Object
Returns:
A hash code.
Since:
1.5
See Also:
Object.equals(Object), System.identityHashCode(Object)

toString

public String toString()
Returns a string representation of this TabSet.

Overrides:
toString in class Object
Returns:
A string representation of this TabSet.
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)