javax.swing.text
Class TabStop

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

public class TabStop
extends Object
implements Serializable

Represents a tab position in some text.

See Also:
Serialized Form

Field Summary
static int ALIGN_BAR
           
static int ALIGN_CENTER
           
static int ALIGN_DECIMAL
           
static int ALIGN_LEFT
           
static int ALIGN_RIGHT
           
static int LEAD_DOTS
           
static int LEAD_EQUALS
           
static int LEAD_HYPHENS
           
static int LEAD_NONE
           
static int LEAD_THICKLINE
           
static int LEAD_UNDERLINE
           
 
Constructor Summary
TabStop(float pos)
          Creates a new TabStop for the specified tab position.
TabStop(float pos, int align, int leader)
          Creates a new TabStop with the specified attributes.
 
Method Summary
 boolean equals(Object other)
          Tests this TabStop for equality with an arbitrary object.
 int getAlignment()
          Returns the tab alignment.
 int getLeader()
          Returns the leader type.
 float getPosition()
          Returns the tab position.
 int hashCode()
          Returns a hash code for this TabStop.
 String toString()
          Returns a string describing this TabStop.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ALIGN_LEFT

public static final int ALIGN_LEFT
See Also:
Constant Field Values

ALIGN_RIGHT

public static final int ALIGN_RIGHT
See Also:
Constant Field Values

ALIGN_CENTER

public static final int ALIGN_CENTER
See Also:
Constant Field Values

ALIGN_DECIMAL

public static final int ALIGN_DECIMAL
See Also:
Constant Field Values

ALIGN_BAR

public static final int ALIGN_BAR
See Also:
Constant Field Values

LEAD_NONE

public static final int LEAD_NONE
See Also:
Constant Field Values

LEAD_DOTS

public static final int LEAD_DOTS
See Also:
Constant Field Values

LEAD_HYPHENS

public static final int LEAD_HYPHENS
See Also:
Constant Field Values

LEAD_UNDERLINE

public static final int LEAD_UNDERLINE
See Also:
Constant Field Values

LEAD_THICKLINE

public static final int LEAD_THICKLINE
See Also:
Constant Field Values

LEAD_EQUALS

public static final int LEAD_EQUALS
See Also:
Constant Field Values
Constructor Detail

TabStop

public TabStop(float pos)
Creates a new TabStop for the specified tab position.

Parameters:
pos - the tab position.

TabStop

public TabStop(float pos,
               int align,
               int leader)
Creates a new TabStop with the specified attributes.

Parameters:
pos - the tab position.
align - the alignment (one of ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT, ALIGN_DECIMAL or ALIGN_BAR).
leader - the leader (one of LEAD_NONE, LEAD_DOTS, LEAD_EQUALS, LEAD_HYPHENS, LEAD_THICKLINE or LEAD_UNDERLINE).
Method Detail

equals

public boolean equals(Object other)
Tests this TabStop for equality with an arbitrary object.

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

getAlignment

public int getAlignment()
Returns the tab alignment. This should be one of ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT, ALIGN_DECIMAL or ALIGN_BAR.

Returns:
The tab alignment.

getLeader

public int getLeader()
Returns the leader type. This should be one of LEAD_NONE, LEAD_DOTS, LEAD_EQUALS, LEAD_HYPHENS, LEAD_THICKLINE or LEAD_UNDERLINE.

Returns:
The leader type.

getPosition

public float getPosition()
Returns the tab position.

Returns:
The tab position.

hashCode

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

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

toString

public String toString()
Returns a string describing this TabStop.

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