2 * @class Ext.layout.container.AbstractContainer
3 * @extends Ext.layout.Layout
4 * Please refer to sub classes documentation
7 Ext.define('Ext.layout.container.AbstractContainer', {
9 /* Begin Definitions */
11 extend: 'Ext.layout.Layout',
25 * @cfg {Boolean} bindToOwnerCtComponent
26 * Flag to notify the ownerCt Component on afterLayout of a change
28 bindToOwnerCtComponent: false,
31 * @cfg {Boolean} bindToOwnerCtContainer
32 * Flag to notify the ownerCt Container on afterLayout of a change
34 bindToOwnerCtContainer: false,
37 * @cfg {String} itemCls
38 * <p>An optional extra CSS class that will be added to the container. This can be useful for adding
39 * customized styles to the container or any of its children using standard CSS rules. See
40 * {@link Ext.Component}.{@link Ext.Component#ctCls ctCls} also.</p>
44 isManaged: function(dimension) {
45 dimension = Ext.String.capitalize(dimension);
48 managed = me['managed' + dimension],
49 ancestor = me.owner.ownerCt;
51 if (ancestor && ancestor.layout) {
52 while (ancestor && ancestor.layout) {
53 if (managed === false || ancestor.layout['managed' + dimension] === false) {
57 ancestor = ancestor.ownerCt;
66 if (Ext.isNumber(owner.height) || owner.isViewport) {
67 me.managedHeight = false;
69 if (Ext.isNumber(owner.width) || owner.isViewport) {
70 me.managedWidth = false;
72 me.callParent(arguments);
76 * Set the size of an item within the Container. We should always use setCalculatedSize.
79 setItemSize: function(item, width, height) {
80 if (Ext.isObject(width)) {
81 height = width.height;
84 item.setCalculatedSize(width, height, this.owner);
88 * <p>Returns an array of child components either for a render phase (Performed in the beforeLayout method of the layout's
89 * base class), or the layout phase (onLayout).</p>
90 * @return {Array} of child components
92 getLayoutItems: function() {
93 return this.owner && this.owner.items && this.owner.items.items || [];
96 afterLayout: function() {
97 this.owner.afterLayout(this);
100 * Returns the owner component's resize element.
101 * @return {Ext.core.Element}
103 getTarget: function() {
104 return this.owner.getTargetEl();
107 * <p>Returns the element into which rendering must take place. Defaults to the owner Container's {@link Ext.AbstractComponent#targetEl}.</p>
108 * May be overridden in layout managers which implement an inner element.
109 * @return {Ext.core.Element}
111 getRenderTarget: function() {
112 return this.owner.getTargetEl();