+<span id='Ext-LoadMask-method-constructor'> /**
+</span> * Creates new LoadMask.
+ * @param {Mixed} el The element, element ID, or DOM node you wish to mask.
+ * Also, may be a Component who's element you wish to mask.
+ * @param {Object} config (optional) The config object
+ */
+ constructor : function(el, config) {
+ var me = this;
+
+ if (el.isComponent) {
+ me.bindComponent(el);
+ } else {
+ me.el = Ext.get(el);
+ }
+ Ext.apply(me, config);
+
+ me.addEvents('beforeshow', 'show', 'hide');
+ if (me.store) {
+ me.bindStore(me.store, true);
+ }
+ me.mixins.observable.constructor.call(me, config);
+ },
+
+ bindComponent: function(comp) {
+ var me = this,
+ listeners = {
+ resize: me.onComponentResize,
+ scope: me
+ };
+
+ if (comp.el) {
+ me.onComponentRender(comp);
+ } else {
+ listeners.render = {
+ fn: me.onComponentRender,
+ scope: me,
+ single: true
+ };
+ }
+ me.mon(comp, listeners);
+ },
+
+<span id='Ext-LoadMask-method-onComponentRender'> /**
+</span> * @private
+ * Called if we were configured with a Component, and that Component was not yet rendered. Collects the element to mask.
+ */
+ onComponentRender: function(comp) {
+ this.el = comp.getContentTarget();
+ },
+
+<span id='Ext-LoadMask-method-onComponentResize'> /**
+</span> * @private
+ * Called when this LoadMask's Component is resized. The isMasked method also re-centers any displayed message.
+ */
+ onComponentResize: function(comp, w, h) {
+ this.el.isMasked();
+ },
+
+<span id='Ext-LoadMask-method-bindStore'> /**
+</span> * Changes the data store bound to this LoadMask.
+ * @param {Store} store The store to bind to this LoadMask
+ */
+ bindStore : function(store, initial) {
+ var me = this;
+
+ if (!initial && me.store) {
+ me.mun(me.store, {
+ scope: me,
+ beforeload: me.onBeforeLoad,
+ load: me.onLoad,
+ exception: me.onLoad
+ });
+ if(!store) {
+ me.store = null;
+ }
+ }
+ if (store) {
+ store = Ext.data.StoreManager.lookup(store);
+ me.mon(store, {
+ scope: me,
+ beforeload: me.onBeforeLoad,
+ load: me.onLoad,
+ exception: me.onLoad
+ });
+
+ }
+ me.store = store;
+ if (store && store.isLoading()) {
+ me.onBeforeLoad();
+ }
+ },
+
+<span id='Ext-LoadMask-method-disable'> /**
+</span> * Disables the mask to prevent it from being displayed