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

Unified Diff: client/samples/total/src/TotalLib.dart

Issue 8905021: Dartest CL - Please review (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/samples/total/src/Total.dart ('k') | client/testing/dartest/README.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/samples/total/src/TotalLib.dart
===================================================================
--- client/samples/total/src/TotalLib.dart (revision 2358)
+++ client/samples/total/src/TotalLib.dart (working copy)
@@ -51,3 +51,31 @@
#source("Value.dart");
#source("ValuePicker.dart");
#source("ZoomTracker.dart");
+
+class Total {
+ static final int DEFAULT_VISIBLE_COLUMNS = 10;
+ static final int DEFAULT_VISIBLE_ROWS = 25;
+
+ Spreadsheet _spreadsheet;
+ SpreadsheetPresenter _presenter;
+
+ Total() {
+ Element recalcButton = document.query("#recalcButton");
+ recalcButton.innerHTML = "Recalculate";
+ recalcButton.on.click.add((Event e) {
+ _presenter.recalculateAll();
+ });
+ }
+
+ void run() {
+ _spreadsheet = new Spreadsheet();
+ SYLKReader reader = new SYLKReader();
+ reader.request("mortgage", (String data) {
+ reader.loadFromString(_spreadsheet, data);
+ _presenter = new SpreadsheetPresenter(_spreadsheet, window,
+ 0, 0, DEFAULT_VISIBLE_ROWS, DEFAULT_VISIBLE_COLUMNS);
+ _spreadsheet.setListener(_presenter);
+ _presenter.recalculateViewport();
+ });
+ }
+}
« no previous file with comments | « client/samples/total/src/Total.dart ('k') | client/testing/dartest/README.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698