- <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 (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
- */
- alignTo : function(element, position, offsets){
- var xy = this.el.getAlignToXY(element, position, offsets);
- this.setPagePosition(xy[0], xy[1]);
- return this;
- },
-
- <div id="method-Ext.Window-anchorTo"></div>/**
- * Anchors this window to another element and realigns it when the window is resized or scrolled.
- * @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 {Array} offsets (optional) Offset the positioning by [x, y]
- * @param {Boolean/Number} monitorScroll (optional) true to monitor body scroll and reposition. If this parameter
- * is a number, it is used as the buffer delay (defaults to 50ms).
- * @return {Ext.Window} this
- */
- anchorTo : function(el, alignment, offsets, monitorScroll){
- this.clearAnchor();
- this.anchorTarget = {
- el: el,
- alignment: alignment,
- offsets: offsets
- };
-
- Ext.EventManager.onWindowResize(this.doAnchor, this);
- var tm = typeof monitorScroll;
- if(tm != 'undefined'){
- Ext.EventManager.on(window, 'scroll', this.doAnchor, this,
- {buffer: tm == 'number' ? monitorScroll : 50});
- }
- return this.doAnchor();
- },
-
- /**
- * Performs the anchor, using the saved anchorTarget property.
- * @return {Ext.Window} this
- * @private
- */
- doAnchor : function(){
- var o = this.anchorTarget;
- this.alignTo(o.el, o.alignment, o.offsets);
- return this;
- },
-
- <div id="method-Ext.Window-clearAnchor"></div>/**
- * Removes any existing anchor from this window. See {@link #anchorTo}.
- * @return {Ext.Window} this
- */
- clearAnchor : function(){
- if(this.anchorTarget){
- Ext.EventManager.removeResizeListener(this.doAnchor, this);
- Ext.EventManager.un(window, 'scroll', this.doAnchor, this);
- delete this.anchorTarget;
- }
- return this;
- },
-
- <div id="method-Ext.Window-toFront"></div>/**
- * Brings this window to the front of any other visible windows
- * @param {Boolean} e (optional) Specify <tt>false</tt> to prevent the window from being focused.
- * @return {Ext.Window} this
- */
- toFront : function(e){
- if(this.manager.bringToFront(this)){
- if(!e || !e.getTarget().focus){
- this.focus();