Roo/BoxComponent.js
[roojs1] / Roo / BoxComponent.js
1 /*
2  * Based on:
3  * Ext JS Library 1.1.1
4  * Copyright(c) 2006-2007, Ext JS, LLC.
5  *
6  * Originally Released Under LGPL - original licence link has changed is not relivant.
7  *
8  * Fork - LGPL
9  * <script type="text/javascript">
10  */
11
12 /**
13  * @class Roo.BoxComponent
14  * @extends Roo.Component
15  * Base class for any visual {@link Roo.Component} that uses a box container.  BoxComponent provides automatic box
16  * model adjustments for sizing and positioning and will work correctly withnin the Component rendering model.  All
17  * container classes should subclass BoxComponent so that they will work consistently when nested within other Ext
18  * layout containers.
19  * @constructor
20  * @param {Roo.Element/String/Object} config The configuration options.
21  */
22 Roo.BoxComponent = function(config){
23     Roo.Component.call(this, config);
24     this.addEvents({
25         /**
26          * @event resize
27          * Fires after the component is resized.
28              * @param {Roo.Component} this
29              * @param {Number} adjWidth The box-adjusted width that was set
30              * @param {Number} adjHeight The box-adjusted height that was set
31              * @param {Number} rawWidth The width that was originally specified
32              * @param {Number} rawHeight The height that was originally specified
33              */
34         resize : true,
35         /**
36          * @event move
37          * Fires after the component is moved.
38              * @param {Roo.Component} this
39              * @param {Number} x The new x position
40              * @param {Number} y The new y position
41              */
42         move : true
43     });
44 };
45
46 Roo.extend(Roo.BoxComponent, Roo.Component, {
47 });