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