/** * Present a confirmation (OK/Cancel) dialog with the specified prompt and return the user * response. * * @param message Prompt to present to the user. * @param title Caption of prompt dialog. * @param callback Callback to receive dialog response. */ public static void confirm(String message, String title, IConfirmCallback callback) { confirm(message, title, null, callback); }
/** * Present a confirmation (OK/Cancel) dialog with the specified prompt and return the user * response. * * @param message Prompt to present to the user. * @param callback Callback to receive dialog response. */ public static void confirm(String message, IConfirmCallback callback) { confirm(message, "@fujion.prompt.confirm.title", callback); }
private void close(boolean cancel) { if (cancel && !changeSet.isEmpty()) { DialogUtil.confirm(label_cancel_message, label_cancel_title, (response) -> { if (response) { _close(cancel); } }); } else { _close(cancel); } }
@EventHandler(value = "click", target = "btnDeleteAll") private void onClick$btnDeleteAll() { DialogUtil.confirm("Delete resources across all scenarios?", "All Scenarios", (confirm) -> { if (confirm) { doAction(Action.DELETEALL); } }); }
/** * Clear desktop. */ @EventHandler(value = "click", target = "mnuClearDesktop") private void onClick$mnuClearDesktop() { DialogUtil.confirm(DesignConstants.MSG_DESKTOP_CLEAR, DesignConstants.CAP_DESKTOP_CLEAR, (confirm) -> { if (confirm) { shell.reset(); } }); }
/** * Deletes the selected layout. */ @EventHandler(value = "click", target = "@btnDelete") private void onClick$btnDelete() { DialogUtil.confirm(MSG_LAYOUT_DELETE, (confirm) -> { if (confirm) { LayoutUtil.deleteLayout(getSelectedLayout()); refresh(null); } }); }
@EventHandler(value = "click", target = "btnDelete") private void onClick$btnDelete() { DialogUtil.confirm("Delete all resources for this scenario?", getSelectedScenario().getName(), (confirm) -> { if (confirm) { doAction(Action.DELETE); } }); }
@EventHandler(value = "click", target = "btnReset") private void onClick$btnReset() { DialogUtil.confirm("Reset this scenario to its baseline state?", getSelectedScenario().getName(), (confirm) -> { if (confirm) { doAction(Action.RESET); } }); }
/** * Prompt user for logout confirmation (unless suppressed). * * @see IUserContextEvent#pending */ @Override public void pending(ISurveyResponse response) { if (response.isSilent()) { response.accept(); } else { response.defer(); DialogUtil.confirm(LBL_LOGOUT_CONFIRMATION, LBL_LOGOUT_CONFIRMATION_CAPTION, "LOGOUT.CONFIRM", (confirm) -> { if (confirm) { response.accept(); } else { response.reject(LBL_LOGOUT_CANCEL); } }); } }
@EventHandler(value = "click", target = "btnOK") public void onClick$btnOK() { String name = txtLayout.getValue().trim(); if (!LayoutUtil.validateName(name)) { showError(MSG_LAYOUT_BADNAME); return; } LayoutIdentifier id = new LayoutIdentifier(name, rbShared.isChecked()); if (LayoutUtil.layoutExists(id)) { if (!allowDups) { showError(MSG_LAYOUT_DUP); } else { DialogUtil.confirm(MSG_LAYOUT_OVERWRITE, CAP_LAYOUT_OVERWRITE, (confirm) -> { if (confirm) { close(id); } }); } } else { close(id); } }
@EventHandler(value = "click", target = "@btnDelete") private void onClick$btnDelete() { IBaseResource resource = getSelectedResource(); DialogUtil.confirm("Delete " + FhirUtil.getResourceIdPath(resource, true) + "?", "Delete Resource", (confirm) -> { if (confirm) { try { fhirService.deleteResource(resource); model.remove(resource); root.setAttribute("modified", true); updateCaption(); displayResource(); } catch (Exception e) { DialogUtil.showError("Error deleting resource:\n\n" + CWFUtil.formatExceptionForDisplay(e)); } } }); }