本文整理了Java中javafx.animation.Timeline.playFromStart()
方法的一些代码示例,展示了Timeline.playFromStart()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Timeline.playFromStart()
方法的具体详情如下:
包路径:javafx.animation.Timeline
类名称:Timeline
方法名:playFromStart
暂无
代码示例来源:origin: torakiki/pdfsam
private void showTooltip() {
if (activationTimer.getStatus() != Status.RUNNING) {
activationTimer.stop();
activationTimer.playFromStart();
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
timeline.setCycleCount(Timeline.INDEFINITE);
timeline.setDelay(Duration.ZERO);
timeline.playFromStart();
代码示例来源:origin: stackoverflow.com
button.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent actionEvent) {
task.playFromStart();
代码示例来源:origin: stackoverflow.com
reset.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent event) {
timeline.playFromStart();
代码示例来源:origin: stackoverflow.com
timeline.playFromStart();
代码示例来源:origin: torakiki/pdfsam
private ErrorTooltipManager(String message) {
require(isNotBlank(message), "Tooltip message cannot be blank");
this.tooltip = new Tooltip(message);
this.tooltip.getStyleClass().add(ERROR_TOOLTIP_CLASS);
hideTimer.getKeyFrames().add(new KeyFrame(new Duration(5000)));
hideTimer.setOnFinished(e -> {
tooltip.hide();
ErrorTooltipManager.this.active = false;
});
activationTimer.getKeyFrames().add(new KeyFrame(new Duration(250)));
activationTimer.setOnFinished(e -> {
if (!ErrorTooltipManager.this.active) {
Scene scene = getScene();
if (scene != null) {
Window owner = scene.getWindow();
if (owner != null && owner.isShowing() && ValidableTextField.this.isVisible()) {
Point2D where = getDisplayCoordiantes(owner, scene);
tooltip.show(ValidableTextField.this, where.getX(), where.getY());
ErrorTooltipManager.this.active = true;
hideTimer.playFromStart();
}
}
}
});
}
代码示例来源:origin: stackoverflow.com
Timeline hideAfter1sec = new Timeline(
new KeyFrame(Duration.seconds(1), sec->{
((Label) selectedPane_1.Label.get(0)).setVisible(false);
((Label) selectedPane_2.Label.get(0)).setVisible(false);
})
);
hideAfter1sec.playFromStart();
代码示例来源:origin: stackoverflow.com
final MyFirstLineService svc = new MyFirstLineService();
final Duration oneFrameAmt = Duration.seconds(5);
final KeyFrame oneFrame = new KeyFrame(oneFrameAmt,
new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent evt) {
svc.restart();
}
});
Timeline timer = TimelineBuilder.create()
.cycleCount(Animation.INDEFINITE)
.keyFrames(oneFrame)
.build();
timer.playFromStart();
代码示例来源:origin: stackoverflow.com
@Override
public void start(Stage primaryStage) {
Circle circle = new Circle(10);
circle.setManaged(false);
Pane pane = new Pane(circle);
circle.setCenterX(20);
circle.setCenterY(800);
Timeline timeline = new Timeline(new KeyFrame(Duration.ZERO,
new KeyValue(circle.centerXProperty(), 20),
new KeyValue(circle.centerYProperty(), 800)
), new KeyFrame(Duration.seconds(3),
new KeyValue(circle.centerXProperty(), 380),
new KeyValue(circle.centerYProperty(), 10, new Interpolator() {
@Override
protected double curve(double t) {
// parabola with zeros at t=0 and t=1 and a maximum of 1 at t=0.5
return 4 * t * (1 - t);
}
})
)
);
Scene scene = new Scene(pane, 400, 800);
scene.setOnMouseClicked(evt -> timeline.playFromStart());
primaryStage.setScene(scene);
primaryStage.show();
}
代码示例来源:origin: stackoverflow.com
firing.playFromStart();
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
event.set(e);
t.stop();
t.playFromStart();
};
EventHandler<MouseEvent> exitHandler = e -> {
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
event.set(e);
t.stop();
t.playFromStart();
};
EventHandler<MouseEvent> exitHandler = e -> {
代码示例来源:origin: stackoverflow.com
void restart() { timer.stop(); timer.playFromStart(); }
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
public void updateCaret(int index) {
if (index != this.caretIndex) {
if( this.scheduledAnimation != null ) {
this.scheduledAnimation.stop();
}
this.caretAnimation.stop();
if (index == -1) {
hideCaret();
}
else {
showCaret();
this.caret.setOpacity(1);
this.scheduledAnimation.playFromStart();
}
this.caretIndex = index;
requestLayout();
if (debugAnimation) {
LineNode.this.debugUpdateCaret.play();
}
}
}
代码示例来源:origin: stackoverflow.com
btn.setDisable(true);
timerLabel.setVisible(true);
timeline.playFromStart();
});
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
headeMessageTimeline.playFromStart();
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
this.positionUpdaterBottom.stop();
if( this.positionUpdaterTop.getStatus() != Status.RUNNING ) {
this.positionUpdaterTop.playFromStart();
this.positionUpdaterTop.stop();
if( this.positionUpdaterBottom.getStatus() != Status.RUNNING ) {
this.positionUpdaterBottom.playFromStart();
代码示例来源:origin: org.controlsfx/controlsfx
private void maybeAnimatePositionChange(final double position,
final boolean showDetail) {
Node detailNode = getSkinnable().getDetailNode();
if (detailNode == null) {
return;
}
showDetailForTimeline.set(showDetail);
Divider divider = splitPane.getDividers().get(0);
if (showDetailForTimeline.get()) {
unbindDividerPosition();
bindDividerPosition();
}
if (getSkinnable().isAnimated() && detailNode != null) {
KeyValue positionKeyValue = new KeyValue(
divider.positionProperty(), position);
KeyValue opacityKeyValue = new KeyValue(detailNode.opacityProperty(), showDetailForTimeline.get() ? 1 : 0);
KeyFrame keyFrame = new KeyFrame(Duration.seconds(.1), "endAnimation", positionKeyValue, opacityKeyValue);
timeline.getKeyFrames().clear();
timeline.getKeyFrames().add(keyFrame);
timeline.playFromStart();
} else {
detailNode.setOpacity(1);
divider.setPosition(position);
if (!showDetailForTimeline.get()) {
unbindDividerPosition();
splitPane.getItems().remove(getSkinnable().getDetailNode());
}
changing = false;
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
@Override
public void applyContentMatrix(IResponsiveAreaSize areasSize) {
if(isLeftPaneOpen()) {
leftPanewasclosedForResizing = true;
}
resizingTimeline.stop();
resizingTimeline.playFromStart();
final IResponsiveSizing leftSize = areasSize.getSizeOf(0);
final IResponsiveSizing rightSize = areasSize.getSizeOf(1);
minimized.set(leftSize.isToMinimize() || leftSize.isToHide());
if (orientation.get() == SwitchableTwoHPanesOrientation.LEFT) {
//final boolean washidden = !leftFloatingPaneContentWrapper.isVisible();
IResponsiveAware.resize(leftFloatingPaneContentWrapper, leftSize);
leftFloatingPaneContent.pseudoClassStateChanged(PseudoClass.getPseudoClass("minimized"), leftSize.isToMinimize() || leftSize.isToHide());
//if (washidden) {
//leftFloatingPaneContentWrapper.setVisible(false);
//}
//closeLeftPaneImmediat();
} else {
final boolean washidden = !rightFloatingPaneContentWrapper.isVisible();
IResponsiveAware.resize(rightFloatingPaneContentWrapper, leftSize);
rightFloatingPaneContent.pseudoClassStateChanged(PseudoClass.getPseudoClass("minimized"), leftSize.isToMinimize() || leftSize.isToHide());
if (washidden) {
rightFloatingPaneContentWrapper.setVisible(false);
}
closeRightPaneImmediat();
}
IResponsiveAware.resize(centerScrollPaneWrapper, rightSize);
updateSwitcherVisibility();
}
代码示例来源:origin: com.jfoenix/jfoenix
timeline.setCycleCount(Timeline.INDEFINITE);
timeline.setDelay(Duration.ZERO);
timeline.playFromStart();
内容来源于网络,如有侵权,请联系作者删除!