2 * @class Ext.layout.container.Container
3 * @extends Ext.layout.container.AbstractContainer
5 * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.container.Container#layout layout}</b></tt>
6 * configuration property. See <tt><b>{@link Ext.container.Container#layout}</b></tt> for additional details.</p>
8 Ext.define('Ext.layout.container.Container', {
10 /* Begin Definitions */
12 extend: 'Ext.layout.container.AbstractContainer',
13 alternateClassName: 'Ext.layout.ContainerLayout',
17 layoutItem: function(item, box) {
19 if (item.componentLayout.initialized !== true) {
20 this.setItemSize(item, box.width || item.width || undefined, box.height || item.height || undefined);
21 // item.doComponentLayout(box.width || item.width || undefined, box.height || item.height || undefined);
25 getLayoutTargetSize : function() {
26 var target = this.getTarget(),
30 ret = target.getViewSize();
32 // IE in will sometimes return a width of 0 on the 1st pass of getViewSize.
33 // Use getStyleSize to verify the 0 width, the adjustment pass will then work properly
35 if (Ext.isIE && ret.width == 0){
36 ret = target.getStyleSize();
39 ret.width -= target.getPadding('lr');
40 ret.height -= target.getPadding('tb');
45 beforeLayout: function() {
46 if (this.owner.beforeLayout(arguments) !== false) {
47 return this.callParent(arguments);
54 afterLayout: function() {
55 this.owner.afterLayout(arguments);
56 this.callParent(arguments);
61 * Returns all items that are rendered
62 * @return {Array} All matching items
64 getRenderedItems: function() {
66 target = me.getTarget(),
67 items = me.getLayoutItems(),
72 for (i = 0; i < ln; i++) {
74 if (item.rendered && me.isValidParent(item, target, i)) {
75 renderedItems.push(item);
84 * Returns all items that are both rendered and visible
85 * @return {Array} All matching items
87 getVisibleItems: function() {
88 var target = this.getTarget(),
89 items = this.getLayoutItems(),
94 for (i = 0; i < ln; i++) {
96 if (item.rendered && this.isValidParent(item, target, i) && item.hidden !== true) {
97 visibleItems.push(item);