use of javafx.scene.control.ButtonBar in project jabref by JabRef.
the class DocumentViewerView method show.
@Override
public void show() {
FXDialog dialog = new FXDialog(AlertType.INFORMATION, Localization.lang("Document viewer"), false);
DialogPane dialogPane = (DialogPane) this.getView();
// Remove button bar at bottom
dialogPane.getChildren().removeIf(node -> node instanceof ButtonBar);
dialog.setDialogPane(dialogPane);
dialog.setResizable(true);
dialog.show();
}
use of javafx.scene.control.ButtonBar in project jgnash by ccavanaugh.
the class SelectAccountSecuritiesDialog method createButtonBar.
private ButtonBar createButtonBar() {
final ButtonBar buttonBar = new ButtonBar();
// Create and add the ok and cancel buttons to the button bar
final Button okButton = new Button(resources.getString("Button.Ok"));
final Button cancelButton = new Button(resources.getString("Button.Cancel"));
ButtonBar.setButtonData(okButton, ButtonBar.ButtonData.OK_DONE);
ButtonBar.setButtonData(cancelButton, ButtonBar.ButtonData.CANCEL_CLOSE);
buttonBar.getButtons().addAll(okButton, cancelButton);
okButton.setOnAction(event -> {
result = true;
((Stage) okButton.getScene().getWindow()).close();
});
cancelButton.setOnAction(event -> {
result = false;
((Stage) cancelButton.getScene().getWindow()).close();
});
return buttonBar;
}
Aggregations