5 'Ext.layout.container.Card',
6 'Ext.layout.container.Border'
9 Ext.onReady(function(){
10 var floater, constrainedWin, constrainedWin2;
12 Ext.util.Region.override({
13 colors: ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'],
20 left: this.left + 'px',
21 height: ((this.bottom - this.top) + 1) + 'px',
22 width: ((this.right - this.left) + 1) + 'px',
24 'pointer-events': 'none',
27 if (!this.highlightEl) {
28 style['background-color'] = this.colors[this.nextColor];
29 Ext.util.Region.prototype.nextColor++;
30 this.highlightEl = Ext.getBody().createChild({
33 if (this.nextColor >= this.colors.length) {
37 this.highlightEl.setStyle(style);
41 if (this.highlightEl) {
42 this.highlightEl.setStyle({
49 var win2 = Ext.create('widget.window', {
54 title: 'Constraining Window, plain: true',
58 items: [floater = Ext.create('Ext.Component', {
67 }), constrainedWin = Ext.create('Ext.Window', {
68 title: 'Constrained Window',
78 }), constrainedWin2 = Ext.create('Ext.Window', {
79 title: 'Header-Constrained Win',
84 constrainHeader: true,
95 constrainedWin.show();
96 constrainedWin2.show();
98 Ext.create('Ext.Window', {
99 title: 'Left Header, plain: true',
105 headerPosition: 'left',
112 Ext.create('Ext.Window', {
113 title: 'Right Header, plain: true',
118 headerPosition: 'right',
125 Ext.create('Ext.Window', {
126 title: 'Bottom Header, plain: true',
132 headerPosition: 'bottom',