AnimationHandler(Duration duration, Set<JFXKeyValue<?>> keyValues) { this.duration = duration.toMillis(); currentDuration = this.duration; this.keyValues = keyValues; }
new KeyValue(container.getChildren().get(1).scaleYProperty(), expanded ? 1 : 0, Interpolator.EASE_BOTH) )); frames.add(new KeyFrame(Duration.millis(duration.toMillis()), new KeyValue(container.getChildren().get(0).opacityProperty(), expanded ? 0 : 1, Interpolator.EASE_BOTH), new KeyValue(container.getChildren().get(0).translateXProperty(), expanded ? 20 : 0, Interpolator.EASE_BOTH) )); frames.add(new KeyFrame(Duration.millis(duration.toMillis() + 40), new KeyValue(container.getChildren().get(0).opacityProperty(), expanded ? 1 : 0, Interpolator.EASE_BOTH), new KeyValue(container.getChildren().get(0).translateXProperty(), expanded ? 0 : 20, Interpolator.EASE_BOTH)
AnimationHandler(Duration duration, Set<JFXKeyValue<?>> keyValues) { this.duration = duration.toMillis(); currentDuration = this.duration; this.keyValues = keyValues; }
@Override protected T call() throws Exception { Object lastResult = null; if(count == Integer.MAX_VALUE) { while(true) { lastResult = null; for (ProcessDescription<?, ?> processDescription : processes) { lastResult = execute(lastResult, (ProcessDescription<Object, ?>) processDescription, executorService); } Thread.sleep((long) pauseTime.toMillis()); } } else { for(int i = 0; i < count; i++) { lastResult = null; for (ProcessDescription<?, ?> processDescription : processes) { lastResult = execute(lastResult, (ProcessDescription<Object, ?>) processDescription, executorService); } Thread.sleep((long) pauseTime.toMillis()); } } return (T) lastResult; }
private static EventStream<Boolean> booleanPulse(javafx.util.Duration javafxDuration, EventStream<?> restartImpulse) { Duration duration = Duration.ofMillis(Math.round(javafxDuration.toMillis())); EventStream<?> ticks = EventStreams.restartableTicks(duration, restartImpulse); return StateMachine.init(false) .on(restartImpulse.withDefaultEvent(null)).transition((state, impulse) -> true) .on(ticks).transition((state, tick) -> !state) .toStateStream(); }