Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: client/samples/total/src/HtmlTable.dart

Issue 9145004: Revert "Example showing alternate async measurement solution" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/samples/swarm/Views.dart ('k') | client/samples/total/src/InnerMenuView.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 /** 5 /**
6 * A class encapsulating the managemnet of the Html [:<table>:] representing the spreadsheet grid. 6 * A class encapsulating the managemnet of the Html [:<table>:] representing the spreadsheet grid.
7 */ 7 */
8 class HtmlTable { 8 class HtmlTable {
9 9
10 DivElement _formulaCellSelectingDiv; 10 DivElement _formulaCellSelectingDiv;
11 Spreadsheet _spreadsheet; 11 Spreadsheet _spreadsheet;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // FIXME 69 // FIXME
70 void appendChild(Node child) { 70 void appendChild(Node child) {
71 _table.nodes.add(child); 71 _table.nodes.add(child);
72 } 72 }
73 73
74 void deleteRow(int index) { 74 void deleteRow(int index) {
75 _table.deleteRow(index); 75 _table.deleteRow(index);
76 } 76 }
77 77
78 ElementRect get rect() => _table.rect; 78 Future<ElementRect> get rect() => _table.rect;
79 79
80 // FIXME? 80 // FIXME?
81 TableRowElement getRowElement(int row) => _table.rows[row]; 81 TableRowElement getRowElement(int row) => _table.rows[row];
82 82
83 // Add or remove a class name from a table cell. 83 // Add or remove a class name from a table cell.
84 void modifyClasses(Set<CellLocation> locations, String className, bool add, 84 void modifyClasses(Set<CellLocation> locations, String className, bool add,
85 int rows, int columns, int rowShift, int columnShift) { 85 int rows, int columns, int rowShift, int columnShift) {
86 ElementList tableRows = _table.rows; 86 ElementList tableRows = _table.rows;
87 locations.forEach((CellLocation loc) { 87 locations.forEach((CellLocation loc) {
88 if (!_inView(loc.rowCol, rows, columns, rowShift, columnShift)) { 88 if (!_inView(loc.rowCol, rows, columns, rowShift, columnShift)) {
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 if (row <= 0 || row > rows) { 413 if (row <= 0 || row > rows) {
414 return false; 414 return false;
415 } 415 }
416 int col = rowCol.col - columnShift; 416 int col = rowCol.col - columnShift;
417 if (col <= 0 || col > columns) { 417 if (col <= 0 || col > columns) {
418 return false; 418 return false;
419 } 419 }
420 return true; 420 return true;
421 } 421 }
422 } 422 }
OLDNEW
« no previous file with comments | « client/samples/swarm/Views.dart ('k') | client/samples/total/src/InnerMenuView.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698