當前位置: 首頁>>代碼示例>>Java>>正文


Java CommonBundle.getCancelButtonText方法代碼示例

本文整理匯總了Java中com.intellij.CommonBundle.getCancelButtonText方法的典型用法代碼示例。如果您正苦於以下問題:Java CommonBundle.getCancelButtonText方法的具體用法?Java CommonBundle.getCancelButtonText怎麽用?Java CommonBundle.getCancelButtonText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.CommonBundle的用法示例。


在下文中一共展示了CommonBundle.getCancelButtonText方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createCenterPanel

import com.intellij.CommonBundle; //導入方法依賴的package包/類
@Override
protected JComponent createCenterPanel() {
  final JPanel panel = new JPanel(new BorderLayout(UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP));
  myList = new JBList(myNamedElements);
  myList.setCellRenderer(new FQNameCellRenderer());
  panel.add(ScrollPaneFactory.createScrollPane(myList), BorderLayout.CENTER);

  panel.add(new JBLabel(myContainsClassesOnly ?
                        CodeInsightBundle.message("dialog.paste.on.import.text") :
                        CodeInsightBundle.message("dialog.paste.on.import.text2"), SMALL, BRIGHTER), BorderLayout.NORTH);

  final JPanel buttonPanel = new JPanel(new VerticalFlowLayout());
  final JButton okButton = new JButton(CommonBundle.getOkButtonText());
  getRootPane().setDefaultButton(okButton);
  buttonPanel.add(okButton);
  final JButton cancelButton = new JButton(CommonBundle.getCancelButtonText());
  buttonPanel.add(cancelButton);

  panel.setPreferredSize(JBUI.size(500, 400));

  return panel;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:23,代碼來源:RestoreReferencesDialog.java

示例2: checkReadOnlyFiles

import com.intellij.CommonBundle; //導入方法依賴的package包/類
private boolean checkReadOnlyFiles() throws IOException {
  List<File> files = getReadOnlyFiles();
  if (!files.isEmpty()) {
    final String message = IdeBundle.message("message.text.unlock.read.only.files",
                                             ApplicationNamesInfo.getInstance().getFullProductName(),
                                             getFilesString(files));
    final String[] options = {CommonBundle.getContinueButtonText(), CommonBundle.getCancelButtonText()};
    if (Messages.showOkCancelDialog(myMainPanel, message, IdeBundle.message("dialog.title.convert.project"), options[0], options[1], null) != Messages.OK) {
      return false;
    }
    unlockFiles(files);

    files = getReadOnlyFiles();
    if (!files.isEmpty()) {
      showErrorMessage(IdeBundle.message("error.message.cannot.make.files.writable", getFilesString(files)));
      return false;
    }
  }
  return true;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:21,代碼來源:ConvertProjectDialog.java

示例3: showMessage

import com.intellij.CommonBundle; //導入方法依賴的package包/類
private int showMessage(@Nullable Component parentComponent) {
  String okText = "Fix it";
  String cancelText = CommonBundle.getCancelButtonText();
  Icon icon = Messages.getErrorIcon();
  String title = myNotificationErrorTitle;
  String description = myNotificationErrorDescription;
  return parentComponent != null
         ? Messages.showOkCancelDialog(parentComponent, description, title, okText, cancelText, icon)
         : Messages.showOkCancelDialog(myProject, description, title, okText, cancelText, icon);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:ExecutableValidator.java

示例4: checkLookAndFeel

import com.intellij.CommonBundle; //導入方法依賴的package包/類
private boolean checkLookAndFeel(final UIManager.LookAndFeelInfo lafInfo, final boolean confirm) {
  String message = null;

  if (lafInfo.getName().contains("GTK") && SystemInfo.isXWindow && !SystemInfo.isJavaVersionAtLeast("1.6.0_12")) {
    message = IdeBundle.message("warning.problem.laf.1");
  }

  if (message != null) {
    if (confirm) {
      final String[] options = {IdeBundle.message("confirm.set.look.and.feel"), CommonBundle.getCancelButtonText()};
      final int result = Messages.showOkCancelDialog(message, CommonBundle.getWarningTitle(), options[0], options[1], Messages.getWarningIcon());
      if (result == Messages.OK) {
        myLastWarning = message;
        return true;
      }
      return false;
    }

    if (!message.equals(myLastWarning)) {
      Notifications.Bus.notify(new Notification(Notifications.SYSTEM_MESSAGES_GROUP_ID, "L&F Manager", message, NotificationType.WARNING,
                                                NotificationListener.URL_OPENING_LISTENER));
      myLastWarning = message;
    }
  }

  return true;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:28,代碼來源:LafManagerImpl.java

示例5: showResults

import com.intellij.CommonBundle; //導入方法依賴的package包/類
private ReturnResult showResults(final TodoCheckinHandlerWorker worker, CommitExecutor executor) {
  String commitButtonText = executor != null ? executor.getActionText() : myCheckinProjectPanel.getCommitActionName();
  if (commitButtonText.endsWith("...")) {
    commitButtonText = commitButtonText.substring(0, commitButtonText.length()-3);
  }

  final String text = createMessage(worker);
  final String[] buttons;
  final boolean thereAreTodoFound = worker.getAddedOrEditedTodos().size() + worker.getInChangedTodos().size() > 0;
  int commitOption;
  if (thereAreTodoFound) {
    buttons = new String[]{VcsBundle.message("todo.in.new.review.button"), commitButtonText, CommonBundle.getCancelButtonText()};
    commitOption = 1;
  }
  else {
    buttons = new String[]{commitButtonText, CommonBundle.getCancelButtonText()};
    commitOption = 0;
  }
  final int answer = Messages.showDialog(myProject, text, "TODO", null, buttons, 0, 1, UIUtil.getWarningIcon());
  if (thereAreTodoFound && answer == Messages.OK) {
    showTodo(worker);
    return ReturnResult.CLOSE_WINDOW;
  }
  if (answer == commitOption) {
    return ReturnResult.COMMIT;
  }
  return ReturnResult.CANCEL;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:29,代碼來源:TodoCheckinHandler.java

示例6: show

import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static int show(final Project project,
                       final String sessionName,
                       final TerminateOption option) {
  final String message = option.myAlwaysUseDefault && !option.myDetach ?
                         ExecutionBundle.message("terminate.process.confirmation.text", sessionName) :
                         ExecutionBundle.message("disconnect.process.confirmation.text", sessionName);
  final String okButtonText = option.myAlwaysUseDefault && !option.myDetach ?
                              ExecutionBundle.message("button.terminate") :
                              ExecutionBundle.message("button.disconnect");
  final String[] options = new String[] {okButtonText, CommonBundle.getCancelButtonText()};
  return Messages.showDialog(project, message, ExecutionBundle.message("process.is.running.dialog.title", sessionName),
                      options, 0, Messages.getWarningIcon(),
                      option);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:15,代碼來源:TerminateRemoteProcessDialog.java

示例7: getCancelActionName

import com.intellij.CommonBundle; //導入方法依賴的package包/類
@Override
@NotNull
protected String getCancelActionName() {
  return CommonBundle.getCancelButtonText();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:ExternalAnnotationsManagerImpl.java

示例8: CancelAction

import com.intellij.CommonBundle; //導入方法依賴的package包/類
private CancelAction() {
  super(CommonBundle.getCancelButtonText());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:DialogWrapper.java

示例9: getCancelButtonText

import com.intellij.CommonBundle; //導入方法依賴的package包/類
protected String getCancelButtonText() {
  return CommonBundle.getCancelButtonText();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:AbstractUpdateDialog.java


注:本文中的com.intellij.CommonBundle.getCancelButtonText方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。