Debian Codegraph @

closure-library/closure/goog/ui/toolbarseparator.js

raw
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 /**
16 * @fileoverview A toolbar separator control.
17 *
18 * @author [email protected] (Attila Bodis)
19 */
20
21 goog.provide('goog.ui.ToolbarSeparator');
22
23 goog.require('goog.ui.Separator');
24 goog.require('goog.ui.ToolbarSeparatorRenderer');
25 goog.require('goog.ui.registry');
26
27
28
29 /**
30 * A separator control for a toolbar.
31 *
32 * @param {goog.ui.ToolbarSeparatorRenderer=} opt_renderer Renderer to render or
33 * decorate the separator; defaults to
34 * {@link goog.ui.ToolbarSeparatorRenderer}.
35 * @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper, used for
36 * document interaction.
37 * @constructor
38 * @extends {goog.ui.Separator}
39 * @final
40 */
41 goog.ui.ToolbarSeparator = function(opt_renderer, opt_domHelper) {
42 goog.ui.Separator.call(
43 this, opt_renderer || goog.ui.ToolbarSeparatorRenderer.getInstance(),
44 opt_domHelper);
45 };
46 goog.inherits(goog.ui.ToolbarSeparator, goog.ui.Separator);
47
48
49 // Registers a decorator factory function for toolbar separators.
50 goog.ui.registry.setDecoratorByClassName(
51 goog.ui.ToolbarSeparatorRenderer.CSS_CLASS,
52 function() { return new goog.ui.ToolbarSeparator(); });