Example usage for javafx.animation TranslateTransition setInterpolator

List of usage examples for javafx.animation TranslateTransition setInterpolator

Introduction

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

Prototype

public final void setInterpolator(Interpolator value) 

Source Link

Usage

From source file:com.loyalty.controllers.DashboardController.java

private void animate() {
    Toolkit tk = Toolkit.getDefaultToolkit();
    Dimension screenDimension = tk.getScreenSize();
    TranslateTransition transition = new TranslateTransition(new Duration(30000), lbl_promotion);
    transition.setInterpolator(Interpolator.LINEAR);
    transition.setCycleCount(Timeline.INDEFINITE);
    transition.setFromX(screenDimension.getWidth());
    transition.setToX(-screenDimension.getWidth());
    transition.play();/*from w w  w .  jav  a 2  s. c  o  m*/
}