Home

# Class goog.ui.editor.AbstractDialog

Creates an object that represents a dialog box.

extends goog.events.EventTarget

Instance Method Summary
| `createDialogControl() ⇒ ?goog.ui.Dialog` Creates and returns the goog.ui.Dialog control that is being wrapped by this object.
| `createOkEvent(?goog.events.Event e) ⇒ ?goog.events.Event` Creates and returns the event object to be used when dispatching the OK event to listeners, or returns null to prevent the dialog from closing. Subclasses should override this to return their own subclass of goog.events.Event that includes all data a plugin would need from the dialog.
| `disposeInternal()` Disposes of the dialog. If the dialog is open, it will be hidden and AFTER_HIDE will be dispatched.
| `getButtonElement(string buttonId) ⇒ ?Element` Returns the HTML Button element for the button added to this dialog with the given button id.
| `getCancelButtonElement() ⇒ ?Element` Returns the HTML Button element for the Cancel button in this dialog.
| `getOkButtonElement() ⇒ ?Element` Returns the HTML Button element for the OK button in this dialog.
| `handleAfterHide_()` Cleans up after the dialog is hidden and fires the AFTER_HIDE event. Should be a listener for the wrapped dialog's AFTER_HIDE event.
| `handleCancel() ⇒ boolean` Handles the event dispatched by the wrapped dialog control when the user clicks the Cancel button. Simply dispatches a CANCEL event.
| `handleOk(?goog.ui.Dialog.Event e) ⇒ boolean` Handles the event dispatched by the wrapped dialog control when the user clicks the OK button. Attempts to create the OK event object and dispatches it if successful.
| `hide()` Hides the dialog, causing AFTER_HIDE to fire.
| `isOpen() ⇒ boolean`
| `processOkAndClose()` Runs the handler registered on the OK button event and closes the dialog if that handler succeeds. This is useful in cases such as double-clicking an item in the dialog is equivalent to selecting it and clicking the default button.
| `show()` Causes the dialog box to appear, centered on the screen. Lazily creates the dialog if needed.