The goog.ui.editor.AbstractDialog.Builder Class

goog.ui.editor.AbstractDialog.Builder(editorDialog)

A builder class for the dialog control. All methods except build return this.

editorDialog {goog.ui.editor.AbstractDialog}
Editor dialog object that will wrap the wrapped dialog object this builder will create.

.addButton(label, handler, opt_buttonId)

Adds a custom button to the dialog.

label {string}
The caption for the button.
handler {function(goog.ui.Dialog.EventType):*}
Function called when the button is clicked. It is recommended that this function be a method in the concrete subclass of AbstractDialog using this Builder, and that it dispatch an event (see {@link handleOk}).
opt_buttonId {string=}
Identifier to be used to access the button when calling AbstractDialog.getButtonElement().
returns {goog.ui.editor.AbstractDialog.Builder}
This.

.addCancelButton(opt_label)

Adds a Cancel button to the dialog. Clicking this button will cause {@link handleCancel} to run, subsequently dispatching a CANCEL event.

opt_label {string=}
The caption for the button, if not "Cancel".
returns {goog.ui.editor.AbstractDialog.Builder}
This.

.addClassName(className)

Puts a CSS class on the dialog's main element.

className {string}
The class to add.
returns {goog.ui.editor.AbstractDialog.Builder}
This.

.addOkButton(opt_label)

Adds an OK button to the dialog. Clicking this button will cause {@link handleOk} to run, subsequently dispatching an OK event.

opt_label {string=}
The caption for the button, if not "OK".
returns {goog.ui.editor.AbstractDialog.Builder}
This.

.build()

Builds the wrapped dialog control. May only be called once, after which no more methods may be called on this builder.

returns {goog.ui.Dialog}
The wrapped dialog control.

.setContent(contentElem)

Sets the content element of the dialog.

contentElem {Element}
An element for the main body.
returns {goog.ui.editor.AbstractDialog.Builder}
This.

.setTitle(title)

Sets the title of the dialog.

title {string}
Title HTML (escaped).
returns {goog.ui.editor.AbstractDialog.Builder}
This.