本文整理了Java中javafx.animation.Timeline.pause()
方法的一些代码示例,展示了Timeline.pause()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Timeline.pause()
方法的具体详情如下:
包路径:javafx.animation.Timeline
类名称:Timeline
方法名:pause
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
private void pauseTimeline(boolean pause) {
if (getSkinnable().isIndeterminate()) {
if (timeline == null) {
createTransition();
}
if (pause) {
timeline.pause();
} else {
timeline.play();
}
}
}
代码示例来源:origin: stackoverflow.com
timeline.pause();
} else {
timeline.play();
代码示例来源:origin: com.jfoenix/jfoenix
private void pauseTimeline(boolean pause) {
if (getSkinnable().isIndeterminate()) {
if (timeline == null) {
createTransition();
}
if (pause) {
timeline.pause();
} else {
timeline.play();
}
}
}
代码示例来源:origin: stackoverflow.com
@Override
public void start(Stage primaryStage) {
Circle circle = new Circle(300, 20, 5);
Timeline animation = new Timeline(
new KeyFrame(Duration.ZERO, new KeyValue(circle.centerYProperty(), circle.getCenterY())),
new KeyFrame(Duration.seconds(1), new KeyValue(circle.centerYProperty(), 300))
);
animation.setCycleCount(Animation.INDEFINITE);
animation.setAutoReverse(true);
Button btn = new Button("Play");
btn.pressedProperty().addListener((observable, wasPressed, pressed) -> {
System.out.println("changed");
if (pressed) {
animation.play();
} else {
animation.pause();
}
});
Pane root = new Pane(btn, circle);
Scene scene = new Scene(root, 400, 400);
primaryStage.setScene(scene);
primaryStage.show();
}
代码示例来源:origin: stackoverflow.com
focusTimer.pause();
});
代码示例来源:origin: stackoverflow.com
timeline.pause();
System.out.println("Your name is " + tf.getText());
});
代码示例来源:origin: stackoverflow.com
void pause() { timer.pause(); }
代码示例来源:origin: stackoverflow.com
animation.pause();
代码示例来源:origin: stackoverflow.com
animation.play();
} else {
animation.pause();
代码示例来源:origin: stackoverflow.com
animation.pause();
代码示例来源:origin: stackoverflow.com
if (!isVisible) {
timeline.pause();
timeline.pause();
} else {
代码示例来源:origin: stackoverflow.com
animation.pause();
代码示例来源:origin: stackoverflow.com
logTransfer.pause();
logTransfer.pause();
} else {
if (!paused.get()) {
代码示例来源:origin: stackoverflow.com
animation.pause();
内容来源于网络,如有侵权,请联系作者删除!