()
| 72 | } |
| 73 | |
| 74 | private void setup() { |
| 75 | Dialog<UidConfig> dialog = new Dialog<>(); |
| 76 | //dialog.initModality(Modality.APPLICATION_MODAL); |
| 77 | dialog.setResizable(true); |
| 78 | dialog.setTitle("UID Setup"); |
| 79 | dialog.getDialogPane().getButtonTypes().addAll(ButtonType.OK, ButtonType.CANCEL); |
| 80 | |
| 81 | Node okButton = dialog.getDialogPane().lookupButton(ButtonType.OK); |
| 82 | |
| 83 | UidSetupPane content = new UidSetupPane(Config.getUidConfig(), dialog.getOwner(), okButton); |
| 84 | dialog.getDialogPane().setContent(content); |
| 85 | dialog.setResultConverter(button -> button == ButtonType.OK ? content.createConfig() : null); |
| 86 | |
| 87 | dialog.showAndWait().ifPresent(newConfig -> { |
| 88 | if (!newConfig.isValid()) return; |
| 89 | |
| 90 | Config.setUidConfig(newConfig); |
| 91 | Config.saveAsLast(); |
| 92 | }); |
| 93 | } |
| 94 | |
| 95 | private void importMatches(DoubleConsumer progressConsumer) { |
| 96 | UidConfig config = Config.getUidConfig(); |
no test coverage detected