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 extends ListBase<Element> { | 9 class _ChildrenElementList extends ListBase<Element> { |
10 // Raw Element. | 10 // Raw Element. |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 } | 197 } |
198 | 198 |
199 void removeRange(int start, int rangeLength) { | 199 void removeRange(int start, int rangeLength) { |
200 throw new UnimplementedError(); | 200 throw new UnimplementedError(); |
201 } | 201 } |
202 | 202 |
203 void insertRange(int start, int rangeLength, [initialValue = null]) { | 203 void insertRange(int start, int rangeLength, [initialValue = null]) { |
204 throw new UnimplementedError(); | 204 throw new UnimplementedError(); |
205 } | 205 } |
206 | 206 |
| 207 Iterable getRange(int start, int end) { |
| 208 throw new UnimplementedError(); |
| 209 } |
| 210 |
207 List sublist(int start, [int end]) { | 211 List sublist(int start, [int end]) { |
208 if (end == null) end = length; | 212 if (end == null) end = length; |
209 return new _FrozenElementList._wrap(Lists.getRange(this, start, end, [])); | 213 return new _FrozenElementList._wrap(Lists.getRange(this, start, end, [])); |
210 } | 214 } |
211 | 215 |
212 List getRange(int start, int rangeLength) => | |
213 sublist(start, start + rangeLength); | |
214 | |
215 int indexOf(Element element, [int start = 0]) { | 216 int indexOf(Element element, [int start = 0]) { |
216 return Lists.indexOf(this, element, start, this.length); | 217 return Lists.indexOf(this, element, start, this.length); |
217 } | 218 } |
218 | 219 |
219 int lastIndexOf(Element element, [int start = null]) { | 220 int lastIndexOf(Element element, [int start = null]) { |
220 if (start == null) start = length - 1; | 221 if (start == null) start = length - 1; |
221 return Lists.lastIndexOf(this, element, start); | 222 return Lists.lastIndexOf(this, element, start); |
222 } | 223 } |
223 | 224 |
224 void insert(int index, Element element) { | 225 void insert(int index, Element element) { |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 const ScrollAlignment._internal(this._value); | 985 const ScrollAlignment._internal(this._value); |
985 toString() => 'ScrollAlignment.$_value'; | 986 toString() => 'ScrollAlignment.$_value'; |
986 | 987 |
987 /// Attempt to align the element to the top of the scrollable area. | 988 /// Attempt to align the element to the top of the scrollable area. |
988 static const TOP = const ScrollAlignment._internal('TOP'); | 989 static const TOP = const ScrollAlignment._internal('TOP'); |
989 /// Attempt to center the element in the scrollable area. | 990 /// Attempt to center the element in the scrollable area. |
990 static const CENTER = const ScrollAlignment._internal('CENTER'); | 991 static const CENTER = const ScrollAlignment._internal('CENTER'); |
991 /// Attempt to align the element to the bottom of the scrollable area. | 992 /// Attempt to align the element to the bottom of the scrollable area. |
992 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 993 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
993 } | 994 } |
OLD | NEW |