3
* Copyright(c) 2006-2008, Ext JS, LLC.
6
* http://extjs.com/license
10
* These classes are private internal classes
12
Ext.CenterLayoutRegion = function(mgr, config){
13
Ext.CenterLayoutRegion.superclass.constructor.call(this, mgr, config, "center");
15
this.minWidth = config.minWidth || 20;
16
this.minHeight = config.minHeight || 20;
19
Ext.extend(Ext.CenterLayoutRegion, Ext.LayoutRegion, {
21
// center panel can't be hidden
25
// center panel can't be hidden
28
getMinWidth: function(){
32
getMinHeight: function(){
33
return this.minHeight;
38
Ext.NorthLayoutRegion = function(mgr, config){
39
Ext.NorthLayoutRegion.superclass.constructor.call(this, mgr, config, "north", "n-resize");
41
this.split.placement = Ext.SplitBar.TOP;
42
this.split.orientation = Ext.SplitBar.VERTICAL;
43
this.split.el.addClass("x-layout-split-v");
45
var size = config.initialSize || config.height;
46
if(typeof size != "undefined"){
47
this.el.setHeight(size);
50
Ext.extend(Ext.NorthLayoutRegion, Ext.SplitLayoutRegion, {
51
orientation: Ext.SplitBar.VERTICAL,
54
return this.collapsedEl.getBox();
56
var box = this.el.getBox();
58
box.height += this.split.el.getHeight();
63
updateBox : function(box){
64
if(this.split && !this.collapsed){
65
box.height -= this.split.el.getHeight();
66
this.split.el.setLeft(box.x);
67
this.split.el.setTop(box.y+box.height);
68
this.split.el.setWidth(box.width);
71
this.updateBody(box.width, null);
73
Ext.NorthLayoutRegion.superclass.updateBox.call(this, box);
77
Ext.SouthLayoutRegion = function(mgr, config){
78
Ext.SouthLayoutRegion.superclass.constructor.call(this, mgr, config, "south", "s-resize");
80
this.split.placement = Ext.SplitBar.BOTTOM;
81
this.split.orientation = Ext.SplitBar.VERTICAL;
82
this.split.el.addClass("x-layout-split-v");
84
var size = config.initialSize || config.height;
85
if(typeof size != "undefined"){
86
this.el.setHeight(size);
89
Ext.extend(Ext.SouthLayoutRegion, Ext.SplitLayoutRegion, {
90
orientation: Ext.SplitBar.VERTICAL,
93
return this.collapsedEl.getBox();
95
var box = this.el.getBox();
97
var sh = this.split.el.getHeight();
104
updateBox : function(box){
105
if(this.split && !this.collapsed){
106
var sh = this.split.el.getHeight();
109
this.split.el.setLeft(box.x);
110
this.split.el.setTop(box.y-sh);
111
this.split.el.setWidth(box.width);
114
this.updateBody(box.width, null);
116
Ext.SouthLayoutRegion.superclass.updateBox.call(this, box);
120
Ext.EastLayoutRegion = function(mgr, config){
121
Ext.EastLayoutRegion.superclass.constructor.call(this, mgr, config, "east", "e-resize");
123
this.split.placement = Ext.SplitBar.RIGHT;
124
this.split.orientation = Ext.SplitBar.HORIZONTAL;
125
this.split.el.addClass("x-layout-split-h");
127
var size = config.initialSize || config.width;
128
if(typeof size != "undefined"){
129
this.el.setWidth(size);
132
Ext.extend(Ext.EastLayoutRegion, Ext.SplitLayoutRegion, {
133
orientation: Ext.SplitBar.HORIZONTAL,
136
return this.collapsedEl.getBox();
138
var box = this.el.getBox();
140
var sw = this.split.el.getWidth();
147
updateBox : function(box){
148
if(this.split && !this.collapsed){
149
var sw = this.split.el.getWidth();
151
this.split.el.setLeft(box.x);
152
this.split.el.setTop(box.y);
153
this.split.el.setHeight(box.height);
157
this.updateBody(null, box.height);
159
Ext.EastLayoutRegion.superclass.updateBox.call(this, box);
163
Ext.WestLayoutRegion = function(mgr, config){
164
Ext.WestLayoutRegion.superclass.constructor.call(this, mgr, config, "west", "w-resize");
166
this.split.placement = Ext.SplitBar.LEFT;
167
this.split.orientation = Ext.SplitBar.HORIZONTAL;
168
this.split.el.addClass("x-layout-split-h");
170
var size = config.initialSize || config.width;
171
if(typeof size != "undefined"){
172
this.el.setWidth(size);
175
Ext.extend(Ext.WestLayoutRegion, Ext.SplitLayoutRegion, {
176
orientation: Ext.SplitBar.HORIZONTAL,
179
return this.collapsedEl.getBox();
181
var box = this.el.getBox();
183
box.width += this.split.el.getWidth();
188
updateBox : function(box){
189
if(this.split && !this.collapsed){
190
var sw = this.split.el.getWidth();
192
this.split.el.setLeft(box.x+box.width);
193
this.split.el.setTop(box.y);
194
this.split.el.setHeight(box.height);
197
this.updateBody(null, box.height);
199
Ext.WestLayoutRegion.superclass.updateBox.call(this, box);