Line | |
---|
1 | /*! |
---|
2 | * Ext JS Library 3.0.0 |
---|
3 | * Copyright(c) 2006-2009 Ext JS, LLC |
---|
4 | * licensing@extjs.com |
---|
5 | * http://www.extjs.com/license |
---|
6 | */ |
---|
7 | /** |
---|
8 | * @class Ext.grid.AbstractSelectionModel |
---|
9 | * @extends Ext.util.Observable |
---|
10 | * Abstract base class for grid SelectionModels. It provides the interface that should be |
---|
11 | * implemented by descendant classes. This class should not be directly instantiated. |
---|
12 | * @constructor |
---|
13 | */ |
---|
14 | Ext.grid.AbstractSelectionModel = function(){ |
---|
15 | this.locked = false; |
---|
16 | Ext.grid.AbstractSelectionModel.superclass.constructor.call(this); |
---|
17 | }; |
---|
18 | |
---|
19 | Ext.extend(Ext.grid.AbstractSelectionModel, Ext.util.Observable, { |
---|
20 | /** |
---|
21 | * The GridPanel for which this SelectionModel is handling selection. Read-only. |
---|
22 | * @type Object |
---|
23 | * @property grid |
---|
24 | */ |
---|
25 | |
---|
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 | |
---|
54 | destroy: function(){ |
---|
55 | this.purgeListeners(); |
---|
56 | } |
---|
57 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.