Package javafx.animation

Examples of javafx.animation.KeyFrame


                        .toY(1)
                        .build(),
                TimelineBuilder.create()
                        .delay(Duration.millis(200))
                        .keyFrames(
                                new KeyFrame(Duration.millis(0), new KeyValue(this.rectangle.widthProperty(), 0)),
                                new KeyFrame(Duration.millis(600), new KeyValue(this.rectangle.widthProperty(), 90))
                        )
                        .build(),
                ParallelTransitionBuilder
                        .create().delay(Duration.millis(400))
                        .children(
View Full Code Here


                                                .toY(-700)
                                                // .fromZ(-10)
                                                .build(),
                                        TimelineBuilder.create()
                                                .keyFrames(
                                                        new KeyFrame(Duration.millis(0), new KeyValue(this.currentSubSlide.visibleProperty(), true)),
                                                        new KeyFrame(Duration.millis(1), new KeyValue(this.currentSubSlide.visibleProperty(), false))
                                                )
                                                .build()
                                )

                                .build(),
                        SequentialTransitionBuilder.create()
                                .node(nextSlide)
                                .children(
                                        TimelineBuilder.create()
                                                .keyFrames(
                                                        new KeyFrame(Duration.millis(0), new KeyValue(nextSlide.visibleProperty(), false)),
                                                        new KeyFrame(Duration.millis(1), new KeyValue(nextSlide.visibleProperty(), true))
                                                )
                                                .build(),
                                        TranslateTransitionBuilder.create()
                                                .duration(Duration.millis(400))
                                                .fromY(700)
View Full Code Here

    }

    long startTime;
    public void start() {
        if (timeline == null) {
            KeyFrame kf = new KeyFrame(duration == INDEFINITE ? Duration.millis(Double.MAX_VALUE) : Duration.millis(duration), new KeyValue(value, 1));
            if (resolution > 0) {
                double framerate = 1000d / resolution;
                timeline = new Timeline(framerate, kf);
            } else {
                timeline = new Timeline(kf);
View Full Code Here

            if (storeOldHeight) {
                oldHeight = control.getPrefHeight();
            }

            minimizeTimeLine = new Timeline(
                    new KeyFrame(Duration.ZERO,
                    new KeyValue(control.prefHeightProperty(), control.getPrefHeight())),
                    new KeyFrame(Duration.seconds(0.2),
                    new KeyValue(control.prefHeightProperty(), newHeight)));

            minimizeTimeLine.statusProperty().addListener(
                    (ObservableValue<? extends Status> ov2, Status oldStatus, Status newStatus) -> {
                        if (newStatus == Status.STOPPED) {
View Full Code Here

        KeyValue kvO4  = new KeyValue(NODE.opacityProperty(), 1.0, Interpolator.EASE_OUT);

        KeyValue kvX5  = new KeyValue(NODE.translateXProperty(), X);
        KeyValue kvY5  = new KeyValue(NODE.translateYProperty(), Y);

        KeyFrame kfO1  = new KeyFrame(Duration.millis(0), kvX1, kvY1, kvR1, kvO1);
        KeyFrame kfO2  = new KeyFrame(Duration.millis(50 + DELAY), kvX2, kvY2);
        KeyFrame kfO3  = new KeyFrame(Duration.millis(250 + DELAY), kvX3, kvY3);
        KeyFrame kfO4  = new KeyFrame(Duration.millis(400 + DELAY), kvX4, kvY4, kvRO4, kvO4);
        KeyFrame kfO5  = new KeyFrame(Duration.millis(550 + DELAY), kvX5, kvY5);

        return new Timeline(kfO1, kfO2, kfO3, kfO4, kfO5);
    }
View Full Code Here

        KeyValue kvR5  = new KeyValue(NODE.rotateProperty(), 0, Interpolator.EASE_OUT);
        KeyValue kvO5  = new KeyValue(NODE.opacityProperty(), 0.5);

        KeyValue kvO6  = new KeyValue(NODE.opacityProperty(), 0);

        KeyFrame kfC1  = new KeyFrame(Duration.millis(0), kvX1, kvY1);
        KeyFrame kfC2  = new KeyFrame(Duration.millis(50 + DELAY), kvRC2);
        KeyFrame kfC3  = new KeyFrame(Duration.millis(250 + DELAY), kvX3, kvY3);
        KeyFrame kfC4  = new KeyFrame(Duration.millis(400 + DELAY), kvX4, kvY4);
        KeyFrame kfC5  = new KeyFrame(Duration.millis(550 + DELAY), kvX5, kvY5, kvR5, kvO5);
        KeyFrame kfC6  = new KeyFrame(Duration.millis(551 + DELAY), kvO6);

        return new Timeline(kfC1, kfC2, kfC3, kfC4, kfC5, kfC6);
    }
View Full Code Here

        KeyValue kvO4  = new KeyValue(NODE.opacityProperty(), 1.0, Interpolator.EASE_OUT);

        KeyValue kvX5  = new KeyValue(NODE.translateXProperty(), X);
        KeyValue kvY5  = new KeyValue(NODE.translateYProperty(), Y);

        KeyFrame kfO1  = new KeyFrame(Duration.millis(0), kvX1, kvY1, kvR1, kvO1);
        KeyFrame kfO2  = new KeyFrame(Duration.millis(50 + DELAY), kvX2, kvY2);
        KeyFrame kfO3  = new KeyFrame(Duration.millis(150 + DELAY), kvX3, kvY3);
        KeyFrame kfO4  = new KeyFrame(Duration.millis(300 + DELAY), kvX4, kvY4, kvRO4, kvO4);
        KeyFrame kfO5  = new KeyFrame(Duration.millis(400 + DELAY), kvX5, kvY5);

        return new Timeline(kfO1, kfO2, kfO3, kfO4, kfO5);
    }
View Full Code Here

        KeyValue kvR5  = new KeyValue(NODE.rotateProperty(), 0, Interpolator.EASE_OUT);
        KeyValue kvO5  = new KeyValue(NODE.opacityProperty(), 0.5);

        KeyValue kvO6  = new KeyValue(NODE.opacityProperty(), 0);

        KeyFrame kfC1  = new KeyFrame(Duration.millis(0), kvX1, kvY1);
        KeyFrame kfC2  = new KeyFrame(Duration.millis(50 + DELAY), kvRC2);
        KeyFrame kfC3  = new KeyFrame(Duration.millis(250 + DELAY), kvX3, kvY3);
        KeyFrame kfC4  = new KeyFrame(Duration.millis(400 + DELAY), kvX4, kvY4);
        KeyFrame kfC5  = new KeyFrame(Duration.millis(550 + DELAY), kvX5, kvY5, kvR5, kvO5);
        KeyFrame kfC6  = new KeyFrame(Duration.millis(551 + DELAY), kvO6);

        return new Timeline(kfC1, kfC2, kfC3, kfC4, kfC5, kfC6);
    }
View Full Code Here

        double targetAngle = getSkinnable().getValue() * angleStep;

        if (getSkinnable().isAnimated()) {
            timeline.stop();
            final KeyValue KEY_VALUE = new KeyValue(angle, targetAngle, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
            final KeyFrame KEY_FRAME = new KeyFrame(Duration.millis(getSkinnable().getAnimationDuration()), KEY_VALUE);
            timeline.getKeyFrames().setAll(KEY_FRAME);
            timeline.play();
        } else {
            angle.set(targetAngle);
        }
View Full Code Here

        if (getSkinnable().isAnimated()) {
            timeline.stop();
            //double animationDuration = (getSkinnable().getAnimationDuration() / (getSkinnable().getMaxValue() - getSkinnable().getMinValue())) * Math.abs(getSkinnable().getValue() - getSkinnable().getOldValue());
            final KeyValue KEY_VALUE = new KeyValue(needleRotate.angleProperty(), targetAngle, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
            final KeyFrame KEY_FRAME = new KeyFrame(Duration.millis(getSkinnable().getAnimationDuration()), KEY_VALUE);
            timeline.getKeyFrames().setAll(KEY_FRAME);
            timeline.play();
        } else {
            needleRotate.setAngle(targetAngle);
        }
View Full Code Here

TOP

Related Classes of javafx.animation.KeyFrame

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.