Home

# Class goog.ui.Button

A button control, rendered as a native browser button by default.

extends goog.ui.Control

Instance Method Summary
| `disposeInternal()` Disposes of the component. Calls {@code exitDocument}, which is expected to remove event handlers and clean up the component. Propagates the call to the component's children, if any. Removes the component's DOM from the document unless it was decorated.
| `enterDocument()` Configures the component after its DOM has been rendered, and sets up event handling. Overrides {@link goog.ui.Component#enterDocument}.
| `getTooltip() ⇒ (string|undefined)` Returns the tooltip for the button.
| `getValue() ⇒ <Any Type>` Returns the value associated with the button.
| `handleKeyEventInternal(?goog.events.KeyEvent e) ⇒ boolean` Attempts to handle a keyboard event; returns true if the event was handled, false otherwise. If the button is enabled and the Enter/Space key was pressed, handles the event by dispatching an {@code ACTION} event, and returns true. Overrides {@link goog.ui.Control#handleKeyEventInternal}.
| `setCollapsed(number sides)` Collapses the border on one or both sides of the button, allowing it to be combined with the adjancent button(s), forming a single UI componenet with multiple targets.
| `setTooltip(string tooltip)` Sets the tooltip for the button, and updates its DOM.
| `setTooltipInternal(string tooltip)` Sets the tooltip for the button. Unlike {@link #setTooltip}, doesn't update the button's DOM. Considered protected; to be called only by renderer code during element decoration.
| `setValue(<Any Type> value)` Sets the value associated with the button, and updates its DOM.
| `setValueInternal(<Any Type> value)` Sets the value associated with the button. Unlike {@link #setValue}, doesn't update the button's DOM. Considered protected; to be called only by renderer code during element decoration.