Package javafx.animation

Examples of javafx.animation.KeyValue


          item.scaleXProperty().set(newScale);
          item.scaleYProperty().set(newScale);
          item.angle.set(newAngle);
        } else {
            keyFrames.add(new KeyFrame(duration,
                    new KeyValue(item.translateXProperty(), newX, INTERPOLATOR),
                    new KeyValue(item.scaleXProperty(), newScale, INTERPOLATOR),
                    new KeyValue(item.scaleYProperty(), newScale, INTERPOLATOR),
                    new KeyValue(item.angle, newAngle, INTERPOLATOR)));
        }
    }
View Full Code Here


    void animate(double toValue){
        Timeline timeline = new Timeline();
        timeline.getKeyFrames().add(
                new KeyFrame(Duration.seconds(1),
                        new KeyValue(getMaxHeightProperty(), toValue)));
        timeline.playFromStart();
    }
View Full Code Here

    long startTimeMs = annimation.startTime-minTime;
    long endTimeMs = annimation.endTime-minTime;
   
    final Node node = annimation.createVisualRepresentation();
   
    KeyValue keyValueStartX = new KeyValue(node.translateXProperty(), annimation.startx);
    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);
          }
            },new KeyValue(node.opacityProperty(), 0));
   
   
    keyFrames.add(keyFrame1);
    keyFrames.add(keyFrame2);
    keyFrames.add(keyFrame3);
View Full Code Here

        super(
            node,
            TimelineBuilder.create()
                .keyFrames(
                    new KeyFrame(Duration.millis(0),   
                        new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                        new KeyValue(node.rotateProperty(), -200, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(1000),   
                        new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                        new KeyValue(node.rotateProperty(), 0, WEB_EASE)
                    )
                )
                .build());
        setCycleDuration(Duration.seconds(1));
        setDelay(Duration.seconds(0.2));
View Full Code Here

    @Override protected void starting() {
        double endY = node.getScene().getHeight() - node.localToScene(0, 0).getY();
        timeline = TimelineBuilder.create()
                .keyFrames(
                    new KeyFrame(Duration.millis(0),   
                        new KeyValue(node.translateYProperty(), 0, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(200),   
                        new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                        new KeyValue(node.translateYProperty(), -20, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(1000),   
                        new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                        new KeyValue(node.translateYProperty(), endY, WEB_EASE)
                    )
                )
                .build();
        super.starting();
    }
View Full Code Here

    @Override protected void starting() {
        super.starting();
        timeline = TimelineBuilder.create()
            .keyFrames(
                new KeyFrame(Duration.millis(0),   
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                    new KeyValue(node.translateXProperty(), 0, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000),   
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                    new KeyValue(node.translateXProperty(), node.getBoundsInLocal().getWidth(), WEB_EASE),
                    new KeyValue(node.rotateProperty(), 120, WEB_EASE)
                )
            )
            .build();
    }
View Full Code Here

        super(
            node,
            TimelineBuilder.create()
                .keyFrames(
                    new KeyFrame(Duration.millis(0),   
                        new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                        new KeyValue(node.translateXProperty(), -20, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(1000),   
                        new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                        new KeyValue(node.translateXProperty(), 0, WEB_EASE)
                    )
                )
                .build()
            );
        setCycleDuration(Duration.seconds(1));
View Full Code Here

        super(
            node,
            TimelineBuilder.create()
                .keyFrames(
                    new KeyFrame(Duration.millis(0),   
                        new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                        new KeyValue(node.scaleXProperty(), 0.3, WEB_EASE),
                        new KeyValue(node.scaleYProperty(), 0.3, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(500),   
                        new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                        new KeyValue(node.scaleXProperty(), 1.05, WEB_EASE),
                        new KeyValue(node.scaleYProperty(), 1.05, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(700),   
                        new KeyValue(node.scaleXProperty(), 0.9, WEB_EASE),
                        new KeyValue(node.scaleYProperty(), 0.9, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(1000),   
                        new KeyValue(node.scaleXProperty(), 1, WEB_EASE),
                        new KeyValue(node.scaleYProperty(), 1, WEB_EASE)
                    )
                )
                .build(),
            false
        );
View Full Code Here

        super(
            node,
            TimelineBuilder.create()
                .keyFrames(
                    new KeyFrame(Duration.millis(0),
                        new KeyValue(node.rotateProperty(), -90, WEB_EASE),
                        new KeyValue(node.opacityProperty(), 0, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(400),
                        new KeyValue(node.rotateProperty(), 10, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(700),
                        new KeyValue(node.rotateProperty(), -10, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(1000),
                        new KeyValue(node.rotateProperty(), 0, WEB_EASE),
                        new KeyValue(node.opacityProperty(), 1, WEB_EASE)
                    )
                )
                .build()
            );
        setCycleDuration(Duration.seconds(1));
View Full Code Here

    @Override protected void starting() {
        double startY = node.getScene().getHeight() - node.localToScene(0, 0).getY();
        timeline = TimelineBuilder.create()
                .keyFrames(
                    new KeyFrame(Duration.millis(0),   
                        new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                        new KeyValue(node.translateYProperty(), startY, WEB_EASE)
                    ),
                    new KeyFrame(Duration.millis(1000),   
                        new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                        new KeyValue(node.translateYProperty(), 0, WEB_EASE)
                    )
                )
                .build();
        super.starting();
    }
View Full Code Here

TOP

Related Classes of javafx.animation.KeyValue

Copyright © 2018 www.massapicom. 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.