Package javafx.animation

Examples of javafx.animation.FadeTransition


        }

    }

    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


        }

    }

    private void fadeBack() {
        FadeTransition fadeInfoTextOut = new FadeTransition(Duration.millis(425), infoText);
        fadeInfoTextOut.setFromValue(1.0);
        fadeInfoTextOut.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 fadeInfoTextIn = new FadeTransition(Duration.millis(425), infoText);
        fadeInfoTextIn.setFromValue(0.0);
        fadeInfoTextIn.setToValue(1.0);
       
        FadeTransition fadeValueIn = new FadeTransition(Duration.millis(425), value);
        fadeValueIn.setFromValue(0.0);
        fadeValueIn.setToValue(1.0);               
       
        ParallelTransition parallelIn = new ParallelTransition(fadeInfoTextIn, fadeValueIn);

        ParallelTransition parallelOut = new ParallelTransition(fadeInfoTextOut, fadeValueOut);
        parallelOut.setOnFinished(event -> {
View Full Code Here

            fadeIn(n, mills).play();
        }
    }

    public static FadeTransition fadeOut(@Nonnull Node node, @Nonnegative long mills) {
        FadeTransition ft = new FadeTransition(Duration.millis(mills), node);
        ft.setFromValue(0.0f);
        ft.setToValue(1.0f);
        return ft;
    }
View Full Code Here

        ft.setToValue(1.0f);
        return ft;
    }

    public static FadeTransition fadeIn(@Nonnull Node node, @Nonnegative long mills) {
        FadeTransition ft = new FadeTransition(Duration.millis(mills), node);
        ft.setFromValue(1.0f);
        ft.setToValue(0.0f);
        return ft;
    }
View Full Code Here

            fadeIn(n, mills).play();
        }
    }

    public static FadeTransition fadeOut(@Nonnull Node node, @Nonnegative long mills) {
        FadeTransition ft = new FadeTransition(Duration.millis(mills), node);
        ft.setFromValue(0.0f);
        ft.setToValue(1.0f);
        return ft;
    }
View Full Code Here

        ft.setToValue(1.0f);
        return ft;
    }

    public static FadeTransition fadeIn(@Nonnull Node node, @Nonnegative long mills) {
        FadeTransition ft = new FadeTransition(Duration.millis(mills), node);
        ft.setFromValue(1.0f);
        ft.setToValue(0.0f);
        return ft;
    }
View Full Code Here

  }
 
  private void removePane(final Pane pane) {
    // Nicely fade out the panes before removing them
   
    FadeTransition fade = new FadeTransition(Duration.seconds(1), pane);
    fade.setFromValue(1.0);
    fade.setToValue(0.0);
   
    // Scale not working properly now. Keeps the height of the pane...
//    ScaleTransition scale = new ScaleTransition(Duration.seconds(1), pane);
//    scale.setFromY(1.0);
//    scale.setToY(0.0);
//   
//    SequentialTransition trans = new SequentialTransition();
//    trans.getChildren().addAll(scale);//, fade, scale);
   
    fade.setOnFinished(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent arg0) {
        getNodeParent().getChildren().remove(pane);
      }
    });
   
    fade.play();
  }
View Full Code Here

    Rectangle backgroundRect = new Rectangle();
    backgroundRect.setFill(Color.BLACK);
    backgroundRect.setWidth(640);
    backgroundRect.setHeight(400);

    final FadeTransition fadeInSelection = new FadeTransition(Duration.millis(500));
    final FadeTransition fadeOutBackground = new FadeTransition(Duration.millis(1000));

    final VBox outerPane = new VBox();
    outerPane.setAlignment(Pos.CENTER);
    outerPane.setVisible(false);
    outerPane.setOpacity(0.0);
    outerPane.setPadding(new Insets(0, 15, 0, 15));
    outerPane.setSpacing(20);

    final ImageView background = new ImageView();
    background.setCursor(Cursor.HAND);
    background.setOpacity(1.0);
    background.setImage(Assets.getBackground(Assets.IMAGE_SCREENS_GAME_SELECTION_BACKGROUND));
    background.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent me) {
        if (!outerPane.isVisible()) {
          background.setCursor(null);
          outerPane.setVisible(true);
          fadeInSelection.play();
          fadeOutBackground.play();
        }
      }
    });

    fadeInSelection.setCycleCount(1);
    fadeInSelection.setFromValue(1.0);
    fadeInSelection.setToValue(0.3);
    fadeInSelection.setNode(background);
    fadeOutBackground.setCycleCount(1);
    fadeOutBackground.setFromValue(0.0);
    fadeOutBackground.setToValue(1.0);
    fadeOutBackground.setNode(outerPane);

    Label numberOfPlayersLabel = new Label("NUMBER OF PLAYERS");
    numberOfPlayersLabel.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_16));
    numberOfPlayersLabel.setTextFill(Color.LIGHTGRAY);
View Full Code Here

    private AsciiDocController asciiDocController;

    public void startCycle() {
        Platform.runLater(() -> {
            asciiDocController.getIndikator().setVisible(true);
            FadeTransition fadeIn = new FadeTransition(Duration.seconds(4));
            fadeIn.setNode(asciiDocController.getIndikator());
            fadeIn.setFromValue(0.0);
            fadeIn.setToValue(1.0);
            fadeIn.setCycleCount(1);
            fadeIn.setAutoReverse(false);
            fadeIn.playFromStart();
        });
    }
View Full Code Here

    }

    public void completeCycle() {
        Platform.runLater(() -> {
            asciiDocController.getIndikator().setProgress(1);
            FadeTransition fadeOut = new FadeTransition(Duration.seconds(4));
            fadeOut.setNode(asciiDocController.getIndikator());
            fadeOut.setFromValue(1.0);
            fadeOut.setToValue(0.0);
            fadeOut.setCycleCount(1);
            fadeOut.setAutoReverse(false);
            fadeOut.playFromStart();
        });
    }
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.