4fc52b9b73554fb6489f92d5c0b4be7d89e50ffd
[roojs1] / Roo / bootstrap / Table / AbstractSelectionModel.js
1
2 /**
3  * @class Roo.bootstrap.Table.AbstractSelectionModel
4  * @extends Roo.util.Observable
5  * Abstract base class for grid SelectionModels.  It provides the interface that should be
6  * implemented by descendant classes.  This class should not be directly instantiated.
7  * @constructor
8  */
9 Roo.bootstrap.Table.AbstractSelectionModel = function(){
10     this.locked = false;
11     Roo.bootstrap.Table.AbstractSelectionModel.superclass.constructor.call(this);
12 };
13
14
15 Roo.extend(Roo.bootstrap.Table.AbstractSelectionModel, Roo.util.Observable,  {
16     /** @ignore Called by the grid automatically. Do not call directly. */
17     init : function(grid){
18         this.grid = grid;
19         this.initEvents();
20     },
21
22     /**
23      * Locks the selections.
24      */
25     lock : function(){
26         this.locked = true;
27     },
28
29     /**
30      * Unlocks the selections.
31      */
32     unlock : function(){
33         this.locked = false;
34     },
35
36     /**
37      * Returns true if the selections are locked.
38      * @return {Boolean}
39      */
40     isLocked : function(){
41         return this.locked;
42     },
43     
44     
45     initEvents : function ()
46     {
47         
48     }
49 });