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-Container'>/**
19 </span>* @class Ext.layout.container.Container
20 * @extends Ext.layout.container.AbstractContainer
21 * <p>This class is intended to be extended or created via the {@link Ext.container.Container#layout layout}
22 * configuration property. See {@link Ext.container.Container#layout} for additional details.</p>
24 Ext.define('Ext.layout.container.Container', {
26 /* Begin Definitions */
28 extend: 'Ext.layout.container.AbstractContainer',
29 alternateClassName: 'Ext.layout.ContainerLayout',
33 layoutItem: function(item, box) {
35 item.doComponentLayout(box.width, box.height);
37 item.doComponentLayout();
41 getLayoutTargetSize : function() {
42 var target = this.getTarget(),
46 ret = target.getViewSize();
48 // IE in will sometimes return a width of 0 on the 1st pass of getViewSize.
49 // Use getStyleSize to verify the 0 width, the adjustment pass will then work properly
51 if (Ext.isIE && ret.width == 0){
52 ret = target.getStyleSize();
55 ret.width -= target.getPadding('lr');
56 ret.height -= target.getPadding('tb');
61 beforeLayout: function() {
62 if (this.owner.beforeLayout(arguments) !== false) {
63 return this.callParent(arguments);
70 <span id='Ext-layout-container-Container-method-getRenderedItems'> /**
72 * Returns all items that are rendered
73 * @return {Array} All matching items
75 getRenderedItems: function() {
77 target = me.getTarget(),
78 items = me.getLayoutItems(),
83 for (i = 0; i < ln; i++) {
85 if (item.rendered && me.isValidParent(item, target, i)) {
86 renderedItems.push(item);
93 <span id='Ext-layout-container-Container-method-getVisibleItems'> /**
95 * Returns all items that are both rendered and visible
96 * @return {Array} All matching items
98 getVisibleItems: function() {
99 var target = this.getTarget(),
100 items = this.getLayoutItems(),
105 for (i = 0; i < ln; i++) {
107 if (item.rendered && this.isValidParent(item, target, i) && item.hidden !== true) {
108 visibleItems.push(item);