Package javafx.animation

Examples of javafx.animation.FadeTransition


            }
        });
    }

    void deactivate() {
        FadeTransition fadeAway = FadeTransitionBuilder.create().fromValue(1.0).toValue(FADE_VALUE).duration(Duration.seconds(1)).node(this.lineChart).build();
        fadeAway.play();
        activated = false;
    }
View Full Code Here


        fadeAway.play();
        activated = false;
    }

    void activate() {
        FadeTransition fadeAway = FadeTransitionBuilder.create().fromValue(FADE_VALUE).toValue(1.0).duration(Duration.seconds(1)).node(this.lineChart).build();
        fadeAway.play();
        activated = true;
    }
View Full Code Here

    public Node view() {
        return this.chart;
    }

    void deactivate() {
        FadeTransition fadeAway = FadeTransitionBuilder.create().fromValue(1.0).toValue(FADE_VALUE).duration(Duration.seconds(1)).node(this.chart).build();
        fadeAway.play();
        activated = false;
    }
View Full Code Here

        fadeAway.play();
        activated = false;
    }

    void activate() {
        FadeTransition fadeAway = FadeTransitionBuilder.create().fromValue(FADE_VALUE).toValue(1.0).duration(Duration.seconds(1)).node(this.chart).build();
        fadeAway.play();
        activated = true;
    }
View Full Code Here

        showMessage();
        message.setText("Interval: " + status.getKey() + " next timeout: " + status.getValue());
    }

    void showMessage() {
        final FadeTransition fadeTransition = new FadeTransition(Duration.seconds(3),this.message);
        fadeTransition.setFromValue(0);
        fadeTransition.setToValue(1.0);
        fadeTransition.setAutoReverse(true);
        fadeTransition.setCycleCount(2);
        fadeTransition.play();
    }
View Full Code Here

        bb.setWidth(5);
        bb.setHeight(5);
        bb.setIterations(3);
        rectangle.setEffect(bb);
       
    FadeTransition ft = new FadeTransition(Duration.millis(250), rectangle);
    ft.setFromValue(0.2);
    ft.setToValue(0.8);
    ft.setCycleCount(2);
    ft.setAutoReverse(true);
    ft.play();
    ft.setOnFinished(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        parent.getChildren().remove(rectangle);
      }
    });
View Full Code Here

        rotate.setToAngle(0);
        rotate.setDuration(Duration.millis(200));
        rotate.setInterpolator(Interpolator.EASE_BOTH);
        rotate.play();
        closeTimeLines[closeTimeLines.length - 1].setOnFinished(actionEvent -> {
            FadeTransition buttonFadeOut = new FadeTransition();
            buttonFadeOut.setNode(mainMenuButton);
            buttonFadeOut.setDuration(Duration.millis(100));
            buttonFadeOut.setToValue(options.getButtonAlpha());
            buttonFadeOut.play();
            buttonFadeOut.setOnFinished(event -> {
                if (options.isButtonHideOnClose()) hide();
                fireMenuEvent(new MenuEvent(this, null, MenuEvent.MENU_CLOSE_FINISHED));
            });
        });
        for (int i = 0 ; i < closeTimeLines.length ; i++) {
View Full Code Here

            mainMenuButton.setScaleX(1.0);
            mainMenuButton.setScaleY(1.0);
            cross.setRotate(0);
            mainMenuButton.setRotate(0);

            FadeTransition buttonFadeIn = new FadeTransition();
            buttonFadeIn.setNode(mainMenuButton);
            buttonFadeIn.setDuration(Duration.millis(200));
            buttonFadeIn.setToValue(options.getButtonAlpha());
            buttonFadeIn.play();
        }
        for (Parent node : items.keySet()) {
            node.setScaleX(1.0);
            node.setScaleY(1.0);
            node.setTranslateX(0);
View Full Code Here

                shrinkItem.setToX(0.0);
                shrinkItem.setToY(0.0);
                transitions.add(shrinkItem);
            }
            // Add fade out transition to every node
            FadeTransition fadeOutItem = new FadeTransition(Duration.millis(300), node);
            fadeOutItem.setToValue(0.0);
            transitions.add(fadeOutItem);
        }

        // Add rotate and fade transition to main menu button
        if (options.isButtonHideOnSelect()) {
            RotateTransition rotateMainButton = new RotateTransition(Duration.millis(300), mainMenuButton);
            rotateMainButton.setToAngle(225);
            transitions.add(rotateMainButton);
            FadeTransition fadeOutMainButton = new FadeTransition(Duration.millis(300), mainMenuButton);
            fadeOutMainButton.setToValue(0.0);
            transitions.add(fadeOutMainButton);
            ScaleTransition shrinkMainButton = new ScaleTransition(Duration.millis(300), mainMenuButton);
            shrinkMainButton.setToX(0.0);
            shrinkMainButton.setToY(0.0);
            transitions.add(shrinkMainButton);
        } else {
            RotateTransition rotateBackMainButton = new RotateTransition();
            rotateBackMainButton.setNode(cross);
            rotateBackMainButton.setToAngle(0);
            rotateBackMainButton.setDuration(Duration.millis(200));
            rotateBackMainButton.setInterpolator(Interpolator.EASE_BOTH);
            transitions.add(rotateBackMainButton);
            FadeTransition mainButtonFadeOut = new FadeTransition();
            mainButtonFadeOut.setNode(mainMenuButton);
            mainButtonFadeOut.setDuration(Duration.millis(100));
            mainButtonFadeOut.setToValue(options.getButtonAlpha());
            transitions.add(mainButtonFadeOut);
        }

        // Play all transitions in parallel
        ParallelTransition selectTransition = new ParallelTransition();
View Full Code Here

        }

    }

    private void fadeBackToInteractive() {
        FadeTransition fadeUnitOut = new FadeTransition(Duration.millis(425), unit);
        fadeUnitOut.setFromValue(1.0);
        fadeUnitOut.setToValue(0.0);
        FadeTransition fadeValueOut = new FadeTransition(Duration.millis(425), value);
        fadeValueOut.setFromValue(1.0);
        fadeValueOut.setToValue(0.0);

        PauseTransition pause = new PauseTransition(Duration.millis(50));

        FadeTransition fadeUnitIn = new FadeTransition(Duration.millis(425), unit);
        fadeUnitIn.setFromValue(0.0);
        fadeUnitIn.setToValue(1.0);
        FadeTransition fadeValueIn = new FadeTransition(Duration.millis(425), value);
        fadeValueIn.setFromValue(0.0);
        fadeValueIn.setToValue(1.0);
        ParallelTransition parallelIn = new ParallelTransition(fadeUnitIn, fadeValueIn);

        ParallelTransition parallelOut = new ParallelTransition(fadeUnitOut, fadeValueOut);
        parallelOut.setOnFinished(event -> {
            unit.setText("Interactive");
View Full Code Here

TOP

Related Classes of javafx.animation.FadeTransition

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.