diff --git a/topics/user_interface_components/dialog_wrapper.md b/topics/user_interface_components/dialog_wrapper.md index e2d8b45c5..f1126405b 100644 --- a/topics/user_interface_components/dialog_wrapper.md +++ b/topics/user_interface_components/dialog_wrapper.md @@ -8,15 +8,15 @@ The [`DialogWrapper`](upsource:///platform/platform-api/src/com/intellij/openapi It provides the following features: -* Button layout (platform-specific order of _OK_/_Cancel_ buttons, macOS-specific `Help` button) +* Button layout (platform-specific order of OK/Cancel buttons, macOS-specific Help button) * Context help * Remembering the size of the dialog * Non-modal validation (displaying an error message text when the data entered into the dialog is not valid) * Keyboard shortcuts: * Esc for closing the dialog * Left/Right for switching between buttons - * Y/N for _Yes_/_No_ actions if they exist in the dialog -* Optional _Do not ask again_ checkbox + * Y/N for Yes/No actions if they exist in the dialog +* Optional Do not ask again checkbox When using the [`DialogWrapper`](upsource:///platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java) class for a dialog, follow these steps: @@ -40,7 +40,7 @@ When using Kotlin, use [Kotlin UI DSL](kotlin_ui_dsl.md) to provide the dialog's To display the dialog, call the `show()` method and then use the `getExitCode()` method to check how the dialog was closed. The `showAndGet()` method can be used to combine these two calls. -To customize the buttons displayed in the dialog (replacing the standard _OK_/_Cancel_/_Help_ set of buttons), override either the `createActions()` or `createLeftActions()` methods. +To customize the buttons displayed in the dialog (replacing the standard OK/Cancel/Help set of buttons), override either the `createActions()` or `createLeftActions()` methods. Both of these methods return an array of Swing Action objects. If a button closes the dialog, use [`DialogWrapperExitAction`](upsource:///platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java) as the base class for the action. Use `action.putValue(DialogWrapper.DEFAULT_ACTION, true)` to set the default button. @@ -49,7 +49,7 @@ To validate the data entered into the dialog, override the `doValidate()` method The method will be called automatically by timer. If the currently entered data is valid, return `null`. Otherwise, return a [`ValidationInfo`](upsource:///platform/platform-api/src/com/intellij/openapi/ui/ValidationInfo.java) object which encapsulates an error message, and an optional component associated with the invalid data. -When specifying a component, an error icon will be displayed next to it, and it will be focused when the user tries to invoke the _OK_ action. +When specifying a component, an error icon will be displayed next to it, and it will be focused when the user tries to invoke the OK action. ## Example