Source:
public ChangeDisplayDialog(BibDatabaseContext database, List<DatabaseChangeViewModel> changes) { this.setTitle(Localization.lang("External changes")); this.getDialogPane().setPrefSize(800, 600); changesList = new ListView<>(FXCollections.observableArrayList(changes)); changesList.setPrefWidth(200); EasyBind.subscribe(changesList.getSelectionModel().selectedItemProperty(), this::selectedChangeChanged); SplitPane pane = new SplitPane(); pane.setDividerPositions(0.2); Button selectAllChangesFromDisk = new Button(Localization.lang("Mark all changes as accepted")); selectAllChangesFromDisk.setMinWidth(Region.USE_PREF_SIZE); selectAllChangesFromDisk.setOnAction(evt -> { for (DatabaseChangeViewModel change : changes) { change.setAccepted(true); } }); Button unselectAllAcceptChanges = new Button(Localization.lang("Unmark all changes")); unselectAllAcceptChanges.setOnAction(evt -> { for (DatabaseChangeViewModel change : changes) { change.setAccepted(false); } }); VBox leftContent = new VBox(changesList, selectAllChangesFromDisk, unselectAllAcceptChanges); ScrollPane leftScroll = new ScrollPane(leftContent); leftScroll.setFitToHeight(true); leftScroll.setFitToWidth(true); pane.getItems().addAll(leftScroll, infoPanel); pane.setResizableWithParent(leftScroll, false); getDialogPane().setContent(pane); Label rootInfo = new Label(Localization.lang("Select the tree nodes to view and accept or reject changes") + '.'); infoPanel.setCenter(rootInfo); changesList.getSelectionModel().select(0); ButtonType dismissChanges = new ButtonType(Localization.lang("Dismiss"), ButtonData.CANCEL_CLOSE); getDialogPane().getButtonTypes().setAll(new ButtonType(Localization.lang("Accept changes"), ButtonBar.ButtonData.APPLY), dismissChanges); setResultConverter(button -> { if (button == dismissChanges) { return false; } else { NamedCompound ce = new NamedCompound(Localization.lang("Merged external changes")); for (DatabaseChangeViewModel change : changes) { if (change instanceof EntryChangeViewModel) { change.makeChange(database, ce); } else if (change.isAccepted()) { change.makeChange(database, ce); } } ce.end(); return true; } }); }

Target:
public ChangeDisplayDialog(BibDatabaseContext database, List<DatabaseChangeViewModel> changes) { this.setTitle(Localization.lang("External changes")); this.getDialogPane().setPrefSize(800, 600); changesList = new ListView<>(FXCollections.observableArrayList(changes)); changesList.setPrefWidth(200); EasyBind.subscribe(changesList.getSelectionModel().selectedItemProperty(), this::selectedChangeChanged); SplitPane pane = new SplitPane(); pane.setDividerPositions(0.2); Button selectAllChangesFromDisk = new Button(Localization.lang("Mark all changes as accepted")); selectAllChangesFromDisk.setMinWidth(Region.USE_PREF_SIZE); selectAllChangesFromDisk.setOnAction(evt -> { for (DatabaseChangeViewModel change : changes) { change.setAccepted(true); } }); Button unselectAllAcceptChanges = new Button(Localization.lang("Unmark all changes")); unselectAllAcceptChanges.setOnAction(evt -> { for (DatabaseChangeViewModel change : changes) { change.setAccepted(false); } }); VBox leftContent = new VBox(changesList, selectAllChangesFromDisk, unselectAllAcceptChanges); ScrollPane leftScroll = new ScrollPane(leftContent); leftScroll.setFitToHeight(true); leftScroll.setFitToWidth(true); pane.getItems().addAll(leftScroll, infoPanel); pane.setResizableWithParent(leftScroll, false); getDialogPane().setContent(pane); Label rootInfo = new Label(Localization.lang("Select the tree nodes to view and accept or reject changes") + '.'); infoPanel.setCenter(rootInfo); changesList.getSelectionModel().selectFirst(); ButtonType dismissChanges = new ButtonType(Localization.lang("Dismiss"), ButtonData.CANCEL_CLOSE); getDialogPane().getButtonTypes().setAll(new ButtonType(Localization.lang("Accept changes"), ButtonBar.ButtonData.APPLY), dismissChanges); setResultConverter(button -> { if (button == dismissChanges) { return false; } else { NamedCompound ce = new NamedCompound(Localization.lang("Merged external changes")); for (DatabaseChangeViewModel change : changes) { if (change instanceof EntryChangeViewModel) { change.makeChange(database, ce); } else if (change.isAccepted()) { change.makeChange(database, ce); } } ce.end(); return true; } }); }