@qooxdoo/framework
Version:
The JS Framework for Coders
64 lines (50 loc) • 1.57 kB
JavaScript
/* ************************************************************************
qooxdoo - the new era of web development
http://qooxdoo.org
Copyright:
2009 1&1 Internet AG, Germany, http://www.1und1.de
License:
MIT: https://opensource.org/licenses/MIT
See the LICENSE file in the project's top-level directory for details.
Authors:
* Fabian Jakobs (fjakobs)
************************************************************************ */
/**
* The MenuSlideBar is used to scroll menus if they don't fit on the screen.
*
* @childControl button-forward {qx.ui.form.HoverButton} scrolls forward of hovered
* @childControl button-backward {qx.ui.form.HoverButton} scrolls backward if hovered
*
* @internal
*/
qx.Class.define("qx.ui.menu.MenuSlideBar", {
extend: qx.ui.container.SlideBar,
construct() {
super("vertical");
},
properties: {
appearance: {
refine: true,
init: "menu-slidebar"
}
},
members: {
// overridden
_createChildControlImpl(id, hash) {
var control;
switch (id) {
case "button-forward":
control = new qx.ui.form.HoverButton();
control.addListener("execute", this._onExecuteForward, this);
this._addAt(control, 2);
break;
case "button-backward":
control = new qx.ui.form.HoverButton();
control.addListener("execute", this._onExecuteBackward, this);
this._addAt(control, 0);
break;
}
return control || super._createChildControlImpl(id);
}
}
});