major doc changes
[roojs1] / Roo / grid / AbstractSelectionModel.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.grid.AbstractSelectionModel
14  * @extends Roo.util.Observable
15  * @abstract
16  * Abstract base class for grid SelectionModels.  It provides the interface that should be
17  * implemented by descendant classes.  This class should not be directly instantiated.
18  * @constructor
19  */
20 Roo.grid.AbstractSelectionModel = function(){
21     this.locked = false;
22     Roo.grid.AbstractSelectionModel.superclass.constructor.call(this);
23 };
24
25 Roo.extend(Roo.grid.AbstractSelectionModel, Roo.util.Observable,  {
26     /** @ignore Called by the grid automatically. Do not call directly. */
27     init : function(grid){
28         this.grid = grid;
29         this.initEvents();
30     },
31
32     /**
33      * Locks the selections.
34      */
35     lock : function(){
36         this.locked = true;
37     },
38
39     /**
40      * Unlocks the selections.
41      */
42     unlock : function(){
43         this.locked = false;
44     },
45
46     /**
47      * Returns true if the selections are locked.
48      * @return {Boolean}
49      */
50     isLocked : function(){
51         return this.locked;
52     }
53 });