Ticket #19114: 19114.better_error_reporting.patch
| File 19114.better_error_reporting.patch, 1.3 KB (added by , 6 years ago) |
|---|
-
src/org/openstreetmap/josm/plugins/javafx/gui/JavaFxWrapper.java
2 2 package org.openstreetmap.josm.plugins.javafx.gui; 3 3 4 4 import java.awt.Dimension; 5 import java.util.concurrent.ExecutionException; 6 import java.util.concurrent.FutureTask; 5 7 6 8 import org.openstreetmap.josm.tools.Logging; 7 9 … … 61 63 */ 62 64 private void initialize(T node) { 63 65 this.node = node; 64 Platform.runLater(this::initFX); 66 FutureTask<Scene> task = new FutureTask<>(this::initFX); 67 Platform.runLater(task); 65 68 Platform.setImplicitExit(false); 66 69 this.setFocusTraversalKeysEnabled(node.isFocusTraversable()); 70 try { 71 task.get(); 72 } catch (InterruptedException | ExecutionException e) { 73 Logging.error(e); 74 } 67 75 } 68 76 69 private void initFX() { 77 /** 78 * @return The scene to be used for initializing JavaFX 79 */ 80 protected Scene initFX() { 70 81 Scene scene = createScene(); 71 82 setScene(scene); 83 return scene; 72 84 } 73 85 74 86 private Scene createScene() {
