Examples of impl_hitTestChar()


Examples of javafx.scene.text.Text.impl_hitTestChar()

          // Calculate to text flow
          p = p.subtract(flow.getLayoutX(), flow.getLayoutY());
          for( Node n : flow.getChildren() ) {
            Text text = (Text) n;
            if( text.getBoundsInParent().contains(p) ) {
              HitInfo info = text.impl_hitTestChar(new Point2D(p.getX()-text.getLayoutX(), 0 /* See RT-28485 text.getLayoutY()*/));
              if( info.getInsertionIndex() >= 0 ) {
//                System.err.println("Text: " + text.getText());
//                System.err.println("Text-Offset: " + text.getUserData());
//                System.err.println("INSERT INDEX: " + info.getInsertionIndex());
                int offset = ((Integer)text.getUserData()).intValue()+info.getInsertionIndex();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.