How to set the cursor to CURSOR.WAIT while running PauseTransition?
public void dashboard() {
PauseTransition wait = new PauseTransition(Duration.seconds(1));
wait.setOnFinished((e) -> {
GuiManager.getInstance().showView(new DashboardView());
});
wait.play();
}
答案 0 :(得分:1)
使用Picasso代替PauseTransition:
Animation wait = new Timeline(
new KeyFrame(Duration.ZERO,
new KeyValue(someNode.cursorProperty(), Cursor.WAIT)),
new KeyFrame(Duration.seconds(1),
new KeyValue(someNode.cursorProperty(), null)));
wait.setOnFinished(e ->
GuiManager.getInstance().showView(new DashboardView()));
wait.play();