本文整理匯總了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));
}
}