| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 194 } |
| 195 | 195 |
| 196 void removeRange(int start, int rangeLength) { | 196 void removeRange(int start, int rangeLength) { |
| 197 throw new UnimplementedError(); | 197 throw new UnimplementedError(); |
| 198 } | 198 } |
| 199 | 199 |
| 200 void insertRange(int start, int rangeLength, [initialValue = null]) { | 200 void insertRange(int start, int rangeLength, [initialValue = null]) { |
| 201 throw new UnimplementedError(); | 201 throw new UnimplementedError(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 List sublist(int start, [int end]) { |
| 205 if (end == null) end = length; |
| 206 return new _FrozenElementList._wrap(Lists.getRange(this, start, end, [])); |
| 207 } |
| 208 |
| 204 List getRange(int start, int rangeLength) => | 209 List getRange(int start, int rangeLength) => |
| 205 new _FrozenElementList._wrap(Lists.getRange(this, start, rangeLength, | 210 sublist(start, start + rangeLength); |
| 206 [])); | |
| 207 | 211 |
| 208 int indexOf(Element element, [int start = 0]) { | 212 int indexOf(Element element, [int start = 0]) { |
| 209 return Lists.indexOf(this, element, start, this.length); | 213 return Lists.indexOf(this, element, start, this.length); |
| 210 } | 214 } |
| 211 | 215 |
| 212 int lastIndexOf(Element element, [int start = null]) { | 216 int lastIndexOf(Element element, [int start = null]) { |
| 213 if (start == null) start = length - 1; | 217 if (start == null) start = length - 1; |
| 214 return Lists.lastIndexOf(this, element, start); | 218 return Lists.lastIndexOf(this, element, start); |
| 215 } | 219 } |
| 216 | 220 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 } | 408 } |
| 405 | 409 |
| 406 void removeRange(int start, int rangeLength) { | 410 void removeRange(int start, int rangeLength) { |
| 407 throw new UnsupportedError(''); | 411 throw new UnsupportedError(''); |
| 408 } | 412 } |
| 409 | 413 |
| 410 void insertRange(int start, int rangeLength, [initialValue = null]) { | 414 void insertRange(int start, int rangeLength, [initialValue = null]) { |
| 411 throw new UnsupportedError(''); | 415 throw new UnsupportedError(''); |
| 412 } | 416 } |
| 413 | 417 |
| 418 List<Element> sublist(int start, [int end]) { |
| 419 return new _FrozenElementList._wrap(_nodeList.sublist(start, end)); |
| 420 } |
| 421 |
| 414 List<Element> getRange(int start, int rangeLength) => | 422 List<Element> getRange(int start, int rangeLength) => |
| 415 new _FrozenElementList._wrap(_nodeList.getRange(start, rangeLength)); | 423 sublist(start, start + rangeLength); |
| 416 | 424 |
| 417 int indexOf(Element element, [int start = 0]) => | 425 int indexOf(Element element, [int start = 0]) => |
| 418 _nodeList.indexOf(element, start); | 426 _nodeList.indexOf(element, start); |
| 419 | 427 |
| 420 int lastIndexOf(Element element, [int start = null]) => | 428 int lastIndexOf(Element element, [int start = null]) => |
| 421 _nodeList.lastIndexOf(element, start); | 429 _nodeList.lastIndexOf(element, start); |
| 422 | 430 |
| 423 void clear() { | 431 void clear() { |
| 424 throw new UnsupportedError(''); | 432 throw new UnsupportedError(''); |
| 425 } | 433 } |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 const ScrollAlignment._internal(this._value); | 1138 const ScrollAlignment._internal(this._value); |
| 1131 toString() => 'ScrollAlignment.$_value'; | 1139 toString() => 'ScrollAlignment.$_value'; |
| 1132 | 1140 |
| 1133 /// Attempt to align the element to the top of the scrollable area. | 1141 /// Attempt to align the element to the top of the scrollable area. |
| 1134 static const TOP = const ScrollAlignment._internal('TOP'); | 1142 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1135 /// Attempt to center the element in the scrollable area. | 1143 /// Attempt to center the element in the scrollable area. |
| 1136 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1144 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1137 /// Attempt to align the element to the bottom of the scrollable area. | 1145 /// Attempt to align the element to the bottom of the scrollable area. |
| 1138 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1146 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1139 } | 1147 } |
| OLD | NEW |