本文整理匯總了Java中com.intellij.util.ui.UIUtil.getInformationIcon方法的典型用法代碼示例。如果您正苦於以下問題:Java UIUtil.getInformationIcon方法的具體用法?Java UIUtil.getInformationIcon怎麽用?Java UIUtil.getInformationIcon使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.util.ui.UIUtil
的用法示例。
在下文中一共展示了UIUtil.getInformationIcon方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: showMessageDialog
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public int showMessageDialog(@NotNull String title,
String message,
@NotNull String[] buttons,
boolean errorStyle,
@Nullable Window window,
int defaultOptionIndex,
int focusedOptionIndex,
@Nullable DialogWrapper.DoNotAskOption doNotAskDialogOption) {
if (window == null) {
window = getForemostWindow(null);
}
Icon icon = errorStyle ? UIUtil.getErrorIcon() : UIUtil.getInformationIcon();
final String defaultOptionTitle = defaultOptionIndex != -1 ? buttons[defaultOptionIndex] : null;
final String focusedButtonTitle = focusedOptionIndex != -1 ? buttons[focusedOptionIndex] : null;
final SheetMessage sheetMessage = new SheetMessage(window, title, message, icon, buttons, doNotAskDialogOption, defaultOptionTitle, focusedButtonTitle);
String result = sheetMessage.getResult();
for (int i = 0; i < buttons.length; i++) {
if (result.equals(buttons[i])) {
if (doNotAskDialogOption != null) {
doNotAskDialogOption.setToBeShown(sheetMessage.toBeShown(), i);
}
return i;
}
}
return -1;
}
示例2: showOkMessageDialog
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public void showOkMessageDialog(@NotNull String title, String message, @NotNull String okText, @Nullable Window window) {
if (window == null) {
window = getForemostWindow(null);
}
new SheetMessage(window, title, message, UIUtil.getInformationIcon(), new String [] {okText}, null, okText, okText);
}
示例3: getInformationIcon
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@NotNull
public static Icon getInformationIcon() {
return UIUtil.getInformationIcon();
}