KeyValue keyValueStartY = new KeyValue(node.translateYProperty(), annimation.starty);
KeyValue keyValueEndX = new KeyValue(node.translateXProperty(),annimation.endx);
KeyValue keyValueEndY = new KeyValue(node.translateYProperty(), annimation.endy);
KeyFrame keyFrame1 = new KeyFrame(Duration.millis(startTimeMs),
new EventHandler<ActionEvent>(){
@Override
public void handle(ActionEvent event) {
animationPane.getChildren().add(node);
}
},new KeyValue(node.opacityProperty(), 0));
KeyFrame keyFrame2 = new KeyFrame(Duration.millis(startTimeMs), keyValueStartX, keyValueStartY);
KeyFrame keyFrame3 = new KeyFrame(Duration.millis(startTimeMs+FADEDURATION),new KeyValue(node.opacityProperty(), 1));
KeyFrame keyFrame4 = new KeyFrame(Duration.millis(startTimeMs+FADEDURATION), keyValueStartX, keyValueStartY);
KeyFrame keyFrame5 = new KeyFrame(Duration.millis(endTimeMs-FADEDURATION),keyValueEndX,keyValueEndY);
KeyFrame keyFrame6 = new KeyFrame(Duration.millis(endTimeMs-FADEDURATION), new KeyValue(node.opacityProperty(), 1));
KeyFrame keyFrame7 = new KeyFrame(Duration.millis(endTimeMs),
new EventHandler<ActionEvent>(){
@Override
public void handle(ActionEvent event) {
animationPane.getChildren().remove(node);
}