当前位置: 首页>>代码示例>>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;未经允许,请勿转载。