Example usage for javafx.animation FadeTransition playFromStart

List of usage examples for javafx.animation FadeTransition playFromStart

Introduction

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

Prototype

public void playFromStart() 

Source Link

Document

Plays an Animation from initial position in forward direction.

Usage

From source file:net.rptools.tokentool.controller.TokenTool_Controller.java

private void treeViewFinish() {
    log.info("***treeViewFinish called");
    // Sort the nodes off of root
    treeItems = sortTreeNodes(treeItems);

    updateOverlayTreeview(treeItems);//from   www .  ja v  a  2 s  . co m
    addPseudoClassToLeafs(overlayTreeView);
    updateOverlayTreeViewRecentFolder(false);

    // overlayNameLabel.setVisible(true);
    overlayTreeProgressBar.setStyle("-fx-accent: forestgreen;");
    progressBarLabel.setVisible(false);

    FadeTransition fadeOut = new FadeTransition(Duration.millis(2000));
    fadeOut.setNode(overlayTreeProgressBar);
    fadeOut.setFromValue(1.0);
    fadeOut.setToValue(0.0);
    fadeOut.setCycleCount(1);
    fadeOut.setAutoReverse(false);
    fadeOut.playFromStart();

    FadeTransition fadeIn = new FadeTransition(Duration.millis(4000));
    fadeIn.setNode(overlayNameLabel);
    fadeIn.setFromValue(0.0);
    fadeIn.setToValue(1.0);
    fadeIn.setCycleCount(1);
    fadeIn.setAutoReverse(false);
    fadeIn.playFromStart();

}