本文整理汇总了Java中com.intellij.notification.Notification.getType方法的典型用法代码示例。如果您正苦于以下问题:Java Notification.getType方法的具体用法?Java Notification.getType怎么用?Java Notification.getType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.notification.Notification
的用法示例。
在下文中一共展示了Notification.getType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMaximumType
import com.intellij.notification.Notification; //导入方法依赖的package包/类
@Nullable
private static NotificationType getMaximumType(List<Notification> notifications) {
NotificationType result = null;
for (Notification notification : notifications) {
if (NotificationType.ERROR == notification.getType()) {
return NotificationType.ERROR;
}
if (NotificationType.WARNING == notification.getType()) {
result = NotificationType.WARNING;
}
else if (result == null && NotificationType.INFORMATION == notification.getType()) {
result = NotificationType.INFORMATION;
}
}
return result;
}
示例2: getMessageType
import com.intellij.notification.Notification; //导入方法依赖的package包/类
public static MessageType getMessageType(@NotNull Notification notification) {
switch (notification.getType()) {
case WARNING: return MessageType.WARNING;
case ERROR: return MessageType.ERROR;
case INFORMATION:
default: return MessageType.INFO;
}
}
示例3: getBorderColor
import com.intellij.notification.Notification; //导入方法依赖的package包/类
public static Color getBorderColor(Notification notification) {
switch (notification.getType()) {
case ERROR:
return new JBColor(Color.gray, new Color(0xc8c8c8));
case WARNING:
return new JBColor(Color.gray, new Color(0x615f51));
case INFORMATION:
default:
return new JBColor(Color.gray, new Color(0x205c00));
}
}