本文整理匯總了Java中com.intellij.util.ui.UIUtil.getQuestionIcon方法的典型用法代碼示例。如果您正苦於以下問題:Java UIUtil.getQuestionIcon方法的具體用法?Java UIUtil.getQuestionIcon怎麽用?Java UIUtil.getQuestionIcon使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.util.ui.UIUtil
的用法示例。
在下文中一共展示了UIUtil.getQuestionIcon方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createNorthPanel
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
protected JComponent createNorthPanel() {
JLabel label = new JLabel(DebuggerBundle.message("hotswap.dialog.run.prompt"));
JPanel panel = new JPanel(new BorderLayout());
panel.add(label, BorderLayout.CENTER);
Icon icon = UIUtil.getQuestionIcon();
if (icon != null) {
label.setIcon(icon);
label.setIconTextGap(7);
}
if (myDisplayHangWarning) {
final JLabel warningLabel = new JLabel("WARNING! " + DebuggerBundle.message("hotswap.dialog.hang.warning"));
warningLabel.setUI(new MultiLineLabelUI());
panel.add(warningLabel, BorderLayout.SOUTH);
}
return panel;
}
示例2: showYesNoCancelDialog
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public int showYesNoCancelDialog(@NotNull String title,
String message,
@NotNull String defaultButton,
String alternateButton,
String otherButton,
@Nullable Window window,
@Nullable DialogWrapper.DoNotAskOption doNotAskOption) {
if (window == null) {
window = getForemostWindow(null);
}
SheetMessage sheetMessage = new SheetMessage(window, title, message, UIUtil.getQuestionIcon(),
new String [] {defaultButton, otherButton, alternateButton},
doNotAskOption, defaultButton, alternateButton);
String resultString = sheetMessage.getResult();
int result = resultString.equals(defaultButton) ? Messages.YES : resultString.equals(alternateButton) ? Messages.NO : Messages.CANCEL;
if (doNotAskOption != null) {
doNotAskOption.setToBeShown(sheetMessage.toBeShown(), result);
}
return result;
}
示例3: showYesNoDialog
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public int showYesNoDialog(@NotNull String title,
String message,
@NotNull String yesButton,
@NotNull String noButton,
@Nullable Window window,
@Nullable DialogWrapper.DoNotAskOption doNotAskDialogOption) {
if (window == null) {
window = getForemostWindow(null);
}
SheetMessage sheetMessage = new SheetMessage(window, title, message, UIUtil.getQuestionIcon(),
new String [] {yesButton, noButton}, doNotAskDialogOption, yesButton, noButton);
int result = sheetMessage.getResult().equals(yesButton) ? Messages.YES : Messages.NO;
if (doNotAskDialogOption != null && (result == Messages.YES || doNotAskDialogOption.shouldSaveOptionsOnCancel())) {
doNotAskDialogOption.setToBeShown(sheetMessage.toBeShown(), result);
}
return result;
}
示例4: createCenterPanel
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
protected JComponent createCenterPanel() {
JBLabel desc = new JBLabel(wrapInHtml(makeDescription()));
JPanel options = new JPanel(new BorderLayout());
if (!myRebaseOverMergeProblemDetected) {
options.add(myAutoUpdateInFuture, BorderLayout.SOUTH);
}
if (!GitUtil.justOneGitRepository(myProject)) {
options.add(myUpdateAllRoots);
}
final int GAP = 15;
JPanel rootPanel = new JPanel(new BorderLayout(GAP, GAP));
rootPanel.add(desc);
rootPanel.add(options, BorderLayout.SOUTH);
JLabel iconLabel = new JLabel(myRebaseOverMergeProblemDetected ? UIUtil.getWarningIcon() : UIUtil.getQuestionIcon());
rootPanel.add(iconLabel, BorderLayout.WEST);
return rootPanel;
}
示例5: createCenterPanel
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
@NotNull
protected JComponent createCenterPanel() {
JPanel contentPanel = new JPanel(new GridBagLayout());
GridBag g = new GridBag()
.setDefaultInsets(new Insets(0, 0, DEFAULT_VGAP, DEFAULT_HGAP))
.setDefaultAnchor(GridBagConstraints.LINE_START)
.setDefaultFill(GridBagConstraints.HORIZONTAL);
JLabel icon = new JLabel(UIUtil.getQuestionIcon(), SwingConstants.LEFT);
myBookmarkName = new JBTextField(13);
myBookmarkName.getDocument().addDocumentListener(new DocumentAdapter() {
@Override
public void textChanged(DocumentEvent e) {
validateFields();
}
});
JBLabel bookmarkLabel = new JBLabel("Bookmark name:");
bookmarkLabel.setLabelFor(myBookmarkName);
myActiveCheckbox = new JBCheckBox("Inactive", false);
contentPanel.add(icon, g.nextLine().next().coverColumn(3).pady(DEFAULT_HGAP));
contentPanel.add(bookmarkLabel, g.next().fillCellNone().insets(new Insets(0, 6, DEFAULT_VGAP, DEFAULT_HGAP)));
contentPanel.add(myBookmarkName, g.next().coverLine().setDefaultWeightX(1));
contentPanel.add(myActiveCheckbox, g.nextLine().next().next().coverLine(2));
return contentPanel;
}
示例6: getQuestionIcon
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@NotNull
public static Icon getQuestionIcon() {
return UIUtil.getQuestionIcon();
}