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


Java Messages.getQuestionIcon方法代碼示例

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


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

示例1: createCenterPanel

import com.intellij.openapi.ui.Messages; //導入方法依賴的package包/類
protected JComponent createCenterPanel() {
  final JPanel panel = new JPanel(new GridBagLayout());
  final JLabel header = new JLabel(UIBundle.message("label.class.filter.editor.add.dialog.filter.pattern"));
  myClassName = new TextFieldWithBrowseButton(new JTextField(35));
  final JLabel iconLabel = new JLabel(Messages.getQuestionIcon());
  
  panel.add(header, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 0, 0), 0, 0));
  panel.add(myClassName, new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 0, 0), 0, 0));
  panel.add(iconLabel, new GridBagConstraints(0, 0, 1, 2, 0.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(15, 0, 0, 0), 0, 0));

  myClassName.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      PsiClass currentClass = getSelectedClass();
      TreeClassChooser chooser = TreeClassChooserFactory.getInstance(myProject).createNoInnerClassesScopeChooser(
        UIBundle.message("class.filter.editor.choose.class.title"), GlobalSearchScope.allScope(myProject), null, null);
      if (currentClass != null) {
        PsiFile containingFile = currentClass.getContainingFile();
        if (containingFile != null) {
          PsiDirectory containingDirectory = containingFile.getContainingDirectory();
          if (containingDirectory != null) {
            chooser.selectDirectory(containingDirectory);
          }
        }
      }
      chooser.showDialog();
      PsiClass selectedClass = chooser.getSelected();
      if (selectedClass != null) {
        myClassName.setText(selectedClass.getQualifiedName());
      }
    }
  });

  myClassName.setEnabled(myProject != null);

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

示例2: createNorthPanel

import com.intellij.openapi.ui.Messages; //導入方法依賴的package包/類
protected JComponent createNorthPanel() {
  JLabel label = new JLabel(myMessage);
  label.setUI(new MultiLineLabelUI());
  JPanel panel = new JPanel(new BorderLayout());
  panel.add(label, BorderLayout.CENTER);
  Icon icon = Messages.getQuestionIcon();
  if (icon != null) {
    label.setIcon(icon);
    label.setIconTextGap(7);
  }
  return panel;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:13,代碼來源:YesNoPreviewUsagesDialog.java

示例3: createNorthPanel

import com.intellij.openapi.ui.Messages; //導入方法依賴的package包/類
@Override
public JComponent createNorthPanel() {
  JPanel panel = new JPanel(new BorderLayout());
  panel.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
  Icon icon = Messages.getQuestionIcon();
  JLabel iconLabel = new JLabel(icon);
  panel.add(iconLabel, BorderLayout.WEST);
  JLabel label = new JLabel(getMessage());
  label.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 10));
  label.setForeground(JBColor.foreground());
  panel.add(label, BorderLayout.CENTER);
  return panel;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:14,代碼來源:ReplacePromptDialog.java

示例4: MyExternalPromptDialog

import com.intellij.openapi.ui.Messages; //導入方法依賴的package包/類
public MyExternalPromptDialog(final Project project) {
  super(project, MESSAGE, ProjectBundle.message("external.annotation.prompt"), Messages.getQuestionIcon());
  myProject = project;
  init();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:ExternalAnnotationsManagerImpl.java


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