public static void showInfoPopup(String title, String header, String content) { Alert alert = new Alert(Alert.AlertType.INFORMATION); alert.setTitle(title); alert.setHeaderText(header); alert.setContentText(content); alert.show(); }
public static void showWarningPopup(String title, String header, String content) { Alert alert = new Alert(Alert.AlertType.WARNING); alert.setTitle(title); alert.setHeaderText(header); alert.setContentText(content); alert.show(); }
public static void showErrorDialog(String header, String content) { Alert alert = new Alert(Alert.AlertType.ERROR); alert.setTitle(ResourceManager.getMessage("title.dialog.error")); alert.setHeaderText(header); alert.setContentText(content); alert.showAndWait(); }
public static boolean showConfirmPopup( Node graphic, String title, String header, String content) { Alert alert = new Alert(Alert.AlertType.CONFIRMATION, content, ButtonType.YES, ButtonType.NO); if (graphic != null) { alert.setGraphic(graphic); } alert.setTitle(title); alert.setHeaderText(header); Optional<ButtonType> result = alert.showAndWait(); return result.get() == ButtonType.YES; }