X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/examples/desktop/TabWindow.js diff --git a/examples/desktop/TabWindow.js b/examples/desktop/TabWindow.js new file mode 100755 index 00000000..082a1fab --- /dev/null +++ b/examples/desktop/TabWindow.js @@ -0,0 +1,75 @@ +/*! + * Ext JS Library 4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ + +Ext.define('MyDesktop.TabWindow', { + extend: 'Ext.ux.desktop.Module', + + requires: [ + 'Ext.tab.Panel' + ], + + id:'tab-win', + + init : function(){ + this.launcher = { + text: 'Tab Window', + iconCls:'tabs', + handler : this.createWindow, + scope: this + } + }, + + createWindow : function(){ + var desktop = this.app.getDesktop(); + var win = desktop.getWindow('tab-win'); + if(!win){ + win = desktop.createWindow({ + id: 'tab-win', + title:'Tab Window', + width:740, + height:480, + iconCls: 'tabs', + animCollapse:false, + border:false, + constrainHeader:true, + + layout: 'fit', + items: [ + { + xtype: 'tabpanel', + activeTab:0, + bodyStyle: 'padding: 5px;', + + items: [{ + title: 'Tab Text 1', + header:false, + html : '

Something useful would be in here.

', + border:false + },{ + title: 'Tab Text 2', + header:false, + html : '

Something useful would be in here.

', + border:false + },{ + title: 'Tab Text 3', + header:false, + html : '

Something useful would be in here.

', + border:false + },{ + title: 'Tab Text 4', + header:false, + html : '

Something useful would be in here.

', + border:false + }] + } + ] + }); + } + win.show(); + return win; + } +});