Module javafx.graphics
Package javafx.scene.text

Class HitInfo



  • public classHitInfoextendsObject
    Represents the hit information in a Text node.
    Since:
    9
    • Method Detail

      • getCharIndex

        public int getCharIndex()
        The index of the character which this hit information refers to.
      • isLeading

        public boolean isLeading()
        Indicates whether the hit is on the leading edge of the character. If it is false, it represents the trailing edge.
      • getInsertionIndex

        public int getInsertionIndex()
        Returns the index of the insertion position.
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string representation of the object. In general, thetoString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

        ThetoString method for classObject returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

         getClass().getName() + '@' + Integer.toHexString(hashCode())
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.