4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../resources/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',
34 <span id='Ext-layout-container-AbstractContainer-cfg-bindToOwnerCtComponent'> /**
35 </span> * @cfg {Boolean} bindToOwnerCtComponent
36 * Flag to notify the ownerCt Component on afterLayout of a change
38 bindToOwnerCtComponent: false,
40 <span id='Ext-layout-container-AbstractContainer-cfg-bindToOwnerCtContainer'> /**
41 </span> * @cfg {Boolean} bindToOwnerCtContainer
42 * Flag to notify the ownerCt Container on afterLayout of a change
44 bindToOwnerCtContainer: false,
46 <span id='Ext-layout-container-AbstractContainer-cfg-itemCls'> /**
47 </span> * @cfg {String} itemCls
48 * <p>An optional extra CSS class that will be added to the container. This can be useful for adding
49 * customized styles to the container or any of its children using standard CSS rules. See
50 * {@link Ext.Component}.{@link Ext.Component#componentCls componentCls} also.</p>
54 <span id='Ext-layout-container-AbstractContainer-method-setItemSize'> /**
55 </span> * Set the size of an item within the Container. We should always use setCalculatedSize.
58 setItemSize: function(item, width, height) {
59 if (Ext.isObject(width)) {
60 height = width.height;
63 item.setCalculatedSize(width, height, this.owner);
66 <span id='Ext-layout-container-AbstractContainer-method-getLayoutItems'> /**
67 </span> * <p>Returns an array of child components either for a render phase (Performed in the beforeLayout method of the layout's
68 * base class), or the layout phase (onLayout).</p>
69 * @return {Ext.Component[]} of child components
71 getLayoutItems: function() {
72 return this.owner && this.owner.items && this.owner.items.items || [];
75 <span id='Ext-layout-container-AbstractContainer-method-beforeLayout'> /**
76 </span> * Containers should not lay out child components when collapsed.
78 beforeLayout: function() {
79 return !this.owner.collapsed && this.callParent(arguments);
82 afterLayout: function() {
83 this.owner.afterLayout(this);
85 <span id='Ext-layout-container-AbstractContainer-method-getTarget'> /**
86 </span> * Returns the owner component's resize element.
87 * @return {Ext.Element}
89 getTarget: function() {
90 return this.owner.getTargetEl();
92 <span id='Ext-layout-container-AbstractContainer-method-getRenderTarget'> /**
93 </span> * <p>Returns the element into which rendering must take place. Defaults to the owner Container's target element.</p>
94 * May be overridden in layout managers which implement an inner element.
95 * @return {Ext.Element}
97 getRenderTarget: function() {
98 return this.owner.getTargetEl();