Example usage for javafx.animation SequentialTransition getChildren

List of usage examples for javafx.animation SequentialTransition getChildren

Introduction

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

Prototype

public final ObservableList<Animation> getChildren() 

Source Link

Document

A list of javafx.animation.Animation Animations that will be played sequentially.

Usage

From source file:com.github.naoghuman.testdata.abclist.service.ExerciseService.java

@Override
public void start() {
    final SequentialTransition sequentialTransition = new SequentialTransition();

    final PauseTransition ptProgressBarInformation = new PauseTransition();
    ptProgressBarInformation.setDuration(Duration.millis(250.0d));
    ptProgressBarInformation.setOnFinished((ActionEvent event) -> {
        presenter.setProgressBarInformation(onStartMessage);
    });/*w w  w.j  av  a2  s . co  m*/
    sequentialTransition.getChildren().add(ptProgressBarInformation);

    final PauseTransition ptStart = new PauseTransition();
    ptStart.setDuration(Duration.millis(1000.0d));
    ptStart.setOnFinished((ActionEvent event) -> {
        super.start();
    });
    sequentialTransition.getChildren().add(ptStart);

    sequentialTransition.playFromStart();
}