Skip to main content

TextRange Class

A text range that specifies the position and length of a text fragment in a text run.

Declaration

public final class TextRange extends Struct<TextRange>

Inherited Members

com.devexpress.system.Struct.equals(java.lang.Object)
com.devexpress.system.Struct.getHashCode()
com.devexpress.system.Struct.hashCode()
java.lang.Object.clone()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.toString()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
com.devexpress.system.Struct
TextRange

Constructors

TextRange() Constructor

Initializes a new instance of the TextRange class.

Declaration

public TextRange()

TextRange(int start, int length) Constructor

Initializes a new instance of the TextRange class with specified settings.

Declaration

public TextRange(int start, int length)

Parameters

Name Type Description
start int

The zero-based index of the first character in the text range.

length int

The number of characters in the text range.

Methods

equals(Object obj) Method

Determines whether the specified object is equal to this text range.

Declaration

public boolean equals(Object obj)

Parameters

Name Type Description
obj Object

The object to compare with this text range.

Returns

Type Description
boolean

true if the specified object is equal to this text range; otherwise, false.

getLength() Method

Returns the length of a text range.

Declaration

public int getLength()

Returns

Type Description
int

The number of characters in the text range.

getStart() Method

Returns the position of the first character in a text range.

Declaration

public int getStart()

Returns

Type Description
int

The zero-based index of the first character in the text range.

hashCode() Method

Returns a hash code value for this text range.

Declaration

public int hashCode()

Returns

Type Description
int

A hash code value for this text range.