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 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 class _ChildrenElementList extends ListBase<Element> { | 7 class _ChildrenElementList extends ListBase<Element> { |
8 // Raw Element. | 8 // Raw Element. |
9 final Element _element; | 9 final Element _element; |
10 final HtmlCollection _childElements; | 10 final HtmlCollection _childElements; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 for (Element element in iterable) { | 52 for (Element element in iterable) { |
53 _element.append(element); | 53 _element.append(element); |
54 } | 54 } |
55 } | 55 } |
56 | 56 |
57 void sort([int compare(Element a, Element b)]) { | 57 void sort([int compare(Element a, Element b)]) { |
58 throw new UnsupportedError('Cannot sort element lists'); | 58 throw new UnsupportedError('Cannot sort element lists'); |
59 } | 59 } |
60 | 60 |
61 void shuffle() { | 61 void shuffle([Random random]) { |
62 throw new UnsupportedError('Cannot shuffle element lists'); | 62 throw new UnsupportedError('Cannot shuffle element lists'); |
63 } | 63 } |
64 | 64 |
65 void removeWhere(bool test(Element element)) { | 65 void removeWhere(bool test(Element element)) { |
66 _filter(test, false); | 66 _filter(test, false); |
67 } | 67 } |
68 | 68 |
69 void retainWhere(bool test(Element element)) { | 69 void retainWhere(bool test(Element element)) { |
70 _filter(test, true); | 70 _filter(test, true); |
71 } | 71 } |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 } | 273 } |
274 | 274 |
275 void set length(int newLength) { | 275 void set length(int newLength) { |
276 throw new UnsupportedError('Cannot modify list'); | 276 throw new UnsupportedError('Cannot modify list'); |
277 } | 277 } |
278 | 278 |
279 void sort([Comparator<Element> compare]) { | 279 void sort([Comparator<Element> compare]) { |
280 throw new UnsupportedError('Cannot sort list'); | 280 throw new UnsupportedError('Cannot sort list'); |
281 } | 281 } |
282 | 282 |
283 void shuffle() { | 283 void shuffle([Random random]) { |
284 throw new UnsupportedError('Cannot shuffle list'); | 284 throw new UnsupportedError('Cannot shuffle list'); |
285 } | 285 } |
286 | 286 |
287 Element get first => _nodeList.first; | 287 Element get first => _nodeList.first; |
288 | 288 |
289 Element get last => _nodeList.last; | 289 Element get last => _nodeList.last; |
290 | 290 |
291 Element get single => _nodeList.single; | 291 Element get single => _nodeList.single; |
292 | 292 |
293 CssClassSet get classes => new _MultiElementCssClassSet(_elementList); | 293 CssClassSet get classes => new _MultiElementCssClassSet(_elementList); |
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 const ScrollAlignment._internal(this._value); | 1407 const ScrollAlignment._internal(this._value); |
1408 toString() => 'ScrollAlignment.$_value'; | 1408 toString() => 'ScrollAlignment.$_value'; |
1409 | 1409 |
1410 /// Attempt to align the element to the top of the scrollable area. | 1410 /// Attempt to align the element to the top of the scrollable area. |
1411 static const TOP = const ScrollAlignment._internal('TOP'); | 1411 static const TOP = const ScrollAlignment._internal('TOP'); |
1412 /// Attempt to center the element in the scrollable area. | 1412 /// Attempt to center the element in the scrollable area. |
1413 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1413 static const CENTER = const ScrollAlignment._internal('CENTER'); |
1414 /// Attempt to align the element to the bottom of the scrollable area. | 1414 /// Attempt to align the element to the bottom of the scrollable area. |
1415 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1415 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
1416 } | 1416 } |
OLD | NEW |