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

Side by Side Diff: samples/ui_lib/layout/GridTracks.dart

Issue 11267018: Make getKeys, getValues getters (keys, values). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011, 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 // This file has classes representing the grid tracks and grid template 5 // This file has classes representing the grid tracks and grid template
6 6
7 /** 7 /**
8 * The data structure representing the grid-rows or grid-columns 8 * The data structure representing the grid-rows or grid-columns
9 * properties. 9 * properties.
10 */ 10 */
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 final rect = _rects[cell]; 120 final rect = _rects[cell];
121 if (rect != null) { 121 if (rect != null) {
122 rect.add(r + 1, c + 1); 122 rect.add(r + 1, c + 1);
123 } else { 123 } else {
124 _rects[cell] = new _GridTemplateRect(cell, r + 1, c + 1); 124 _rects[cell] = new _GridTemplateRect(cell, r + 1, c + 1);
125 } 125 }
126 } 126 }
127 } 127 }
128 128
129 // Finally, check that each rectangle is valid (i.e. all spaces filled) 129 // Finally, check that each rectangle is valid (i.e. all spaces filled)
130 for (final rect in _rects.getValues()) { 130 for (final rect in _rects.values) {
131 rect.checkValid(); 131 rect.checkValid();
132 } 132 }
133 } 133 }
134 134
135 /** 135 /**
136 * Looks up the given cell in the template, and returns the rect. 136 * Looks up the given cell in the template, and returns the rect.
137 */ 137 */
138 _GridTemplateRect lookupCell(String cell) { 138 _GridTemplateRect lookupCell(String cell) {
139 if (cell.length != 1) { 139 if (cell.length != 1) {
140 throw new UnsupportedError( 140 throw new UnsupportedError(
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 /** 178 /**
179 * Used to return a row/column and span during parsing of grid-row and 179 * Used to return a row/column and span during parsing of grid-row and
180 * grid-column during parsing. 180 * grid-column during parsing.
181 */ 181 */
182 class _GridLocation { 182 class _GridLocation {
183 final int start, length; 183 final int start, length;
184 _GridLocation(this.start, this.length) {} 184 _GridLocation(this.start, this.length) {}
185 185
186 int get end => start + length; 186 int get end => start + length;
187 } 187 }
OLDNEW
« no previous file with comments | « samples/tests/samples/lib/layout/layout_test.dart ('k') | samples/ui_lib/observable/EventBatch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698