Package javafx.animation

Examples of javafx.animation.KeyValue


        timeline.play();
    }
    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


            setCache(false);
            setVisible(false);
            getChildren().
                    clear();
        },
                new KeyValue(opacityProperty(), 0, Interpolator.EASE_BOTH)));
        timeline.play();

    }
View Full Code Here

        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

    .node(this.itemGroup).duration(Duration.millis(400))
    .fromValue(0).toValue(1.0).build();
  anim.add(fade);

  final Animation offset = new Timeline(new KeyFrame(Duration.ZERO,
    new KeyValue(this.offsetProperty(), 0)), new KeyFrame(
    Duration.millis(300), new KeyValue(this.offsetProperty(),
      this.lastOffsetValue)));
  anim.add(offset);

  final Animation angle = new Timeline(new KeyFrame(Duration.ZERO,
    new KeyValue(this.initialAngleProperty(),
      this.lastInitialAngleValue + 20)), new KeyFrame(
    Duration.millis(300), new KeyValue(this.initialAngleProperty(),
      this.lastInitialAngleValue)));
  anim.add(angle);

  if (this.centerVisibility.get() == CenterVisibility.WITH_MENU) {
      final FadeTransition fadeCenter = FadeTransitionBuilder.create()
View Full Code Here

        init();
    }

    private void init() {
        // snap button back
        final KeyValue BUTTON_X_START = new KeyValue(endX, START_XCOORD);
        final KeyFrame LOCK_KEY_FRAME = new KeyFrame(Duration.millis(150), BUTTON_X_START);

        // make text more opaque
        final KeyValue TEXT_OPACITY_LOCK_KV = new KeyValue(textOpacity, 1);
        final KeyFrame TEXT_OPACITY_LOCK_KF = new KeyFrame(Duration.millis(150), TEXT_OPACITY_LOCK_KV);

        snapButtonBackAnim.getKeyFrames().addAll(LOCK_KEY_FRAME, TEXT_OPACITY_LOCK_KF);

        // move button to the right
        final KeyValue BUTTON_X_END     = new KeyValue(endX, END_XCOORD);
        final KeyFrame UNLOCK_KEY_FRAME = new KeyFrame(Duration.millis(1000), BUTTON_X_END);

        final KeyValue TEXT_OPACITY_UNLOCK_KV = new KeyValue(textOpacity, 0);
        final KeyFrame TEXT_OPACITY_UNLOCK_KF = new KeyFrame(Duration.millis(1000), TEXT_OPACITY_UNLOCK_KV);

        unlockAnimation.getKeyFrames().addAll(UNLOCK_KEY_FRAME, TEXT_OPACITY_UNLOCK_KF);
        unlockAnimation.setOnFinished(new EventHandler<ActionEvent>() {
            @Override public void handle(final ActionEvent EVENT) {
View Full Code Here

            stage.setOpacity(0d);
            stage.show();
            final DoubleProperty opacity = stage.opacityProperty();

            Timeline fadeIn = new Timeline(
                    new KeyFrame(Duration.ZERO, new KeyValue(opacity, 0d)),
                    new KeyFrame(new Duration(fadeInOutTime * 1000),
                            new EventHandler() {
                                @Override
                                public void handle(Event t) {
                                    Timeline display = new Timeline(
                                            new KeyFrame(Duration.ZERO, new KeyValue(opacity, 1d)),
                                            new KeyFrame(new Duration((displayTime - fadeInOutTime * 2) * 1000),
                                                    new EventHandler() {
                                                        @Override
                                                        public void handle(Event t) {
                                                            Timeline fadeOut = new Timeline(
                                                                    new KeyFrame(Duration.ZERO, new KeyValue(opacity, 1d)),
                                                                    new KeyFrame(new Duration(fadeInOutTime * 1000),
                                                                            new EventHandler() {
                                                                                @Override
                                                                                public void handle(Event t) {
                                                                                    stage.hide();
                                                                                }
                                                                            }, new KeyValue(opacity, 0d)));
                                                            fadeOut.play();
                                                        }
                                                    }, new KeyValue(opacity, 1d)));
                                    display.play();
                                }
                            }, new KeyValue(opacity, 1d)));
            fadeIn.play();
        }

        if (buttonSelected == -1) {
            /* If a different type of button is designated the "cancel button",
View Full Code Here

     * </ol>
     * @param miniIconButton the mini icon button
     */
    private void configureBlinking(final MiniIconButton miniIconButton) {
        blinkTimeline.getKeyFrames().remove(kf);
        final KeyValue kv = new KeyValue(miniIconButton.getMiniIcon().opacityProperty(), MINIMUM_OPACITY_FOR_BLINKING);
        kf = new KeyFrame(Duration.millis(miniIconButton.getAnimationDuration()), kv);
        blinkTimeline.getKeyFrames().add(kf);
    }
View Full Code Here

                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(
                    new ChangeListener<Animation.Status>() {
                        @Override
                        public void changed(ObservableValue<? extends Status> ov, Status oldStatus, Status newStatus) {
View Full Code Here

    private Timeline createTimeline(final TabHeaderSkin tabRegion, final Duration duration, final double endValue, final EventHandler<ActionEvent> func) {
        Timeline timeline = new Timeline();
        timeline.setCycleCount(1);

        KeyValue keyValue = new KeyValue(tabRegion.prefWidth, endValue, Interpolator.LINEAR);

        timeline.getKeyFrames().clear();
        timeline.getKeyFrames().add(new KeyFrame(duration, func, keyValue));
        return timeline;
    }
View Full Code Here

        }

        private void showControlButtons() {
            double prefHeight = snapSize(prefHeight(-1));
            Timeline timeline = new Timeline();
            KeyValue keyValue = new KeyValue(controlTabHeight, prefHeight, Interpolator.EASE_OUT);

            setVisible(true);
            timeline.getKeyFrames().clear();
            timeline.getKeyFrames().add(new KeyFrame(Duration.millis(ANIMATION_SPEED), new EventHandler<ActionEvent>() {
                @Override public void handle(ActionEvent event) {
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.