Ext.window.Window xtype: window

 Ext.window.WindowView xtype: window

A specialized panel intended for use as an application window.(一个专门用作应用程序窗口的面板。) Windows are floated, resizable, and draggable by default. (窗口默认是浮动的,可调整大小的,可以拖拽的)Windows can be maximized to fill the viewport, restored to their prior size, and can be minimized.(Windows可以最大化来填补viewport,恢复到之前的大小,并可以最小化。)
Windows can also be linked to a Ext.ZIndexManager or managed by the Ext.WindowManager to provide grouping, activation, to front, to back and other application-specific behavior.(Windows也可以被连接到一个Ext.ZIndexManager或被Ext.WindowManager管理,提供分组,活化,在前面,在后面,和其他特定于应用程序的行为。)
By default, Windows will be rendered to document.body. (默认,窗口将会渲染整个document.body)To constrain a Window to another element specify renderTo.(限制一个窗口到另一个元素渲染)
As with all Containers, it is important to consider how you want the Window to size and arrange any child Components.(对于所有的容器,最应该想到的是你窗口的长度和怎么安排所有的组件。) Choose an appropriate layout configuration which lays out child Components in the required manner.(选择合适的布局配置,用所需的方式来放置所有的孩子组件)
 
testWindow.html
  
  
  
  
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
  2. <html> 
  3. <head> 
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
  5. <title> Ext.window.Window</title> 
  6. <link rel="stylesheet" type="text/css" href="../extjs-4.1.0/resources/css/ext-all.css"/> 
  7. <script type="text/javascript" src="../extjs-4.1.0/bootstrap.js"></script> 
  8. <script type="text/javascript" src="testWindow.js"></script> 
  9. </head> 
  10. <body> 
  11. </body> 
  12. </html> 
testWindow.js
  
  
  
  
  1. (function(){ 
  2.     Ext.onReady(function(){ 
  3.         Ext.create('Ext.window.Window', { 
  4.               title: 'Hello'
  5.               height: 200, 
  6.               width: 400, 
  7.               layout: 'fit'
  8.               items: {  // Let's put an empty grid in just to illustrate fit layout 
  9.               xtype: 'grid'
  10.               border: false
  11.                   columns: [{header: 'World'}],                 // One header just for show. There's no data, 
  12.               store: Ext.create('Ext.data.ArrayStore', {}) // A dummy empty data store 
  13.                  } 
  14.                 }).show(); 
  15.     }); 
  16. })(); 
 
addChildEls( )
Adds each argument passed to this method to the childEls array.
(将每一个参数传递给这个方法的childEls数组。)
----------------------------------------------------
 
closable : Boolean

True to display the 'close' tool button and allow the user to close the window, false to hide the button and disallow closing the window.(true是显示'close'工具按钮,允许用户去关闭窗口,false是隐藏按钮不允许关闭窗口)

By default, when close is requested by either clicking the close button in the header or pressing ESC when the Window has focus, the close method will be called.(默认,点击工具条关闭按钮或者是当窗口有焦点的时候按ESC关闭请求被发出) This will destroy the Window and its content meaning that it may not be reused.(它将会销毁窗口和内容,这样窗口就不能重用了)

To make closing a Window hide the Window so that it may be reused, set closeAction to 'hide'.(为了隐藏窗口让它可以重用,设置closeAction属性为'hide')

Defaults to: true

Overrides: Ext.panel.Panel.closable

 

你可能感兴趣的:(文档,ExtJs)