goog.ui.ColorSplitBehavior
Classgoog.ui.ColorSplitBehavior
> goog.ui.SplitBehavior
> goog.Disposable
goog.ui.ColorSplitBehavior(colorButton, opt_domHelper)
Constructs a ColorSplitBehavior for combining a color button and a menu. To use this, provide a goog.ui.ColorButton which will be attached with a goog.ui.ColorMenuButton (with no caption). Whenever a color is selected from the ColorMenuButton, it will be placed in the ColorButton and the user can apply it over and over (by clicking the ColorButton). Primary use case - setting the color of text/background in a text editor.
colorButton
{!goog.ui.Button
}
opt_domHelper
{goog.dom.DomHelper
=}
.addOnDisposeCallback(callback, opt_scope)
Inherited from goog.Disposable
.
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
callback
{!Function
}
opt_scope
{Object
=}
.creationStack
{string
}Inherited from goog.Disposable
.
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
.decorate(element, opt_activate)
Inherited from goog.ui.SplitBehavior
.
Decorates an element and returns the behavior.
element
{Element
}
opt_activate
{boolean
=}
goog.ui.SplitBehavior
}
.dispose()
Inherited from goog.Disposable
.
Disposes of the object. If the object hasn't already been disposed of, calls {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should override {@link #disposeInternal} in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
void
}
.disposeInternal()
[protected]Inherited from goog.ui.SplitBehavior
.
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()
Inherited from goog.ui.SplitBehavior
.
function
(goog.ui.Control
,Event
)}
.getDisposed
[deprecated]Deprecated. Use {@link #isDisposed} instead.
Inherited from goog.Disposable
.
boolean
}
.getElement()
Inherited from goog.ui.SplitBehavior
.
Element
}
.getEventType()
Inherited from goog.ui.SplitBehavior
.
string
}
.isDisposed()
Inherited from goog.Disposable
.
boolean
}
.registerDisposable(disposable)
Inherited from goog.Disposable
.
Associates a disposable object with this object so that they will be disposed together.
disposable
{goog.disposable.IDisposable
}
.render(element, opt_activate)
Inherited from goog.ui.SplitBehavior
.
Renders an element and returns the behavior.
element
{Element
}
opt_activate
{boolean
=}
goog.ui.SplitBehavior
}
.setActive(activate)
Inherited from goog.ui.SplitBehavior
.
Activate or deactivate the behavior.
activate
{boolean
}
.setDisposeControls(disposeFirst, disposeSecond)
Inherited from goog.ui.SplitBehavior
.
Sets the disposeControls flags.
disposeFirst
{boolean
}
disposeSecond
{boolean
}
.setEventType(eventType)
Inherited from goog.ui.SplitBehavior
.
Sets the behavior event type.
eventType
{string
}
.setHandler(behaviorHandler)
Inherited from goog.ui.SplitBehavior
.
Sets the behavior handler.
behaviorHandler
{function
(goog.ui.Control
,Event
)}