3 This file is part of Ext JS 4
5 Copyright (c) 2011 Sencha Inc
7 Contact: http://www.sencha.com/contact
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
19 'Ext.layout.container.Card',
20 'Ext.layout.container.Border'
23 Ext.onReady(function(){
24 var floater, constrainedWin, constrainedWin2;
26 Ext.util.Region.override({
27 colors: ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'],
34 left: this.left + 'px',
35 height: ((this.bottom - this.top) + 1) + 'px',
36 width: ((this.right - this.left) + 1) + 'px',
38 'pointer-events': 'none',
41 if (!this.highlightEl) {
42 style['background-color'] = this.colors[this.nextColor];
43 Ext.util.Region.prototype.nextColor++;
44 this.highlightEl = Ext.getBody().createChild({
47 if (this.nextColor >= this.colors.length) {
51 this.highlightEl.setStyle(style);
55 if (this.highlightEl) {
56 this.highlightEl.setStyle({
63 var win2 = Ext.create('widget.window', {
68 title: 'Constraining Window, plain: true',
72 items: [floater = Ext.create('Ext.Component', {
81 }), constrainedWin = Ext.create('Ext.Window', {
82 title: 'Constrained Window',
92 }), constrainedWin2 = Ext.create('Ext.Window', {
93 title: 'Header-Constrained Win',
98 constrainHeader: true,
109 constrainedWin.show();
110 constrainedWin2.show();
112 Ext.create('Ext.Window', {
113 title: 'Left Header, plain: true',
119 headerPosition: 'left',
126 Ext.create('Ext.Window', {
127 title: 'Right Header, plain: true',
132 headerPosition: 'right',
139 Ext.create('Ext.Window', {
140 title: 'Bottom Header, plain: true',
146 headerPosition: 'bottom',