Home

# Class goog.ui.SplitBehavior

Creates a behavior for combining two controls. The behavior is triggered by a given event type which applies the behavior handler. Can be used to also render or decorate the controls. For a usage example see {@link goog.ui.ColorSplitBehavior}

extends goog.Disposable

Instance Method Summary
| `collapseSides_(?goog.ui.Control first, ?goog.ui.Control second)` Collapse the the controls together.
| `decorate(?Element element, boolean= opt_activate) ⇒ ?goog.ui.SplitBehavior` Decorates an element and returns the behavior.
| `decorateChildren_(?Element element)` Decorates two child nodes of the given element.

`disposeInternal()`

Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend {@code goog.Disposable} should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' {@code disposeInternal} method. Everywhere else the public {@code dispose} method must be used. For example:

    mypackage.MyClass = function() {
    goog.base(this);
    // Constructor logic specific to MyClass.
    ...
    };
    goog.inherits(mypackage.MyClass, goog.Disposable);

    mypackage.MyClass.prototype.disposeInternal = function() {
    goog.base(this, 'disposeInternal');
    // Dispose logic specific to MyClass.
    ...
    };

| `getBehaviorHandler() ⇒ function ((goog.ui.Control|null), (Event|null)): ?`
| `getElement() ⇒ ?Element`
| `getEventType() ⇒ string`
| `render(?Element element, boolean= opt_activate) ⇒ ?goog.ui.SplitBehavior` Renders an element and returns the behavior.
| `setActive(boolean activate)` Activate or deactivate the behavior.
| `setDisposeControls(boolean disposeFirst, boolean disposeSecond)` Sets the disposeControls flags.
| `setEventType(string eventType)` Sets the behavior event type.
| `setHandler(function ((goog.ui.Control|null), (Event|null)): ? behaviorHandler)` Sets the behavior handler.