List of usage examples for javafx.animation TranslateTransition setInterpolator
public final void setInterpolator(Interpolator value)
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*/ }