| 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 // TODO(jacobr): use _Lists.dart to remove some of the duplicated | 7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated |
| 8 // functionality. | 8 // functionality. |
| 9 class _ChildrenElementList implements List { | 9 class _ChildrenElementList implements List { |
| 10 // Raw Element. | 10 // Raw Element. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 void set length(int newLength) { | 130 void set length(int newLength) { |
| 131 // TODO(jacobr): remove children when length is reduced. | 131 // TODO(jacobr): remove children when length is reduced. |
| 132 throw new UnsupportedError(''); | 132 throw new UnsupportedError(''); |
| 133 } | 133 } |
| 134 | 134 |
| 135 Element add(Element value) { | 135 Element add(Element value) { |
| 136 _element.append(value); | 136 _element.append(value); |
| 137 return value; | 137 return value; |
| 138 } | 138 } |
| 139 | 139 |
| 140 Element addLast(Element value) => add(value); | |
| 141 | |
| 142 Iterator<Element> get iterator => toList().iterator; | 140 Iterator<Element> get iterator => toList().iterator; |
| 143 | 141 |
| 144 void addAll(Iterable<Element> iterable) { | 142 void addAll(Iterable<Element> iterable) { |
| 145 if (iterable is _ChildNodeListLazy) { | 143 if (iterable is _ChildNodeListLazy) { |
| 146 iterable = new List.from(iterable); | 144 iterable = new List.from(iterable); |
| 147 } | 145 } |
| 148 | 146 |
| 149 for (Element element in iterable) { | 147 for (Element element in iterable) { |
| 150 _element.append(element); | 148 _element.append(element); |
| 151 } | 149 } |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 } | 382 } |
| 385 | 383 |
| 386 void set length(int newLength) { | 384 void set length(int newLength) { |
| 387 _nodeList.length = newLength; | 385 _nodeList.length = newLength; |
| 388 } | 386 } |
| 389 | 387 |
| 390 void add(Element value) { | 388 void add(Element value) { |
| 391 throw new UnsupportedError(''); | 389 throw new UnsupportedError(''); |
| 392 } | 390 } |
| 393 | 391 |
| 394 void addLast(Element value) { | |
| 395 throw new UnsupportedError(''); | |
| 396 } | |
| 397 | |
| 398 Iterator<Element> get iterator => new _FrozenElementListIterator(this); | 392 Iterator<Element> get iterator => new _FrozenElementListIterator(this); |
| 399 | 393 |
| 400 void addAll(Iterable<Element> iterable) { | 394 void addAll(Iterable<Element> iterable) { |
| 401 throw new UnsupportedError(''); | 395 throw new UnsupportedError(''); |
| 402 } | 396 } |
| 403 | 397 |
| 404 Iterable<Element> get reversed { | 398 Iterable<Element> get reversed { |
| 405 return IterableMixinWorkaround.reversedList(this); | 399 return IterableMixinWorkaround.reversedList(this); |
| 406 } | 400 } |
| 407 | 401 |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 const ScrollAlignment._internal(this._value); | 1121 const ScrollAlignment._internal(this._value); |
| 1128 toString() => 'ScrollAlignment.$_value'; | 1122 toString() => 'ScrollAlignment.$_value'; |
| 1129 | 1123 |
| 1130 /// Attempt to align the element to the top of the scrollable area. | 1124 /// Attempt to align the element to the top of the scrollable area. |
| 1131 static const TOP = const ScrollAlignment._internal('TOP'); | 1125 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1132 /// Attempt to center the element in the scrollable area. | 1126 /// Attempt to center the element in the scrollable area. |
| 1133 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1127 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1134 /// Attempt to align the element to the bottom of the scrollable area. | 1128 /// Attempt to align the element to the bottom of the scrollable area. |
| 1135 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1129 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1136 } | 1130 } |
| OLD | NEW |