/**
* @class Roo.BorderLayout
* @extends Roo.LayoutManager
+ * @children Roo.ContentPanel
* This class represents a common layout manager used in desktop applications. For screenshots and more details,
* please see: <br><br>
* <a href="http://www.jackslocum.com/yui/2006/10/19/cross-browser-web-20-layouts-with-yahoo-ui/">Cross Browser Layouts - Part 1</a><br>
};
Roo.extend(Roo.BorderLayout, Roo.LayoutManager, {
+
+ /**
+ * @cfg {Roo.LayoutRegion} east
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} west
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} north
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} south
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} center
+ */
/**
* Creates and adds a new region if it doesn't already exist.
* @param {String} target The target region key (north, south, east, west or center).
* Performs a layout update.
*/
layout : function(){
- if(this.updating) return;
+ if(this.updating) {
+ return;
+ }
var size = this.getViewSize();
var w = size.width;
var h = size.height;
{
case 'ContentPanel': // ContentPanel (el, cfg)
case 'ScrollPanel': // ContentPanel (el, cfg)
+ case 'ViewPanel':
if(cfg.autoCreate) {
ret = new Roo[cfg.xtype](cfg); // new panel!!!!!
} else {
}
break;
-
+
+
+
+
+ default:
+ if (typeof(Roo[cfg.xtype]) != 'undefined') {
+
+ ret = new Roo[cfg.xtype](cfg); // new panel!!!!!
+ this.add(region, ret);
+ } else {
+
+ alert("Can not add '" + cfg.xtype + "' to BorderLayout");
+ return null;
+ }
- default:
- alert("Can not add '" + cfg.xtype + "' to BorderLayout");
- return null;
// GridPanel (grid, cfg)
}
this.endUpdate();
// make the last non-background panel active..
- if (nb) { Roo.log(anb); }
+ //if (nb) { Roo.log(abn); }
if (nb) {
for(var r in abn) {