Java 类com.intellij.ui.popup.NotificationPopup 实例源码

项目:intellij-ce-playground    文件:IdeMessagePanel.java   
void updateFatalErrorsIcon() {
  final IdeFatalErrorsIcon.State state = computeState();
  updateState(state);

  if (state == IdeFatalErrorsIcon.State.NoErrors) {
    myNotificationPopupAlreadyShown = false;
  }
  else if (state == IdeFatalErrorsIcon.State.UnreadErrors && !myNotificationPopupAlreadyShown) {
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        String notificationText = tryGetFromMessages(myMessagePool.getFatalErrors(false, false));
        if (notificationText == null) {
          notificationText = INTERNAL_ERROR_NOTICE;
        }
        final JLabel label = new JLabel(notificationText);
        label.setIcon(AllIcons.Ide.FatalError);
        new NotificationPopup(IdeMessagePanel.this, label, LightColors.RED, false, new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            _openFatals(null);
          }
        }, true);
      }
    });
    myNotificationPopupAlreadyShown = true;
  }
}
项目:tools-idea    文件:IdeMessagePanel.java   
void updateFatalErrorsIcon() {
  final IdeFatalErrorsIcon.State state = computeState();
  updateState(state);

  if (state == IdeFatalErrorsIcon.State.NoErrors) {
    myNotificationPopupAlreadyShown = false;
  }
  else if (state == IdeFatalErrorsIcon.State.UnreadErrors && !myNotificationPopupAlreadyShown) {
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        String notificationText = tryGetFromMessages(myMessagePool.getFatalErrors(false, false));
        if (notificationText == null) {
          notificationText = INTERNAL_ERROR_NOTICE;
        }
        final JLabel label = new JLabel(notificationText);
        label.setIcon(AllIcons.Ide.FatalError);
        new NotificationPopup(IdeMessagePanel.this, label, LightColors.RED, false, new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            _openFatals(null);
          }
        }, true);
      }
    });
    myNotificationPopupAlreadyShown = true;
  }
}
项目:intellij-ce-playground    文件:IdeStatusBarImpl.java   
@Override
public void fireNotificationPopup(@NotNull JComponent content, Color backgroundColor) {
  new NotificationPopup(this, content, backgroundColor);
}
项目:tools-idea    文件:IdeStatusBarImpl.java   
public void fireNotificationPopup(@NotNull JComponent content, Color backgroundColor) {
  new NotificationPopup(this, content, backgroundColor);
}
项目:consulo    文件:IdeStatusBarImpl.java   
@Override
public void fireNotificationPopup(@Nonnull JComponent content, Color backgroundColor) {
  new NotificationPopup(this, content, backgroundColor);
}