本文整理汇总了Java中com.intellij.ui.popup.NotificationPopup类的典型用法代码示例。如果您正苦于以下问题:Java NotificationPopup类的具体用法?Java NotificationPopup怎么用?Java NotificationPopup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NotificationPopup类属于com.intellij.ui.popup包,在下文中一共展示了NotificationPopup类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateFatalErrorsIcon
import com.intellij.ui.popup.NotificationPopup; //导入依赖的package包/类
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;
}
}
示例2: fireNotificationPopup
import com.intellij.ui.popup.NotificationPopup; //导入依赖的package包/类
@Override
public void fireNotificationPopup(@NotNull JComponent content, Color backgroundColor) {
new NotificationPopup(this, content, backgroundColor);
}
示例3: fireNotificationPopup
import com.intellij.ui.popup.NotificationPopup; //导入依赖的package包/类
public void fireNotificationPopup(@NotNull JComponent content, Color backgroundColor) {
new NotificationPopup(this, content, backgroundColor);
}
示例4: fireNotificationPopup
import com.intellij.ui.popup.NotificationPopup; //导入依赖的package包/类
@Override
public void fireNotificationPopup(@Nonnull JComponent content, Color backgroundColor) {
new NotificationPopup(this, content, backgroundColor);
}