javax.swing.text
public class TabStop extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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 . |
public static final int ALIGN_LEFT
public static final int ALIGN_RIGHT
public static final int ALIGN_CENTER
public static final int ALIGN_DECIMAL
public static final int ALIGN_BAR
public static final int LEAD_NONE
public static final int LEAD_DOTS
public static final int LEAD_HYPHENS
public static final int LEAD_UNDERLINE
public static final int LEAD_THICKLINE
public static final int LEAD_EQUALS
public TabStop(float pos)
TabStop
for the specified tab position.pos
- the tab position.public TabStop(float pos, int align, int leader)
TabStop
with the specified attributes.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
).public boolean equals(Object other)
TabStop
for equality with an arbitrary object.equals
in class Object
other
- the other object (null
permitted).true
if this TabStop
is equal to
the specified object, and false
otherwise.Object.hashCode()
public int getAlignment()
ALIGN_LEFT
,
ALIGN_CENTER
, ALIGN_RIGHT
, ALIGN_DECIMAL
or
ALIGN_BAR
.public int getLeader()
LEAD_NONE
,
LEAD_DOTS
, LEAD_EQUALS
, LEAD_HYPHENS
,
LEAD_THICKLINE
or LEAD_UNDERLINE
.public float getPosition()
public int hashCode()
TabStop
.hashCode
in class Object
Object.equals(Object)
,
System.identityHashCode(Object)
public String toString()
TabStop
.toString
in class Object
TabStop
.Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)