@qooxdoo/framework
Version:
The JS Framework for Coders
78 lines (62 loc) • 1.79 kB
JavaScript
/* ************************************************************************
qooxdoo - the new era of web development
http://qooxdoo.org
Copyright:
2004-2011 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:
* Tino Butz (tbtz)
************************************************************************ */
/**
* A navigation bar widget.
*
* *Example*
*
* Here is a little example of how to use the widget.
*
* <pre class='javascript'>
* var bar = new qx.ui.mobile.navigationbar.NavigationBar();
* var backButton = new qx.ui.mobile.navigationbar.BackButton();
* bar.add(backButton);
* var title = new qx.ui.mobile.navigationbar.Title();
* var.add(title, {flex:1});
*
* this.getRoot.add(bar);
* </pre>
*
* This example creates a navigation bar and adds a back button and a title to it.
*/
qx.Class.define("qx.ui.mobile.navigationbar.NavigationBar",
{
extend : qx.ui.mobile.container.Composite,
/*
*****************************************************************************
CONSTRUCTOR
*****************************************************************************
*/
construct : function(layout)
{
this.base(arguments, layout);
if (!layout) {
this.setLayout(new qx.ui.mobile.layout.HBox().set({
alignY : "middle"
}));
}
},
/*
*****************************************************************************
PROPERTIES
*****************************************************************************
*/
properties :
{
// overridden
defaultCssClass :
{
refine : true,
init : "navigationbar"
}
}
});