public DialogResponse(T response, String label, boolean excluded, boolean dflt, String flavor) { this.response = response; this.label = label; this.ok = isResponseType(label, LABEL_ID_OK); this.cancel = isResponseType(label, LABEL_ID_CANCEL); this.excluded = excluded; this.dflt = dflt; this.flavor = flavor != null ? flavor : ok ? "success" : cancel ? "danger" : dflt ? "primary" : "default"; }