Example usage for javafx.animation FadeTransition FadeTransition

List of usage examples for javafx.animation FadeTransition FadeTransition

Introduction

In this page you can find the example usage for javafx.animation FadeTransition FadeTransition.

Prototype

public FadeTransition(Duration duration, Node node) 

Source Link

Document

The constructor of FadeTransition

Usage

From source file:uk.bl.dpt.qa.gui.DissimilarGUIThread.java

/**
 * Convenience method to run after a GUI update thread (i.e. fade progress indicator)
 *//*from w  w w.  ja  va  2  s  .  c  o  m*/
private void internalAfterGUIThread() {
    internalDisableInterface(false);
    Platform.runLater(new Runnable() {
        //@Override
        public void run() {
            FadeTransition fade = new FadeTransition(Duration.millis(gFadeDelayMS), progressIndicator);
            fade.setFromValue(1);
            fade.setToValue(0);
            fade.play();
        }
    });
}

From source file:view.EditorView.java

private void compassImageFadeOut() {
    FadeTransition ft = new FadeTransition(Duration.millis(250), compassImage);
    ft.setFromValue(compassImage.getOpacity());
    ft.setToValue(0.2);//from  w  w w .  j  a  v a 2  s .com
    ft.setAutoReverse(false);
    ft.play();
}

From source file:view.EditorView.java

private void compassImageFadeIn() {
    FadeTransition ft = new FadeTransition(Duration.millis(250), compassImage);
    ft.setFromValue(compassImage.getOpacity());
    ft.setAutoReverse(false);//from   www . j  a v  a2 s.  c  o m
    ft.setToValue(0.5);
    ft.play();
}

From source file:Watcher.FXMLDocumentController.java

private void fadeout(boolean inpB) {
    if (inpB) {//  w w  w . ja v a 2 s . co m
        javafx.animation.FadeTransition ft = new FadeTransition(Duration.millis(200), fadeOutPane);
        ft.setCycleCount(1);
        ft.setFromValue(0);
        ft.setToValue(0.7);
        fadeOutPane.setVisible(true);
        ft.play();
    } else {
        javafx.animation.FadeTransition ft = new FadeTransition(Duration.millis(200), fadeOutPane);
        ft.setCycleCount(1);
        ft.setFromValue(0.7);
        ft.setToValue(0);
        ft.play();
        fadeOutPane.setVisible(false);
    }
}