Package javafx.geometry

Examples of javafx.geometry.Point2D.subtract()


    Point2D p = new Point2D(event.getX(), event.getY());
    for( LineCell cell : visibleCells ) {
      if( cell.getBoundsInParent().contains(p) ) {
        if( cell.getDomainElement() != null ) {
          // Calculate to cell relative
          p = p.subtract(cell.getLayoutX(), cell.getLayoutY());
          Region g = (Region) cell.getGraphic();
          p = p.subtract(g.getLayoutX(), g.getLayoutY());
         
          TextFlow flow = (TextFlow) g.getChildrenUnmodifiable().get(0);
          // Calculate to text flow
View Full Code Here


      if( cell.getBoundsInParent().contains(p) ) {
        if( cell.getDomainElement() != null ) {
          // Calculate to cell relative
          p = p.subtract(cell.getLayoutX(), cell.getLayoutY());
          Region g = (Region) cell.getGraphic();
          p = p.subtract(g.getLayoutX(), g.getLayoutY());
         
          TextFlow flow = (TextFlow) g.getChildrenUnmodifiable().get(0);
          // Calculate to text flow
          p = p.subtract(flow.getLayoutX(), flow.getLayoutY());
          for( Node n : flow.getChildren() ) {
View Full Code Here

          Region g = (Region) cell.getGraphic();
          p = p.subtract(g.getLayoutX(), g.getLayoutY());
         
          TextFlow flow = (TextFlow) g.getChildrenUnmodifiable().get(0);
          // 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 ) {
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.