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.
Returns the CSS class to be applied to the root element of components
rendered using this renderer.
Returns: string
Renderer-specific CSS class.
|
code » | |||
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:
Returns: goog.ui.ContainerRenderer
An instance of the desired renderer with
its getCssClass() method overridden to return the supplied custom CSS
class name.
|
code » | |||
![]()
No description.
|
code » |