OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // require: listselectionmodel.js | 5 // require: listselectionmodel.js |
6 | 6 |
7 /** | 7 /** |
8 * @fileoverview This implements a list control. | 8 * @fileoverview This implements a list control. |
9 */ | 9 */ |
10 | 10 |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 /** | 601 /** |
602 * Redraws a single item. | 602 * Redraws a single item. |
603 * @param {number} index The row index to redraw. | 603 * @param {number} index The row index to redraw. |
604 */ | 604 */ |
605 redrawItem: function(index) { | 605 redrawItem: function(index) { |
606 if (index >= this.firstIndex_ && index < this.lastIndex_) { | 606 if (index >= this.firstIndex_ && index < this.lastIndex_) { |
607 delete this.cachedItems_[index]; | 607 delete this.cachedItems_[index]; |
608 this.redraw(); | 608 this.redraw(); |
609 } | 609 } |
610 }, | 610 }, |
| 611 |
| 612 /** |
| 613 * Called when a list item is activated, currently only by a double click |
| 614 * event. |
| 615 * @param {number} index The index of the activated item. |
| 616 */ |
| 617 activateItemAtIndex: function(index) { |
| 618 }, |
611 }; | 619 }; |
612 | 620 |
613 cr.defineProperty(List, 'disabled', cr.PropertyKind.BOOL_ATTR); | 621 cr.defineProperty(List, 'disabled', cr.PropertyKind.BOOL_ATTR); |
614 | 622 |
615 return { | 623 return { |
616 List: List | 624 List: List |
617 } | 625 } |
618 }); | 626 }); |
OLD | NEW |