javax.swing.text

Class TabStop

public class TabStop extends Object implements Serializable

Represents a tab position in some text.
Field Summary
static intALIGN_BAR
static intALIGN_CENTER
static intALIGN_DECIMAL
static intALIGN_LEFT
static intALIGN_RIGHT
static intLEAD_DOTS
static intLEAD_EQUALS
static intLEAD_HYPHENS
static intLEAD_NONE
static intLEAD_THICKLINE
static intLEAD_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
booleanequals(Object other)
Tests this TabStop for equality with an arbitrary object.
intgetAlignment()
Returns the tab alignment.
intgetLeader()
Returns the leader type.
floatgetPosition()
Returns the tab position.
inthashCode()
Returns a hash code for this TabStop.
StringtoString()
Returns a string describing this TabStop.

Field Detail

ALIGN_BAR

public static final int ALIGN_BAR

ALIGN_CENTER

public static final int ALIGN_CENTER

ALIGN_DECIMAL

public static final int ALIGN_DECIMAL

ALIGN_LEFT

public static final int ALIGN_LEFT

ALIGN_RIGHT

public static final int ALIGN_RIGHT

LEAD_DOTS

public static final int LEAD_DOTS

LEAD_EQUALS

public static final int LEAD_EQUALS

LEAD_HYPHENS

public static final int LEAD_HYPHENS

LEAD_NONE

public static final int LEAD_NONE

LEAD_THICKLINE

public static final int LEAD_THICKLINE

LEAD_UNDERLINE

public static final int LEAD_UNDERLINE

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 {@link #ALIGN_LEFT}, {@link #ALIGN_CENTER}, {@link #ALIGN_RIGHT}, {@link #ALIGN_DECIMAL} or {@link #ALIGN_BAR}). leader the leader (one of {@link #LEAD_NONE}, {@link #LEAD_DOTS}, {@link #LEAD_EQUALS}, {@link #LEAD_HYPHENS}, {@link #LEAD_THICKLINE} or {@link #LEAD_UNDERLINE}).

Method Detail

equals

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

Parameters: other the other object (null permitted).

Returns: true if this TabStop is equal to the specified object, and false otherwise.

getAlignment

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

Returns: The tab alignment.

getLeader

public int getLeader()
Returns the leader type. This should be one of {@link #LEAD_NONE}, {@link #LEAD_DOTS}, {@link #LEAD_EQUALS}, {@link #LEAD_HYPHENS}, {@link #LEAD_THICKLINE} or {@link #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.

Returns: A hash code.

toString

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

Returns: A string describing this TabStop.