containerrenderer.js
Base class for container renderers.

File Location

ui/containerrenderer.js

Classes

goog.ui.ContainerRenderer
Default renderer for {@link goog.ui.Container}. Can be used as-is, but subclasses of Container will probably want to use renderers specifically tailored for them by extending this class.

Public Protected Private

Global Functions

goog.ui.ContainerRenderer.getCustomRenderer(ctorcssClassName)
Constructs a new renderer and sets the CSS class that the renderer will use as the base CSS class to apply to all elements rendered by that renderer. An example to use this function using a menu is:
var myCustomRenderer = goog.ui.ContainerRenderer.getCustomRenderer(
goog.ui.MenuRenderer, 'my-special-menu');
var newMenu = new goog.ui.Menu(opt_domHelper, myCustomRenderer);
Your styles for the menu can now be:
.my-special-menu { }
instead of
.CSS_MY_SPECIAL_MENU .goog-menu { }
You would want to use this functionality when you want an instance of a component to have specific styles different than the other components of the same type in your application. This avoids using descendant selectors to apply the specific styles to this component.
Arguments:
ctor :
The constructor of the renderer you want to create.
cssClassName :
The name of the CSS class for this renderer.
Returns:   An instance of the desired renderer with its getCssClass() method overridden to return the supplied custom CSS class name.
code »

Global Properties

goog.ui.ContainerRenderer.CSS_CLASS :
Default CSS class to be applied to the root element of containers rendered by this renderer.
Code »

Directory ui

File Reference