public class TextHit
extends java.lang.Object
TextSpanLayout
instance.TextSpanLayout
Constructor and Description |
---|
TextHit(int charIndex,
boolean leadingEdge)
Constructs a TextHit with the specified values.
|
Modifier and Type | Method and Description |
---|---|
int |
getCharIndex()
Returns the index of the character that has been hit.
|
boolean |
isLeadingEdge()
Returns whether on not the character has been hit on its leading edge.
|
public TextHit(int charIndex, boolean leadingEdge)
charIndex
- The index of the character that has been
hit. In the case of bidirectional text this will be the logical
character index not the visual index. The index is relative to
whole text within the selected TextNode.leadingEdge
- Indicates which side of the character has
been hit.public int getCharIndex()
public boolean isLeadingEdge()
Copyright © 2022 Apache Software Foundation. All Rights Reserved.