4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
12 * These classes are private internal classes
14 Roo.CenterLayoutRegion = function(mgr, config){
15 Roo.LayoutRegion.call(this, mgr, config, "center");
17 this.minWidth = config.minWidth || 20;
18 this.minHeight = config.minHeight || 20;
21 Roo.extend(Roo.CenterLayoutRegion, Roo.LayoutRegion, {
23 // center panel can't be hidden
27 // center panel can't be hidden
30 getMinWidth: function(){
34 getMinHeight: function(){
35 return this.minHeight;
40 Roo.NorthLayoutRegion = function(mgr, config){
41 Roo.LayoutRegion.call(this, mgr, config, "north", "n-resize");
43 this.split.placement = Roo.SplitBar.TOP;
44 this.split.orientation = Roo.SplitBar.VERTICAL;
45 this.split.el.addClass("x-layout-split-v");
47 var size = config.initialSize || config.height;
48 if(typeof size != "undefined"){
49 this.el.setHeight(size);
52 Roo.extend(Roo.NorthLayoutRegion, Roo.SplitLayoutRegion, {
53 orientation: Roo.SplitBar.VERTICAL,
56 return this.collapsedEl.getBox();
58 var box = this.el.getBox();
60 box.height += this.split.el.getHeight();
65 updateBox : function(box){
66 if(this.split && !this.collapsed){
67 box.height -= this.split.el.getHeight();
68 this.split.el.setLeft(box.x);
69 this.split.el.setTop(box.y+box.height);
70 this.split.el.setWidth(box.width);
73 this.updateBody(box.width, null);
75 Roo.LayoutRegion.prototype.updateBox.call(this, box);
79 Roo.SouthLayoutRegion = function(mgr, config){
80 Roo.SplitLayoutRegion.call(this, mgr, config, "south", "s-resize");
82 this.split.placement = Roo.SplitBar.BOTTOM;
83 this.split.orientation = Roo.SplitBar.VERTICAL;
84 this.split.el.addClass("x-layout-split-v");
86 var size = config.initialSize || config.height;
87 if(typeof size != "undefined"){
88 this.el.setHeight(size);
91 Roo.extend(Roo.SouthLayoutRegion, Roo.SplitLayoutRegion, {
92 orientation: Roo.SplitBar.VERTICAL,
95 return this.collapsedEl.getBox();
97 var box = this.el.getBox();
99 var sh = this.split.el.getHeight();
106 updateBox : function(box){
107 if(this.split && !this.collapsed){
108 var sh = this.split.el.getHeight();
111 this.split.el.setLeft(box.x);
112 this.split.el.setTop(box.y-sh);
113 this.split.el.setWidth(box.width);
116 this.updateBody(box.width, null);
118 Roo.LayoutRegion.prototype.updateBox.call(this, box);
122 Roo.EastLayoutRegion = function(mgr, config){
123 Roo.SplitLayoutRegion.call(this, mgr, config, "east", "e-resize");
125 this.split.placement = Roo.SplitBar.RIGHT;
126 this.split.orientation = Roo.SplitBar.HORIZONTAL;
127 this.split.el.addClass("x-layout-split-h");
129 var size = config.initialSize || config.width;
130 if(typeof size != "undefined"){
131 this.el.setWidth(size);
134 Roo.extend(Roo.EastLayoutRegion, Roo.SplitLayoutRegion, {
135 orientation: Roo.SplitBar.HORIZONTAL,
138 return this.collapsedEl.getBox();
140 var box = this.el.getBox();
142 var sw = this.split.el.getWidth();
149 updateBox : function(box){
150 if(this.split && !this.collapsed){
151 var sw = this.split.el.getWidth();
153 this.split.el.setLeft(box.x);
154 this.split.el.setTop(box.y);
155 this.split.el.setHeight(box.height);
159 this.updateBody(null, box.height);
161 Roo.LayoutRegion.prototype.updateBox.call(this, box);
165 Roo.WestLayoutRegion = function(mgr, config){
166 Roo.SplitLayoutRegion.call(this, mgr, config, "west", "w-resize");
168 this.split.placement = Roo.SplitBar.LEFT;
169 this.split.orientation = Roo.SplitBar.HORIZONTAL;
170 this.split.el.addClass("x-layout-split-h");
172 var size = config.initialSize || config.width;
173 if(typeof size != "undefined"){
174 this.el.setWidth(size);
177 Roo.extend(Roo.WestLayoutRegion, Roo.SplitLayoutRegion, {
178 orientation: Roo.SplitBar.HORIZONTAL,
181 return this.collapsedEl.getBox();
183 var box = this.el.getBox();
185 box.width += this.split.el.getWidth();
190 updateBox : function(box){
191 if(this.split && !this.collapsed){
192 var sw = this.split.el.getWidth();
194 this.split.el.setLeft(box.x+box.width);
195 this.split.el.setTop(box.y);
196 this.split.el.setHeight(box.height);
199 this.updateBody(null, box.height);
201 Roo.LayoutRegion.prototype.updateBox.call(this, box);