Class InputDialogWithCheckbox

java.lang.Object
com.intellij.openapi.ui.DialogWrapper
com.intellij.openapi.ui.messages.MessageDialog
com.intellij.openapi.ui.Messages.InputDialog
com.redhat.devtools.intellij.common.ui.InputDialogWithCheckbox

public class InputDialogWithCheckbox extends com.intellij.openapi.ui.Messages.InputDialog
This class is a copy of the private Jetbrains class InputDialogWithCheckbox The difference is that this class allows to customize the behavior of the textfield based on the checkbox state (enable/disable it when the checkbox is selected)
  • 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 inherited from class com.intellij.openapi.ui.Messages.InputDialog

    INPUT_DIALOG_COLUMNS, myField

    Fields inherited from class com.intellij.openapi.ui.messages.MessageDialog

    myDefaultOptionIndex, myFocusedOptionIndex, myIcon, myMessage, myOptions

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

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

    Constructors
    Constructor
    Description
    InputDialogWithCheckbox(String message, String title, String checkboxText, boolean checked, boolean checkboxEnabled, @Nullable Icon icon, @Nullable @NlsSafe String initialValue, @Nullable com.intellij.openapi.ui.InputValidator validator)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected @NotNull JPanel
     
     
     
    void
    Disable the textbox field when the checkbox is checked
    void
    Enable the textbox field when the checkbox is checked

    Methods inherited from class com.intellij.openapi.ui.Messages.InputDialog

    createActions, createCenterPanel, createNorthPanel, createScrollableTextComponent, createTextComponent, createTextFieldComponent, doOKAction, getInputString, getPreferredFocusedComponent, getTextField

    Methods inherited from class com.intellij.openapi.ui.messages.MessageDialog

    _init, createIconPanel, createMessageComponent, doCancelAction, doCreateCenterPanel, getHelpId

    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, createPeer, createPeer, createPeer, createPeer, createPeer, createRootLayout, createSouthAdditionalPanel, createSouthPanel, createSouthPanel, createTitlePane, dispose, disposeIfNeeded, doCancelAction, doHelpAction, doValidate, doValidateAll, extractMnemonic, findInstance, findInstanceFromFocus, fitToScreen, getButton, getButtonMap, getCancelAction, getContentPane, getContentPanel, getDimensionKey, getDimensionServiceKey, getDisposable, getDoNotShowMessage, getErrorTextAlignment, getExitCode, getHelpAction, getHorizontalStretch, getInitialLocation, getInitialSize, getLocation, getOKAction, getOwner, getPeer, getPreferredSize, getRootPane, getSize, getStyle, getTitle, getValidationThreadToUse, getVerticalStretch, getWindow, hasErrors, init, initResizeListener, initValidation, isAutoAdjustable, isDisposed, isKeepPopupsOpen, isModal, isModalProgress, isMoveHelpButtonLeft, isOK, isOKActionEnabled, isProgressDialog, isResizable, isShowing, isVisible, layoutButtonsPanel, pack, performOKAction, performValidateAll, postponeValidation, processDoNotAskOnOk, repaint, setAutoAdjustable, setButtonsAlignment, setCancelButtonText, setCrossClosesWindow, setDoNotAskOption, setDoNotAskOption, setErrorHtml, setErrorHtml, setErrorInfoAll, setErrorText, setErrorText, setHelpTooltip, setHorizontalStretch, setInitialLocationCallback, setKeepPopupsOpen, setLocation, setLocation, setModal, setOKActionEnabled, setOKButtonIcon, setOKButtonMnemonic, setOKButtonText, setOKButtonTooltip, setOnDeactivationAction, setResizable, setSize, setSizeDuringPack, setTitle, setUndecorated, setValidationDelay, setVerticalStretch, shouldAddErrorNearButtons, shouldCloseOnCross, show, showAndGet, showAndGetOk, sortActionsOnMac, startTrackingValidation, toBack, toBeShown, toFront, updateErrorInfo, validate

    Methods inherited from class java.lang.Object

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

    • InputDialogWithCheckbox

      public InputDialogWithCheckbox(String message, String title, String checkboxText, boolean checked, boolean checkboxEnabled, @Nullable @Nullable Icon icon, @Nullable @NlsSafe @Nullable @NlsSafe String initialValue, @Nullable @Nullable com.intellij.openapi.ui.InputValidator validator)
  • Method Details

    • createMessagePanel

      @NotNull protected @NotNull JPanel createMessagePanel()
      Overrides:
      createMessagePanel in class com.intellij.openapi.ui.Messages.InputDialog
    • getMyCheckBox

      public JCheckBox getMyCheckBox()
    • setEnableTextPanelWithCheckbox

      public void setEnableTextPanelWithCheckbox()
      Enable the textbox field when the checkbox is checked
    • setDisableTextPanelWithCheckbox

      public void setDisableTextPanelWithCheckbox()
      Disable the textbox field when the checkbox is checked
    • isChecked

      public Boolean isChecked()