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


Java UIUtil.getQuestionIcon方法代碼示例

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


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

示例1: createNorthPanel

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
protected JComponent createNorthPanel() {
  JLabel label = new JLabel(DebuggerBundle.message("hotswap.dialog.run.prompt"));
  JPanel panel = new JPanel(new BorderLayout());
  panel.add(label, BorderLayout.CENTER);
  Icon icon = UIUtil.getQuestionIcon();
  if (icon != null) {
    label.setIcon(icon);
    label.setIconTextGap(7);
  }
  if (myDisplayHangWarning) {
    final JLabel warningLabel = new JLabel("WARNING! " + DebuggerBundle.message("hotswap.dialog.hang.warning"));
    warningLabel.setUI(new MultiLineLabelUI());
    panel.add(warningLabel, BorderLayout.SOUTH);
  }
  return panel;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:17,代碼來源:RunHotswapDialog.java

示例2: showYesNoCancelDialog

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public int showYesNoCancelDialog(@NotNull String title,
                                 String message,
                                 @NotNull String defaultButton,
                                 String alternateButton,
                                 String otherButton,
                                 @Nullable Window window,
                                 @Nullable DialogWrapper.DoNotAskOption doNotAskOption) {
  if (window == null) {
    window = getForemostWindow(null);
  }
  SheetMessage sheetMessage = new SheetMessage(window, title, message, UIUtil.getQuestionIcon(),
                                               new String [] {defaultButton, otherButton, alternateButton},
                                               doNotAskOption, defaultButton, alternateButton);

  String resultString = sheetMessage.getResult();
  int result = resultString.equals(defaultButton) ? Messages.YES : resultString.equals(alternateButton) ? Messages.NO : Messages.CANCEL;
  if (doNotAskOption != null) {
      doNotAskOption.setToBeShown(sheetMessage.toBeShown(), result);
  }
  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:23,代碼來源:JBMacMessages.java

示例3: showYesNoDialog

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public int showYesNoDialog(@NotNull String title,
                           String message,
                           @NotNull String yesButton,
                           @NotNull String noButton,
                           @Nullable Window window,
                           @Nullable DialogWrapper.DoNotAskOption doNotAskDialogOption) {
  if (window == null) {
    window = getForemostWindow(null);
  }
  SheetMessage sheetMessage = new SheetMessage(window, title, message, UIUtil.getQuestionIcon(),
                                               new String [] {yesButton, noButton}, doNotAskDialogOption, yesButton, noButton);
  int result = sheetMessage.getResult().equals(yesButton) ? Messages.YES : Messages.NO;
  if (doNotAskDialogOption != null && (result == Messages.YES || doNotAskDialogOption.shouldSaveOptionsOnCancel())) {
    doNotAskDialogOption.setToBeShown(sheetMessage.toBeShown(), result);
  }
  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:19,代碼來源:JBMacMessages.java

示例4: createCenterPanel

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
protected JComponent createCenterPanel() {
  JBLabel desc = new JBLabel(wrapInHtml(makeDescription()));

  JPanel options = new JPanel(new BorderLayout());
  if (!myRebaseOverMergeProblemDetected) {
    options.add(myAutoUpdateInFuture, BorderLayout.SOUTH);
  }

  if (!GitUtil.justOneGitRepository(myProject)) {
    options.add(myUpdateAllRoots);
  }

  final int GAP = 15;
  JPanel rootPanel = new JPanel(new BorderLayout(GAP, GAP));
  rootPanel.add(desc);
  rootPanel.add(options, BorderLayout.SOUTH);
  JLabel iconLabel = new JLabel(myRebaseOverMergeProblemDetected ? UIUtil.getWarningIcon() : UIUtil.getQuestionIcon());
  rootPanel.add(iconLabel, BorderLayout.WEST);

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

示例5: createCenterPanel

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
@NotNull
protected JComponent createCenterPanel() {

  JPanel contentPanel = new JPanel(new GridBagLayout());
  GridBag g = new GridBag()
    .setDefaultInsets(new Insets(0, 0, DEFAULT_VGAP, DEFAULT_HGAP))
    .setDefaultAnchor(GridBagConstraints.LINE_START)
    .setDefaultFill(GridBagConstraints.HORIZONTAL);

  JLabel icon = new JLabel(UIUtil.getQuestionIcon(), SwingConstants.LEFT);
  myBookmarkName = new JBTextField(13);
  myBookmarkName.getDocument().addDocumentListener(new DocumentAdapter() {
    @Override
    public void textChanged(DocumentEvent e) {
      validateFields();
    }
  });

  JBLabel bookmarkLabel = new JBLabel("Bookmark name:");
  bookmarkLabel.setLabelFor(myBookmarkName);

  myActiveCheckbox = new JBCheckBox("Inactive", false);

  contentPanel.add(icon, g.nextLine().next().coverColumn(3).pady(DEFAULT_HGAP));
  contentPanel.add(bookmarkLabel, g.next().fillCellNone().insets(new Insets(0, 6, DEFAULT_VGAP, DEFAULT_HGAP)));
  contentPanel.add(myBookmarkName, g.next().coverLine().setDefaultWeightX(1));
  contentPanel.add(myActiveCheckbox, g.nextLine().next().next().coverLine(2));
  return contentPanel;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:31,代碼來源:HgBookmarkDialog.java

示例6: getQuestionIcon

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@NotNull
public static Icon getQuestionIcon() {
  return UIUtil.getQuestionIcon();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:Messages.java


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