本文整理汇总了Java中com.intellij.openapi.ui.Messages.getErrorIcon方法的典型用法代码示例。如果您正苦于以下问题:Java Messages.getErrorIcon方法的具体用法?Java Messages.getErrorIcon怎么用?Java Messages.getErrorIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.ui.Messages
的用法示例。
在下文中一共展示了Messages.getErrorIcon方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: iconForNotificationType
import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
private Icon iconForNotificationType(NotificationType type) {
if (type == NotificationType.WARNING) {
return Messages.getWarningIcon();
} else if (type == NotificationType.ERROR) {
return Messages.getErrorIcon();
} else if (type == NotificationType.INFORMATION) {
return Messages.getInformationIcon();
} else {
return Messages.getErrorIcon();
}
}
示例2: showMessage
import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
private int showMessage(@Nullable Component parentComponent) {
String okText = "Fix it";
String cancelText = CommonBundle.getCancelButtonText();
Icon icon = Messages.getErrorIcon();
String title = myNotificationErrorTitle;
String description = myNotificationErrorDescription;
return parentComponent != null
? Messages.showOkCancelDialog(parentComponent, description, title, okText, cancelText, icon)
: Messages.showOkCancelDialog(myProject, description, title, okText, cancelText, icon);
}
示例3: showErrorDialog
import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
private void showErrorDialog(String message) {
String title = CommonBundle.getErrorTitle();
Icon icon = Messages.getErrorIcon();
if (myDialogParent != null) {
Messages.showMessageDialog(myDialogParent, message, title, icon);
}
else {
Messages.showMessageDialog(myProject, message, title, icon);
}
}
示例4: createComponent
import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Override
protected JComponent createComponent(BufferedImage image) {
if (image == null) {
String message = myError == null ? "Unexpected error while obtaining image" : myError;
return new JLabel(message, Messages.getErrorIcon(), SwingConstants.CENTER);
}
else {
return ImageEditorManagerImpl.createImageEditorUI(image);
}
}
示例5: showErrorDialog
import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
private void showErrorDialog(String message) {
String title = CommonBundle.getErrorTitle();
Icon icon = Messages.getErrorIcon();
Messages.showMessageDialog(component, message, title, icon);
}