Top Description Fields Constructors Methods
javafx.scene.text

public Class HitInfo

extends Object
Class Inheritance

Represents the hit information in a Text node.
Since
9

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
HitInfo(int
the character index.
charIndex
,
int insertionIndex, boolean
whether the hit is on the leading edge of the character. If it is false, it represents the trailing edge.
leading
)

Create a HitInfo object representing a text index and forward bias.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the index of the character which this hit information refers to
getCharIndex
()

The index of the character which this hit information refers to.

public int

Returns:

the index of the insertion position
getInsertionIndex
()

Returns the index of the insertion position.

public boolean

Returns:

if true the hit is on the leading edge of the character, otherwise the trailing edge
isLeading
()

Indicates whether the hit is on the leading edge of the character.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

charIndexback to summary
private final int charIndex
insertionIndexback to summary
private final int insertionIndex
leadingback to summary
private final boolean leading

Constructor Detail

HitInfoback to summary
pack-priv HitInfo(int charIndex, int insertionIndex, boolean leading)

Create a HitInfo object representing a text index and forward bias.

Parameters
charIndex:int

the character index.

leading:boolean

whether the hit is on the leading edge of the character. If it is false, it represents the trailing edge.

Method Detail

getCharIndexback to summary
public int getCharIndex()

The index of the character which this hit information refers to.

Returns:int

the index of the character which this hit information refers to

getInsertionIndexback to summary
public int getInsertionIndex()

Returns the index of the insertion position.

Returns:int

the index of the insertion position

isLeadingback to summary
public boolean isLeading()

Indicates whether the hit is on the leading edge of the character. If it is false, it represents the trailing edge.

Returns:boolean

if true the hit is on the leading edge of the character, otherwise the trailing edge

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override