Reformatted classes ErrorComponent and Tasks

This commit is contained in:
JaniruTEC
2020-10-19 19:14:01 +02:00
parent 26160e9bbc
commit 022ba81f2f
2 changed files with 13 additions and 12 deletions

View File

@@ -20,21 +20,21 @@ public interface ErrorComponent {
stage.setScene(scene());
stage.show();
}
@Subcomponent.Builder
interface Builder {
@BindsInstance
Builder cause(Throwable cause);
@BindsInstance
Builder window(Stage window);
@BindsInstance
Builder returnToScene(@Nullable Scene previousScene);
ErrorComponent build();
}
}

View File

@@ -5,6 +5,13 @@
*******************************************************************************/
package org.cryptomator.ui.common;
import javafx.application.Platform;
import javafx.concurrent.ScheduledService;
import javafx.concurrent.Task;
import javafx.util.Duration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
@@ -14,16 +21,10 @@ import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Supplier;
import javafx.application.Platform;
import javafx.concurrent.ScheduledService;
import javafx.concurrent.Task;
import javafx.util.Duration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Tasks {
private static final Logger LOG = LoggerFactory.getLogger(Tasks.class);
public static <T> TaskBuilder<T> create(Callable<T> callable) {
return new TaskBuilder<>(callable);
}