X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..6b044c28b5f26fb99c86c237ffad19741c0f7f3d:/docs/source/BoxComponent.html?ds=sidebyside diff --git a/docs/source/BoxComponent.html b/docs/source/BoxComponent.html index 94ad3d91..a0e59ae7 100644 --- a/docs/source/BoxComponent.html +++ b/docs/source/BoxComponent.html @@ -1,12 +1,18 @@ - -
- -/** + + + +The source code + + + + +/*! + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +/** * @class Ext.BoxComponent * @extends Ext.Component *Base class for any {@link Ext.Component Component} that is to be sized as a box, using width and height.
@@ -36,6 +42,26 @@ var myImage = new Ext.BoxComponent({ */ Ext.BoxComponent = Ext.extend(Ext.Component, { + // Configs below are used for all Components when rendered by BoxLayout. + /** + * @cfg {Number} flex + *Note: this config is only used when this Component is rendered + * by a Container which has been configured to use a {@link Ext.layout.BoxLayout BoxLayout}. + * Each child Component with a
+ *flex
property will be flexed either vertically (by a VBoxLayout) + * or horizontally (by an HBoxLayout) according to the item's relativeflex
value + * compared to the sum of all Components withflex value specified. Any child items that have + * either a
flex = 0
orflex = undefined
will not be 'flexed' (the initial size will not be changed). + */ + // Configs below are used for all Components when rendered by AnchorLayout. + /** + * @cfg {String} anchorNote: this config is only used when this Component is rendered + * by a Container which has been configured to use an {@link Ext.layout.AnchorLayout AnchorLayout} (or subclass thereof). + * based layout manager, for example:
+ *
- {@link Ext.form.FormPanel}
+ *- specifying
+ *layout: 'anchor' // or 'form', or 'absolute'
See {@link Ext.layout.AnchorLayout}.{@link Ext.layout.AnchorLayout#anchor anchor} also.
+ */ // tabTip config is used when a BoxComponent is a child of a TabPanel /** * @cfg {String} tabTip @@ -261,7 +287,8 @@ var myPanel = new Ext.Panel({ // support for standard size objects if(typeof w == 'object'){ - h = w.height, w = w.width; + h = w.height; + w = w.width; } if (Ext.isDefined(w) && Ext.isDefined(this.boxMinWidth) && (w < this.boxMinWidth)) { w = this.boxMinWidth; @@ -277,7 +304,8 @@ var myPanel = new Ext.Panel({ } // not rendered if(!this.boxReady){ - this.width = w, this.height = h; + this.width = w; + this.height = h; return this; } @@ -300,14 +328,15 @@ var myPanel = new Ext.Panel({ rz.setWidth(aw); } this.onResize(aw, ah, w, h); + this.fireEvent('resize', this, aw, ah, w, h); } return this; }, /** * Sets the width of the component. This method fires the {@link #resize} event. - * @param {Number} width The new width to setThis may be one of:- *
- A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).
+ * @param {Mixed} width The new width to set. This may be one of:* @return {Ext.BoxComponent} this @@ -318,8 +347,8 @@ var myPanel = new Ext.Panel({ /** * Sets the height of the component. This method fires the {@link #resize} event. - * @param {Number} height The new height to set. This may be one of:+ *
- A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit defaultUnit}s (by default, pixels).
*- A String used to set the CSS width style.
*- *
- A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).
+ * @param {Mixed} height The new height to set. This may be one of:@@ -498,7 +527,7 @@ var myPanel = new Ext.Panel({ this.positionEl = Ext.get(this.positionEl); } this.boxReady = true; - this.setAutoScroll(this.autoScroll); + Ext.isDefined(this.autoScroll) && this.setAutoScroll(this.autoScroll); this.setSize(this.width, this.height); if(this.x || this.y){ this.setPosition(this.x, this.y); @@ -526,7 +555,6 @@ var myPanel = new Ext.Panel({ * @param {Number} rawHeight The height that was originally specified */ onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){ - this.fireEvent('resize', this, adjWidth, adjHeight, rawWidth, rawHeight); }, /* // protected @@ -568,6 +596,6 @@ Ext.reg('box', Ext.BoxComponent); Ext.Spacer = Ext.extend(Ext.BoxComponent, { autoEl:'div' }); -Ext.reg('spacer', Ext.Spacer); - +Ext.reg('spacer', Ext.Spacer); + \ No newline at end of file+ *
- A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit defaultUnit}s (by default, pixels).
*- A String used to set the CSS height style.
*- undefined to leave the height unchanged.
*