public void togglePane() { if (toggleAnimation == null) { updateToggleAnimation(); } this.getClip().scaleXProperty().unbind(); this.getClip().scaleYProperty().unbind(); toggleAnimation.setRate(toggleAnimation.getRate() * -1); if (toggleAnimation.getCurrentTime().equals(Duration.millis(0)) && toggleAnimation.getRate() == -1) { toggleAnimation.playFrom(Duration.millis(510)); } else { toggleAnimation.play(); } }
double rateY = this.getHeight() / getClip().getLayoutBounds().getHeight(); double newRate = Math.max(rateX, rateY) * getScalingFactor(); double animationRate = toggleAnimation == null ? -1 : toggleAnimation.getRate(); new KeyValue(getContentNode().opacityProperty(), 1, Interpolator.EASE_BOTH))); toggleAnimation.setOnFinished((finish) -> { if (toggleAnimation.getRate() == 1) { this.getClip().scaleXProperty().bind(Bindings.createDoubleBinding(() -> { double X = this.getWidth() / getClip().getLayoutBounds().getWidth();
); counter.addListener((observable, oldValue, newValue) -> { double currentRate = timeline.getRate();
public void togglePane() { if (toggleAnimation == null) { updateToggleAnimation(); } this.getClip().scaleXProperty().unbind(); this.getClip().scaleYProperty().unbind(); toggleAnimation.setRate(toggleAnimation.getRate() * -1); if (toggleAnimation.getCurrentTime().equals(Duration.millis(0)) && toggleAnimation.getRate() == -1) { toggleAnimation.playFrom(Duration.millis(510)); } else { toggleAnimation.play(); } }
new KeyFrame(Duration.seconds(1), new KeyValue(brightness, 1d)) ); timeline.setOnFinished(evt -> timeline.setRate(-timeline.getRate()));
double rateY = this.getHeight() / getClip().getLayoutBounds().getHeight(); double newRate = Math.max(rateX, rateY) * getScalingFactor(); double animationRate = toggleAnimation == null ? -1 : toggleAnimation.getRate(); new KeyValue(getContentNode().opacityProperty(), 1, Interpolator.EASE_BOTH))); toggleAnimation.setOnFinished((finish) -> { if (toggleAnimation.getRate() == 1) { this.getClip().scaleXProperty().bind(Bindings.createDoubleBinding(() -> { double X = this.getWidth() / getClip().getLayoutBounds().getWidth();