Icon + loader for client
This commit is contained in:
19
ChatApp/app/src/main/java/client/ClientLoading.java
Normal file
19
ChatApp/app/src/main/java/client/ClientLoading.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package client;
|
||||
|
||||
import javafx.animation.RotateTransition;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.shape.Arc;
|
||||
import javafx.util.Duration;
|
||||
|
||||
public class ClientLoading {
|
||||
@FXML
|
||||
private Arc spinnerArc;
|
||||
|
||||
public void initialize() {
|
||||
// Création de l'animation de rotation
|
||||
RotateTransition rotate = new RotateTransition(Duration.seconds(1), spinnerArc);
|
||||
rotate.setByAngle(360);
|
||||
rotate.setCycleCount(RotateTransition.INDEFINITE);
|
||||
rotate.play();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user