-<html>
-<head>
- <title>The source code</title>
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body onload="prettyPrint();">
- <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.Window"></div>/**
+<html>\r
+<head>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
+ <title>The source code</title>\r
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body onload="prettyPrint();">\r
+ <pre class="prettyprint lang-js"><div id="cls-Ext.Window"></div>/**
* @class Ext.Window
* @extends Ext.Panel
* <p>A specialized panel intended for use as an application window. Windows are floated, {@link #resizable}, and
* A reference to the WindowGroup that should manage this window (defaults to {@link Ext.WindowMgr}).
*/
<div id="cfg-Ext.Window-defaultButton"></div>/**
- * @cfg {String/Number/Button} defaultButton
- * The id / index of a button or a button instance to focus when this window received the focus.
+ * @cfg {String/Number/Component} defaultButton
+ * <p>Specifies a Component to receive focus when this Window is focussed.</p>
+ * <p>This may be one of:</p><div class="mdetail-params"><ul>
+ * <li>The index of a footer Button.</li>
+ * <li>The id of a Component.</li>
+ * <li>A Component.</li>
+ * </ul></div>
*/
<div id="cfg-Ext.Window-onEsc"></div>/**
* @cfg {Function} onEsc
* @deprecated
*/
initHidden : undefined,
-
+
<div id="cfg-Ext.Window-hidden"></div>/**
* @cfg {Boolean} hidden
* Render this component hidden (default is <tt>true</tt>). If <tt>true</tt>, the
* {@link #hide} method will be called internally.
*/
hidden : true,
-
+
<div id="cfg-Ext.Window-monitorResize"></div>/**
* @cfg {Boolean} monitorResize @hide
* This is automatically managed based on the value of constrain and constrainToHeader
this.focus();
this.updateHandles();
this.saveState();
- this.doLayout();
},
<div id="method-Ext.Window-focus"></div>/**
* @param {String/Element} animateTarget (optional) The target element or id from which the window should
* animate while opening (defaults to null with no animation)
* @param {Function} callback (optional) A callback function to call after the window is displayed
- * @param {Object} scope (optional) The scope in which to execute the callback
+ * @param {Object} scope (optional) The scope (<code>this</code> reference) in which the callback is executed. Defaults to this Window.
* @return {Ext.Window} this
*/
show : function(animateTarget, cb, scope){
if(this.maximized){
this.fitContainer();
}
- if(Ext.isMac && Ext.isGecko){ // work around stupid FF 2.0/Mac scroll bar bug
+ if(Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug
this.cascade(this.setAutoScroll);
}
var sz = this.getSize();
this.onResize(sz.width, sz.height);
}
+ this.onShow();
this.fireEvent('show', this);
},
* @param {String/Element} animateTarget (optional) The target element or id to which the window should
* animate while hiding (defaults to null with no animation)
* @param {Function} callback (optional) A callback function to call after the window is hidden
- * @param {Object} scope (optional) The scope in which to execute the callback
+ * @param {Object} scope (optional) The scope (<code>this</code> reference) in which the callback is executed. Defaults to this Window.
* @return {Ext.Window} this
*/
hide : function(animateTarget, cb, scope){
if(this.keyMap){
this.keyMap.disable();
}
+ this.onHide();
this.fireEvent('hide', this);
},
}));
},
+ <div id="prop-Ext.Window-onShow"></div>/**
+ * Method that is called immediately before the <code>show</code> event is fired.
+ * Defaults to <code>Ext.emptyFn</code>.
+ */
+ onShow : Ext.emptyFn,
+
+ <div id="prop-Ext.Window-onHide"></div>/**
+ * Method that is called immediately before the <code>hide</code> event is fired.
+ * Defaults to <code>Ext.emptyFn</code>.
+ */
+ onHide : Ext.emptyFn,
+
// private
onWindowResize : function(){
if(this.maximized){
if(show !== false){
this.el.show();
this.focus();
- if(Ext.isMac && Ext.isGecko){ // work around stupid FF 2.0/Mac scroll bar bug
+ if(Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug
this.cascade(this.setAutoScroll);
}
}
}
}
},
-
+
// private
doClose : function(){
this.fireEvent('close', this);
*/
restore : function(){
if(this.maximized){
+ var t = this.tools;
this.el.removeClass('x-window-maximized');
- this.tools.restore.hide();
- this.tools.maximize.show();
+ if(t.restore){
+ t.restore.hide();
+ }
+ if(t.maximize){
+ t.maximize.show();
+ }
this.setPosition(this.restorePos[0], this.restorePos[1]);
this.setSize(this.restoreSize.width, this.restoreSize.height);
delete this.restorePos;
if(this.dd){
this.dd.unlock();
}
- if(this.collapsible){
- this.tools.toggle.show();
+ if(this.collapsible && t.toggle){
+ t.toggle.show();
}
this.container.removeClass('x-window-maximized-ct');
// private
fitContainer : function(){
- var vs = this.container.getViewSize();
+ var vs = this.container.getViewSize(false);
this.setSize(vs.width, vs.height);
},
<div id="method-Ext.Window-alignTo"></div>/**
* Aligns the window to the specified element
* @param {Mixed} element The element to align to.
- * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details).
+ * @param {String} position (optional, defaults to "tl-bl?") The position to align to (see {@link Ext.Element#alignTo} for more details).
* @param {Array} offsets (optional) Offset the positioning by [x, y]
* @return {Ext.Window} this
*/
this.win.saveState();
}
});
-</pre>
-</body>
+</pre> \r
+</body>\r
</html>
\ No newline at end of file