List of usage examples for javafx.animation TranslateTransition setCycleCount
public final void setCycleCount(int 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. j a v a 2 s . c om }