// as of JDK 1.6: @Override
 public int getScreenLocationY() {
   // this code is never called?
   Bounds lBoundsInScenenode = node.localToScene(node.getBoundsInLocal());
   int v =
       (int)
           Math.ceil(
               node.getScene().getY() + node.getScene().getY() + lBoundsInScenenode.getMinY());
   // for debugging System.out.println(getComponent() + " getScreenLocationX =" + v);
   return v;
 }
Esempio n. 2
0
  @Override
  protected Animation createAndPrepareAnimation(Node curNode, Node newNode) {
    newNode.setOpacity(1);

    double deltaX = -curNode.getBoundsInLocal().getWidth();
    newNode.setTranslateX(-deltaX);

    TranslateTransitionBuilder builder =
        TranslateTransitionBuilder.create()
            .interpolator(Interpolator.EASE_BOTH)
            .byX(deltaX)
            .duration(new Duration(1000));

    return ParallelTransitionBuilder.create()
        .children(builder.node(curNode).build(), builder.node(newNode).build())
        .build();
  }
Esempio n. 3
0
 /**
  * Retrieves the physical untransformed bounds (geom + effect + clip) of a Node before
  * transforming that to the node's Scene's coordinate system.
  */
 public static Bounds nodeBoundsInScene(Node node) {
   return node.localToScene(node.getBoundsInLocal());
 }
Esempio n. 4
0
 /** Retrieve the physical untransformed bounds (geom + effect + clip) of a Node. */
 public static Bounds nodeBoundsInLocal(Node node) {
   return node.getBoundsInLocal();
 }