goog.ui.registry
Functions
getDecorator( element ) → (goog.ui.Component|null)
(goog.ui.Component|null)
Returns an instance of goog.ui.Component
or a subclass suitable to
decorate the given element, based on its CSS class.
TODO(nnaze): Type of element should be {!Element}.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
getDecoratorByClassName( className ) → (goog.ui.Component|null)
(goog.ui.Component|null)
Returns the goog.ui.Component
instance created by the decorator
factory function registered for the given CSS class name, or null if no
decorator factory function was found.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
getDefaultRenderer( componentCtor ) → (goog.ui.ControlRenderer|null)
(goog.ui.ControlRenderer|null)
Given a goog.ui.Component
constructor, returns an instance of its
default renderer. If the default renderer is a singleton, returns the
singleton instance; otherwise returns a new instance of the renderer class.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
reset() → void
void
Resets the global renderer and decorator registry.
setDecoratorByClassName( className, decoratorFn ) → void
void
Maps a CSS class name to a function that returns a new instance of
goog.ui.Component
or a subclass, suitable to decorate an element
that has the specified CSS class.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Throws |
|
setDefaultRenderer( componentCtor, rendererCtor ) → void
void
Sets the default renderer for the given goog.ui.Component
constructor.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Throws |
|