registry.js
No description.

File Location

/goog/ui/registry.js


Public Protected Private

Global Functions

goog.ui.registry.getDecorator(element) ?goog.ui.Component
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}.
Arguments:
element : Element
Element to decorate.
Returns: ?goog.ui.Component  Component to decorate the element (null if none).
code »
goog.ui.registry.getDecoratorByClassName(className) ?goog.ui.Component
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.
Arguments:
className : string
CSS class name.
Returns: ?goog.ui.Component  Component instance.
code »
goog.ui.registry.getDefaultRenderer(componentCtor) ?goog.ui.ControlRenderer
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.
Arguments:
componentCtor : Function
Component constructor function (for example goog.ui.Button).
Returns: ?goog.ui.ControlRenderer  Renderer instance (for example the singleton instance of goog.ui.ButtonRenderer), or null if no default renderer was found.
code »
goog.ui.registry.reset()
Resets the global renderer and decorator registry.
code »
goog.ui.registry.setDecoratorByClassName(classNamedecoratorFn)
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.
Arguments:
className : string
CSS class name.
decoratorFn : Function
No-argument function that returns a new instance of a goog.ui.Component to decorate an element.
code »
goog.ui.registry.setDefaultRenderer(componentCtorrendererCtor)
Sets the default renderer for the given goog.ui.Component constructor.
Arguments:
componentCtor : Function
Component constructor function (for example goog.ui.Button).
rendererCtor : Function
Renderer constructor function (for example goog.ui.ButtonRenderer).
code »

Directory ui

File Reference