Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class TabStop
- Object
- TabStop
A tab stop: where the text after a tab character lines up.
A left stop starts the text at the stop, a right stop ends it there, a center stop centers it on the stop and a decimal stop lines the first period up with it. The leader fills the gap the tab leaves, as in a table of contents.
Fields
public static final String LEFT = "left" | Text starts at the stop. |
public static final String CENTER = "center" | Text is centered on the stop. |
public static final String RIGHT = "right" | Text ends at the stop. |
public static final String DECIMAL = "decimal" | The first period of the text sits at the stop. |
public final float position | The distance from the paragraph’s left indent, in points. |
public final String alignment | LEFT, CENTER, RIGHT or DECIMAL. |
public final char leader | The character repeated across the gap: a period, a hyphen, an underscore, or 0 for none. |
Constructors
public TabStop(float position, String alignment, char leader) | Creates a stop. |
Methods
public boolean equals(Object o) | Two stops are equal when their position, alignment and leader are. |
public int hashCode() | A hash consistent with equals. |
Inherited methods
Field details
LEFT
public static final String LEFT = "left"Text starts at the stop.
CENTER
public static final String CENTER = "center"Text is centered on the stop.
RIGHT
public static final String RIGHT = "right"Text ends at the stop.
DECIMAL
public static final String DECIMAL = "decimal"The first period of the text sits at the stop.
position
public final float positionThe distance from the paragraph’s left indent, in points.
alignment
public final String alignmentLEFT, CENTER, RIGHT or DECIMAL.leader
public final char leaderThe character repeated across the gap: a period, a hyphen, an underscore, or 0 for
none.
Constructor details
TabStop
public TabStop(float position, String alignment, char leader)Creates a stop.
Parameters
positionfloat- points from the left indent, 0 to 2000
alignmentStringLEFT,CENTER,RIGHTorDECIMAL; anything else isLEFTleaderchar- a period, hyphen or underscore, or 0 for none; anything else is none
Method details
equals
public boolean equals(Object o)Two stops are equal when their position, alignment and leader are.
Parameters
oObject- the other object
Returns
true when equal
hashCode
public int hashCode()A hash consistent with
equals.Returns
the hash