Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public final class TabStop

  1. Object
  2. 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 positionThe distance from the paragraph’s left indent, in points.
public final String alignmentLEFT, CENTER, RIGHT or DECIMAL.
public final char leaderThe 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.

DECIMAL

public static final String DECIMAL = "decimal"
The first period of the text sits at the stop.

position

public final float position
The distance from the paragraph’s left indent, in points.

alignment

public final String alignment
LEFT, CENTER, RIGHT or DECIMAL.

leader

public final char leader
The 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

position float
points from the left indent, 0 to 2000
alignment String
LEFT, CENTER, RIGHT or DECIMAL; anything else is LEFT
leader char
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

o Object
the other object

Returns

true when equal

hashCode

public int hashCode()
A hash consistent with equals.

Returns

the hash