private boolean isAnimating() { return timeline != null && timeline.getStatus() == Animation.Status.RUNNING; }
/** * Animates the list to show/hide the nodes. */ public void animateList() { expanded = !expanded; if (animateTimeline.getStatus() == Status.RUNNING) { animateTimeline.stop(); } animateTimeline.getKeyFrames().clear(); createAnimation(expanded, animateTimeline); animateTimeline.play(); }
derivatives[i] += direction * pushes[i]; if (timeline.getStatus() == Animation.Status.STOPPED) { timeline.play();
if (hideErrorAnimation != null && hideErrorAnimation.getStatus() == Status.RUNNING) { hideErrorAnimation.stop();
private void showTooltip() { if (activationTimer.getStatus() != Status.RUNNING) { activationTimer.stop(); activationTimer.playFromStart(); } }
public void animate() { updateListHeight(); if (showTransition == null || showTransition.getStatus().equals(Status.STOPPED)) { if (scale == null) { scale = new Scale(1, 0);
if (windowDecoratorAnimation.getStatus() == Animation.Status.RUNNING) { windowDecoratorAnimation.stop(); } else {
click.consume(); if (expandAnimation != null && expandAnimation.getStatus() == Status.RUNNING) { expandAnimation.stop();
void hasUnseenErrors(boolean value) { if (value) { if (!(anim.getStatus() == Status.RUNNING)) { anim.play(); } if (!getStyleClass().contains(HAS_ERRORS_CSS_CLASS)) { getStyleClass().add(HAS_ERRORS_CSS_CLASS); } } else { getStyleClass().remove(HAS_ERRORS_CSS_CLASS); anim.stop(); setRotate(0); setScaleY(1); } } }
private boolean isAnimating() { return timeline != null && timeline.getStatus() == Animation.Status.RUNNING; }
if (e.getSceneY() < 0.03 * JavaFXApplication110.instance.stage.getScene().getHeight()) { this.vbox_slideview.setVisible(true); if (timeline.getStatus().equals(Animation.Status.STOPPED)) { timeline.play();
/** * Animates the list to show/hide the nodes. */ public void animateList() { expanded = !expanded; if (animateTimeline.getStatus() == Status.RUNNING) { animateTimeline.stop(); } animateTimeline.getKeyFrames().clear(); createAnimation(expanded, animateTimeline); animateTimeline.play(); }
@Override public void start(Stage primaryStage) { Button btn = new Button("Play / (Stop/Jump)"); Timeline timeline = new Timeline( new KeyFrame(Duration.ZERO, new KeyValue(btn.translateXProperty(), 0d)), new KeyFrame(Duration.seconds(10), new KeyValue(btn.translateXProperty(), 200d)) ); btn.setOnAction((ActionEvent event) -> { if (timeline.getStatus() == Animation.Status.RUNNING) { // timeline.jumpTo("end"); timeline.stop(); } else { timeline.play(); } }); StackPane root = new StackPane(); root.getChildren().add(btn); Scene scene = new Scene(root, 400, 400); primaryStage.setScene(scene); primaryStage.show(); }
this.acceleration = (int) Math.abs(event.getY()); this.positionUpdaterBottom.stop(); if( this.positionUpdaterTop.getStatus() != Status.RUNNING ) { this.positionUpdaterTop.playFromStart(); this.acceleration = (int) Math.abs( b.getMaxY() - event.getY()); this.positionUpdaterTop.stop(); if( this.positionUpdaterBottom.getStatus() != Status.RUNNING ) { this.positionUpdaterBottom.playFromStart();
private void show(Side side) { if (hideTimeline != null) { hideTimeline.stop(); } if (showTimeline != null && showTimeline.getStatus() == Status.RUNNING) { return; } KeyValue[] keyValues = new KeyValue[Side.values().length]; for (Side s : Side.values()) { keyValues[s.ordinal()] = new KeyValue(visibility[s.ordinal()], s.equals(side) ? 1 : 0); } Duration delay = getSkinnable().getAnimationDelay() != null ? getSkinnable() .getAnimationDelay() : Duration.millis(300); Duration duration = getSkinnable().getAnimationDuration() != null ? getSkinnable() .getAnimationDuration() : Duration.millis(200); KeyFrame keyFrame = new KeyFrame(duration, keyValues); showTimeline = new Timeline(keyFrame); showTimeline.setDelay(delay); showTimeline.play(); }
if (timeline != null && (timeline.getStatus() != Status.STOPPED)) { duration = timeline.getCurrentTime(); timeline.stop();
if (hideTimeline != null && hideTimeline.getStatus() == Status.RUNNING) { return;
public void animate() { updateListHeight(); if (showTransition == null || showTransition.getStatus().equals(Status.STOPPED)) { if (scale == null) { scale = new Scale(1, 0);