Example usage for java.awt.font TextHitInfo isLeadingEdge

List of usage examples for java.awt.font TextHitInfo isLeadingEdge

Introduction

In this page you can find the example usage for java.awt.font TextHitInfo isLeadingEdge.

Prototype

boolean isLeadingEdge

To view the source code for java.awt.font TextHitInfo isLeadingEdge.

Click Source Link

Usage

From source file:MainClass.java

public MyCanvas() {
    addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent me) {
            TextHitInfo hit = mTextLayout.hitTestChar(me.getX() - mX, me.getY() - mY);
            System.out.println(hit.getCharIndex());
            System.out.println(hit.getInsertionIndex());
            System.out.println(hit.isLeadingEdge());
        }/* www . j  ava2s .c om*/
    });

}