Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / source / ProgressBar.html
1 <!DOCTYPE html>
2 <html>
3 <head>
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; }
10   </style>
11   <script type="text/javascript">
12     function highlight() {
13       document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
14     }
15   </script>
16 </head>
17 <body onload="prettyPrint(); highlight();">
18   <pre class="prettyprint lang-js"><span id='Ext-layout-component-ProgressBar'>/**
19 </span> * @class Ext.layout.component.ProgressBar
20  * @extends Ext.layout.component.Component
21  * @private
22  */
23
24 Ext.define('Ext.layout.component.ProgressBar', {
25
26     /* Begin Definitions */
27
28     alias: ['layout.progressbar'],
29
30     extend: 'Ext.layout.component.Component',
31
32     /* End Definitions */
33
34     type: 'progressbar',
35
36     onLayout: function(width, height) {
37         var me = this,
38             owner = me.owner,
39             textEl = owner.textEl;
40         
41         me.setElementSize(owner.el, width, height);
42         textEl.setWidth(owner.el.getWidth(true));
43         
44         me.callParent([width, height]);
45         
46         owner.updateProgress(owner.value);
47     }
48 });</pre>
49 </body>
50 </html>