Example usage for javafx.animation RotateTransition setCycleCount

List of usage examples for javafx.animation RotateTransition setCycleCount

Introduction

In this page you can find the example usage for javafx.animation RotateTransition setCycleCount.

Prototype

public final void setCycleCount(int value) 

Source Link

Usage

From source file:pe.edu.system.jcmr.controlador.SplashController.java

public void start() {

    FadeTransition tt = new FadeTransition(Duration.seconds(16), stackMain);
    //         tt.setFromAngle(0);
    //         tt.setToAngle(360);
    //         tt.setAutoReverse(true);
    //         tt.setCycleCount(4);
    //         tt.setInterpolator(Interpolator.);
    //         tt.setAxis( Rotate.X_AXIS );

    tt.setAutoReverse(true);/*from   w w w .  ja v a  2  s . c o  m*/
    tt.setCycleCount(3);
    tt.setFromValue(1.0);
    tt.setToValue(0.0);

    RotateTransition rr = new RotateTransition(Duration.seconds(30), imgLogo);
    rr.setCycleCount(3);
    rr.setByAngle(360);

    //        rotator.setInterpolator(Interpolator.LINEAR);
    //                tt.setFromX( -(imgLogo.getFitWidth()) );
    //                tt.setToX( stackMain.getPrefWidth() );
    //                tt.setCycleCount( Timeline.INDEFINITE );
    //                tt.play();
    rr.play();
}

From source file:pe.edu.system.jcmr.controlador.SplashController.java

public void start2() {

    FadeTransition tt = new FadeTransition(Duration.seconds(16), stackMain);
    //         tt.setFromAngle(0);
    //         tt.setToAngle(360);
    //         tt.setAutoReverse(true);
    //         tt.setCycleCount(4);
    //         tt.setInterpolator(Interpolator.);
    //         tt.setAxis( Rotate.X_AXIS );

    tt.setAutoReverse(true);/*from  w  w  w. j a  v a2  s  .c om*/
    tt.setCycleCount(3);
    tt.setFromValue(1.0);
    tt.setToValue(0.0);

    RotateTransition rr = new RotateTransition(Duration.seconds(30), imgLogo2);
    rr.setCycleCount(3);
    rr.setByAngle(360);

    //        rotator.setInterpolator(Interpolator.LINEAR);
    //                tt.setFromX( -(imgLogo.getFitWidth()) );
    //                tt.setToX( stackMain.getPrefWidth() );
    //                tt.setCycleCount( Timeline.INDEFINITE );
    //                tt.play();
    rr.play();
}

From source file:Watcher.FXMLDocumentController.java

@FXML
protected void addSite(ActionEvent event) {
    addSitePane.setVisible(true);//from  w  w w  . ja  v a 2s  .c  o m
    RotateTransition rt = new RotateTransition(Duration.millis(200), addSitePane);
    rt.setFromAngle(180);
    rt.setToAngle(0);
    rt.setCycleCount(1);
    rt.setInterpolator(Interpolator.EASE_IN);
    fadeout(true);
    rt.play();
}

From source file:Watcher.FXMLDocumentController.java

@FXML
protected void cancelSiteAdd(MouseEvent event) {
    RotateTransition rt = new RotateTransition(Duration.millis(200), addSitePane);
    rt.setFromAngle(0);/*from   ww  w.j a v a 2s .co  m*/
    rt.setToAngle(180);
    rt.setCycleCount(1);
    rt.setInterpolator(Interpolator.EASE_OUT);
    rt.setOnFinished(new EventHandler<ActionEvent>() {

        @Override
        public void handle(ActionEvent t) {
            addSitePane.setVisible(false);
            fadeout(false);
        }
    });

    rt.play();
}