Package javafx.animation

Examples of javafx.animation.KeyFrame


        targetAngle        = clamp(180 - getSkinnable().getStartAngle(), 180 - getSkinnable().getStartAngle() + getSkinnable().getAngleRange(), targetAngle);
       
        if (getSkinnable().isAnimated()) {
            timeline.stop();           
            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



    // ******************** Drawing related ***********************************
    private void moveMinutePointer(double newAngle) {
        final KeyValue kv = new KeyValue(currentMinuteAngle, newAngle, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
        final KeyFrame kf = new KeyFrame(Duration.millis(200), kv);
        timeline = new Timeline();
        timeline.getKeyFrames().add(kf);
        timeline.play();
    }
View Full Code Here

        if (nextSelectionIndex >= selectedSet.size()) {
            nextSelectionIndex = 0;
        }
        //keyValueFlap = new KeyValue(rotateFlap.angleProperty(), 180, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
        keyValueFlap = new KeyValue(rotateFlap.angleProperty(), 180, Interpolator.EASE_IN);
        keyFrame     = new KeyFrame(Duration.millis(getSkinnable().getFlipTime()), keyValueFlap);
        timeline.getKeyFrames().setAll(keyFrame);
        timeline.play();
    }
View Full Code Here

    }
    public void flipBackward() {
        timeline.stop();
        //keyValueFlap = new KeyValue(rotateFlap.angleProperty(), -180, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
        keyValueFlap = new KeyValue(rotateFlap.angleProperty(), -180, Interpolator.EASE_IN);
        keyFrame     = new KeyFrame(Duration.millis(getSkinnable().getFlipTime()), keyValueFlap);
        timeline.getKeyFrames().setAll(keyFrame);
        timeline.play();
    }
View Full Code Here

        LOGGER.log(Level.INFO, "connectTest()");
        if (testTimeline != null) {
            testTimeline.stop();
        }
        reset();
        testTimeline = new Timeline(new KeyFrame(Duration.seconds(1), (ActionEvent event) -> {
            setOnAllPins();
        }), new KeyFrame(Duration.seconds(0.1), (ActionEvent event) -> {
            setAllPinsLow();
        }));
        testTimeline.play();
    }
View Full Code Here

    }

    public void test(double millis) {
        LOGGER.log(Level.INFO, "test()");
        reset();
        testTimeline = new Timeline(new KeyFrame(Duration.millis(millis), (ActionEvent event) -> {
            gpio0StateProperty.setValue(Boolean.TRUE);
        }), new KeyFrame(Duration.millis(millis * 2), (ActionEvent event) -> {
            gpio1StateProperty.setValue(Boolean.TRUE);
        }), new KeyFrame(Duration.millis(millis * 3), (ActionEvent event) -> {
            gpio2StateProperty.setValue(Boolean.TRUE);
        }), new KeyFrame(Duration.millis(millis * 4), (ActionEvent event) -> {
            gpio3StateProperty.setValue(Boolean.TRUE);
        }), new KeyFrame(Duration.millis(millis * 5), (ActionEvent event) -> {
            gpio4StateProperty.setValue(Boolean.TRUE);
        }), new KeyFrame(Duration.millis(millis * 6), (ActionEvent event) -> {
            gpio5StateProperty.setValue(Boolean.TRUE);
        }), new KeyFrame(Duration.millis(millis * 7), (ActionEvent event) -> {
            gpio6StateProperty.setValue(Boolean.TRUE);
        }), new KeyFrame(Duration.millis(millis * 8), (ActionEvent event) -> {
            gpio7StateProperty.setValue(Boolean.TRUE);
        }));
        testTimeline.play();
    }
View Full Code Here

    }

    public void hide() {
        setCache(true);

        Timeline timeline = new Timeline(new KeyFrame(DURATION_HIDE, (ActionEvent t) -> {
            setCache(false);
            setVisible(false);
            getChildren().
                    clear();
        },
View Full Code Here

        dialogPane.toFront();
        setOpacity(0);
        setCache(true);
        setVisible(true);

        Timeline timeline = new Timeline(new KeyFrame(DURATION_SHOW, (ActionEvent t) -> {
            setCache(false);
        },new KeyValue(opacityProperty(), 1, Interpolator.EASE_BOTH)));

        timeline.play();
    }
View Full Code Here

        });
    }

    public void startUpdateTimer() {
        stopUpdateTimer();
        updateTimer = new Timeline(new KeyFrame(Duration.seconds(getUpdateTimerInterval()), (ActionEvent event) -> {
            refreshDomainState();
        }));
        updateTimer.setCycleCount(Timeline.INDEFINITE);
        updateTimer.play();
    }
View Full Code Here

        progressIndicator.visibleProperty().bind(service.runningProperty());
        taskList.itemsProperty().bind(service.valueProperty());

        service.start();

        Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(10), event -> service.restart()));
        timeline.setCycleCount(Timeline.INDEFINITE);
        timeline.play();
    }
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.