| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 typedef void EditCellRangeFunction(CellRange range); | 5 typedef void EditCellRangeFunction(CellRange range); |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Spreadsheet widget. | 8 * Spreadsheet widget. |
| 9 */ | 9 */ |
| 10 class SpreadsheetPresenter implements SpreadsheetListener, SelectionListener { | 10 class SpreadsheetPresenter implements SpreadsheetListener, SelectionListener { |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 _rowShift = newRowShift; | 819 _rowShift = newRowShift; |
| 820 _columnShift = newColumnShift; | 820 _columnShift = newColumnShift; |
| 821 _spreadsheet.refresh(); | 821 _spreadsheet.refresh(); |
| 822 } | 822 } |
| 823 }); | 823 }); |
| 824 }); | 824 }); |
| 825 } | 825 } |
| 826 | 826 |
| 827 // Return the number of milliseconds since the epoch | 827 // Return the number of milliseconds since the epoch |
| 828 int _currentTimeMllis() { | 828 int _currentTimeMllis() { |
| 829 return new Date.now().value; | 829 return new Date.now().millisecondsSinceEpoch; |
| 830 } | 830 } |
| 831 | 831 |
| 832 void _formulaCellSelectingInsertReference(RowCol clickLocation, RowCol dragLoc
ation) { | 832 void _formulaCellSelectingInsertReference(RowCol clickLocation, RowCol dragLoc
ation) { |
| 833 // set "click" location and reset "drag" | 833 // set "click" location and reset "drag" |
| 834 if (clickLocation != null) { | 834 if (clickLocation != null) { |
| 835 if (!clickLocation.isValidCell()) { | 835 if (!clickLocation.isValidCell()) { |
| 836 return; | 836 return; |
| 837 } | 837 } |
| 838 _formulaCellSelectingClickLocation = clickLocation; | 838 _formulaCellSelectingClickLocation = clickLocation; |
| 839 _formulaCellSelectingDragLocation = clickLocation; | 839 _formulaCellSelectingDragLocation = clickLocation; |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1721 _spreadsheet.execute(command); | 1721 _spreadsheet.execute(command); |
| 1722 } else { | 1722 } else { |
| 1723 if (rowOrCol == COL) { | 1723 if (rowOrCol == COL) { |
| 1724 _spreadsheet.setColumnWidth(index, size); | 1724 _spreadsheet.setColumnWidth(index, size); |
| 1725 } else { | 1725 } else { |
| 1726 _spreadsheet.setRowHeight(index, size); | 1726 _spreadsheet.setRowHeight(index, size); |
| 1727 } | 1727 } |
| 1728 } | 1728 } |
| 1729 } | 1729 } |
| 1730 } | 1730 } |
| OLD | NEW |