toolbarmenubuttonrenderer.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Copyright 2008 The Closure Library Authors. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS-IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /**
  15. * @fileoverview A toolbar menu button renderer.
  16. *
  17. * @author attila@google.com (Attila Bodis)
  18. */
  19. goog.provide('goog.ui.ToolbarMenuButtonRenderer');
  20. goog.require('goog.ui.MenuButtonRenderer');
  21. /**
  22. * Toolbar-specific renderer for {@link goog.ui.MenuButton}s, based on {@link
  23. * goog.ui.MenuButtonRenderer}.
  24. * @constructor
  25. * @extends {goog.ui.MenuButtonRenderer}
  26. */
  27. goog.ui.ToolbarMenuButtonRenderer = function() {
  28. goog.ui.MenuButtonRenderer.call(this);
  29. };
  30. goog.inherits(goog.ui.ToolbarMenuButtonRenderer, goog.ui.MenuButtonRenderer);
  31. goog.addSingletonGetter(goog.ui.ToolbarMenuButtonRenderer);
  32. /**
  33. * Default CSS class to be applied to the root element of menu buttons rendered
  34. * by this renderer.
  35. * @type {string}
  36. */
  37. goog.ui.ToolbarMenuButtonRenderer.CSS_CLASS =
  38. goog.getCssName('goog-toolbar-menu-button');
  39. /**
  40. * Returns the CSS class to be applied to the root element of menu buttons
  41. * rendered using this renderer.
  42. * @return {string} Renderer-specific CSS class.
  43. * @override
  44. */
  45. goog.ui.ToolbarMenuButtonRenderer.prototype.getCssClass = function() {
  46. return goog.ui.ToolbarMenuButtonRenderer.CSS_CLASS;
  47. };