ui.registry

Classes


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 »

Global Properties

goog.ui.registry.decoratorFunctions_ :
Map of CSS class names to registry factory functions. The keys are class names. The values are function objects that return new instances of goog.ui.registry or one of its subclasses, suitable to decorate elements marked with the corresponding CSS class. Used by containers while decorating their children.
Code »
goog.ui.registry.defaultRenderers_ :
Map of goog.ui.Component constructor unique IDs to the constructors of their default goog.ui.Renderers.
Code »

Package ui

Package Reference