Package components

Class AlertDialog

java.lang.Object
com.intellij.openapi.ui.DialogWrapper
components.AlertDialog

public class AlertDialog extends com.intellij.openapi.ui.DialogWrapper
This class is used to create a dialog to show alert message.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.intellij.openapi.ui.DialogWrapper

    com.intellij.openapi.ui.DialogWrapper.CancelAction, com.intellij.openapi.ui.DialogWrapper.DialogStyle, com.intellij.openapi.ui.DialogWrapper.DialogWrapperAction, com.intellij.openapi.ui.DialogWrapper.DialogWrapperExitAction, com.intellij.openapi.ui.DialogWrapper.DoNotAskOption, com.intellij.openapi.ui.DialogWrapper.HelpAction, com.intellij.openapi.ui.DialogWrapper.IdeModalityType, com.intellij.openapi.ui.DialogWrapper.OkAction
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Icon
    The icon of the alert message.
    private final String
    The label of the alert message.

    Fields inherited from class com.intellij.openapi.ui.DialogWrapper

    CANCEL_EXIT_CODE, CLOSE_EXIT_CODE, DEFAULT_ACTION, DIALOG_CONTENT_PANEL_PROPERTY, ERROR_FOREGROUND_COLOR, FOCUSED_ACTION, IS_VISUAL_PADDING_COMPENSATED_ON_COMPONENT_LEVEL_KEY, myCancelAction, myCheckBoxDoNotShowDialog, myDisposable, myHelpAction, myOKAction, myPerformAction, myPreferredFocusedComponent, NEXT_USER_EXIT_CODE, OK_EXIT_CODE
  • Constructor Summary

    Constructors
    Constructor
    Description
    AlertDialog(String label, Icon icon)
    The constructor of the class.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Action @NotNull []
    Create the OK button.
    protected @Nullable JComponent
    Create the center panel of the dialog.

    Methods inherited from class com.intellij.openapi.ui.DialogWrapper

    addKeyListener, addMouseListener, addMouseListener, applyFields, beforeShowCallback, canRecordDialogId, centerRelativeToParent, cleanupRootPane, cleanupWindowListeners, clickDefaultButton, close, close, continuousValidation, createButtonsPanel, createCancelAction, createContentPane, createContentPaneBorder, createDefaultActions, createDefaultBorder, createDoNotAskCheckbox, createHelpButton, createJButtonForAction, createJButtonForAction, createLeftSideActions, createNorthPanel, createPeer, createPeer, createPeer, createPeer, createPeer, createRootLayout, createSouthAdditionalPanel, createSouthPanel, createTitlePane, dispose, disposeIfNeeded, doCancelAction, doCancelAction, doHelpAction, doOKAction, doValidate, doValidateAll, extractMnemonic, findInstance, findInstanceFromFocus, fitToScreen, getButton, getButtonMap, getCancelAction, getContentPane, getContentPanel, getDimensionKey, getDimensionServiceKey, getDisposable, getDoNotShowMessage, getErrorTextAlignment, getExitCode, getHelpAction, getHelpId, getHorizontalStretch, getInitialLocation, getInitialSize, getLocation, getOKAction, getOwner, getPeer, getPreferredFocusedComponent, getPreferredSize, getRootPane, getSize, getStyle, getTitle, getValidationThreadToUse, getVerticalStretch, getWindow, hasErrors, init, initResizeListener, initValidation, isAutoAdjustable, isDisposed, isModal, isModalProgress, isMoveHelpButtonLeft, isOK, isOKActionEnabled, isProgressDialog, isResizable, isShowing, isVisible, layoutButtonsPanel, pack, performOKAction, performValidateAll, postponeValidation, processDoNotAskOnOk, repaint, setAutoAdjustable, setButtonsAlignment, setCancelButtonText, setCrossClosesWindow, setDoNotAskOption, setDoNotAskOption, setErrorInfoAll, setErrorText, setErrorText, setHelpTooltip, setHorizontalStretch, setInitialLocationCallback, setLocation, setLocation, setModal, setOKActionEnabled, setOKButtonIcon, setOKButtonMnemonic, setOKButtonText, setOKButtonTooltip, setOnDeactivationAction, setResizable, setSize, setTitle, setUndecorated, setValidationDelay, setVerticalStretch, shouldAddErrorNearButtons, shouldCloseOnCross, show, showAndGet, showAndGetOk, startTrackingValidation, toBack, toBeShown, toFront, unregisterKeyboardActions, updateErrorInfo, validate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • label

      private final String label
      The label of the alert message.
    • icon

      private final Icon icon
      The icon of the alert message.
  • Constructor Details

    • AlertDialog

      public AlertDialog(String label, Icon icon)
      The constructor of the class.
      Parameters:
      label - The alert message.
      icon - The icon of the alert message.
  • Method Details

    • createActions

      protected Action @NotNull [] createActions()
      Create the OK button.
      Overrides:
      createActions in class com.intellij.openapi.ui.DialogWrapper
      Returns:
      The OK button.
    • createCenterPanel

      @Nullable protected @Nullable JComponent createCenterPanel()
      Create the center panel of the dialog.
      Specified by:
      createCenterPanel in class com.intellij.openapi.ui.DialogWrapper
      Returns:
      The center panel of the dialog.