Example usage for com.intellij.openapi.ui Messages CANCEL_BUTTON

List of usage examples for com.intellij.openapi.ui Messages CANCEL_BUTTON

Introduction

In this page you can find the example usage for com.intellij.openapi.ui Messages CANCEL_BUTTON.

Prototype

String CANCEL_BUTTON

To view the source code for com.intellij.openapi.ui Messages CANCEL_BUTTON.

Click Source Link

Document

Use {code #getCancelButton() } instead

Usage

From source file:com.android.tools.idea.updater.configure.SdkUpdaterConfigurable.java

License:Apache License

private static boolean confirmChange(HtmlBuilder message) {
    String[] options = { Messages.OK_BUTTON, Messages.CANCEL_BUTTON };
    Icon icon = AllIcons.General.Warning;

    // I would use showOkCancelDialog but Mac sheet panels do not gracefully handle long messages and their buttons can display offscreen
    return Messages.showIdeaMessageDialog(null, message.getHtml(), "Confirm Change", options, 0, icon,
            null) == Messages.OK;/*from w ww.  j a v a  2  s  .c om*/
}

From source file:com.magnet.plugin.r2m.helpers.AsyncHelper.java

License:Open Source License

private void showOverrideConfirmationDialog(final List<String> list) {
    this.result = false;
    StringBuilder sb = new StringBuilder("\n");
    for (String e : list) {
        sb.append(e).append("\n");
    }/*w ww .  j  a  v  a 2  s  . c  o  m*/
    int option = Messages.showOkCancelDialog(R2MMessages.getMessage("CONFIRM_OVERRIDE_FILES", sb.toString()),
            R2MMessages.getMessage("CONFIRM_OVERRIDE_FILES_TITLE"),
            R2MMessages.getMessage("CONFIRM_OVERRIDE_FILES_BUTTON_TEXT"), Messages.CANCEL_BUTTON,
            Messages.getWarningIcon());
    if (option == 0) {
        onActionSuccess(GenerateActions.START_FILE_OPERATIONS);
    } else {
        this.result = true;
        onActionSuccess(GenerateActions.FILE_OPERATION_SUCCESS);
    }
}