4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-layout-container-AbstractContainer'>/**
19 </span> * @class Ext.layout.container.AbstractContainer
20 * @extends Ext.layout.Layout
21 * Please refer to sub classes documentation
24 Ext.define('Ext.layout.container.AbstractContainer', {
26 /* Begin Definitions */
28 extend: 'Ext.layout.Layout',
41 <span id='Ext-layout-container-AbstractContainer-cfg-bindToOwnerCtComponent'> /**
42 </span> * @cfg {Boolean} bindToOwnerCtComponent
43 * Flag to notify the ownerCt Component on afterLayout of a change
45 bindToOwnerCtComponent: false,
47 <span id='Ext-layout-container-AbstractContainer-cfg-bindToOwnerCtContainer'> /**
48 </span> * @cfg {Boolean} bindToOwnerCtContainer
49 * Flag to notify the ownerCt Container on afterLayout of a change
51 bindToOwnerCtContainer: false,
53 <span id='Ext-layout-container-AbstractContainer-cfg-itemCls'> /**
54 </span> * @cfg {String} itemCls
55 * <p>An optional extra CSS class that will be added to the container. This can be useful for adding
56 * customized styles to the container or any of its children using standard CSS rules. See
57 * {@link Ext.Component}.{@link Ext.Component#ctCls ctCls} also.</p>
61 isManaged: function(dimension) {
62 dimension = Ext.String.capitalize(dimension);
65 managed = me['managed' + dimension],
66 ancestor = me.owner.ownerCt;
68 if (ancestor && ancestor.layout) {
69 while (ancestor && ancestor.layout) {
70 if (managed === false || ancestor.layout['managed' + dimension] === false) {
74 ancestor = ancestor.ownerCt;
83 if (Ext.isNumber(owner.height) || owner.isViewport) {
84 me.managedHeight = false;
86 if (Ext.isNumber(owner.width) || owner.isViewport) {
87 me.managedWidth = false;
89 me.callParent(arguments);
92 <span id='Ext-layout-container-AbstractContainer-method-setItemSize'> /**
93 </span> * Set the size of an item within the Container. We should always use setCalculatedSize.
96 setItemSize: function(item, width, height) {
97 if (Ext.isObject(width)) {
98 height = width.height;
101 item.setCalculatedSize(width, height, this.owner);
104 <span id='Ext-layout-container-AbstractContainer-method-getLayoutItems'> /**
105 </span> * <p>Returns an array of child components either for a render phase (Performed in the beforeLayout method of the layout's
106 * base class), or the layout phase (onLayout).</p>
107 * @return {Array} of child components
109 getLayoutItems: function() {
110 return this.owner && this.owner.items && this.owner.items.items || [];
113 afterLayout: function() {
114 this.owner.afterLayout(this);
116 <span id='Ext-layout-container-AbstractContainer-method-getTarget'> /**
117 </span> * Returns the owner component's resize element.
118 * @return {Ext.core.Element}
120 getTarget: function() {
121 return this.owner.getTargetEl();
123 <span id='Ext-layout-container-AbstractContainer-method-getRenderTarget'> /**
124 </span> * <p>Returns the element into which rendering must take place. Defaults to the owner Container's {@link Ext.AbstractComponent#targetEl}.</p>
125 * May be overridden in layout managers which implement an inner element.
126 * @return {Ext.core.Element}
128 getRenderTarget: function() {
129 return this.owner.getTargetEl();