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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 } | 198 } |
199 | 199 |
200 void removeRange(int start, int rangeLength) { | 200 void removeRange(int start, int rangeLength) { |
201 throw new UnimplementedError(); | 201 throw new UnimplementedError(); |
202 } | 202 } |
203 | 203 |
204 void insertRange(int start, int rangeLength, [initialValue = null]) { | 204 void insertRange(int start, int rangeLength, [initialValue = null]) { |
205 throw new UnimplementedError(); | 205 throw new UnimplementedError(); |
206 } | 206 } |
207 | 207 |
| 208 Iterable getRange(int start, int end) { |
| 209 throw new UnimplementedError(); |
| 210 } |
| 211 |
208 List sublist(int start, [int end]) { | 212 List sublist(int start, [int end]) { |
209 if (end == null) end = length; | 213 if (end == null) end = length; |
210 return new _FrozenElementList._wrap(Lists.getRange(this, start, end, [])); | 214 return new _FrozenElementList._wrap(Lists.getRange(this, start, end, [])); |
211 } | 215 } |
212 | 216 |
213 List getRange(int start, int rangeLength) => | |
214 sublist(start, start + rangeLength); | |
215 | |
216 int indexOf(Element element, [int start = 0]) { | 217 int indexOf(Element element, [int start = 0]) { |
217 return Lists.indexOf(this, element, start, this.length); | 218 return Lists.indexOf(this, element, start, this.length); |
218 } | 219 } |
219 | 220 |
220 int lastIndexOf(Element element, [int start = null]) { | 221 int lastIndexOf(Element element, [int start = null]) { |
221 if (start == null) start = length - 1; | 222 if (start == null) start = length - 1; |
222 return Lists.lastIndexOf(this, element, start); | 223 return Lists.lastIndexOf(this, element, start); |
223 } | 224 } |
224 | 225 |
225 void insert(int index, Element element) { | 226 void insert(int index, Element element) { |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 const ScrollAlignment._internal(this._value); | 994 const ScrollAlignment._internal(this._value); |
994 toString() => 'ScrollAlignment.$_value'; | 995 toString() => 'ScrollAlignment.$_value'; |
995 | 996 |
996 /// Attempt to align the element to the top of the scrollable area. | 997 /// Attempt to align the element to the top of the scrollable area. |
997 static const TOP = const ScrollAlignment._internal('TOP'); | 998 static const TOP = const ScrollAlignment._internal('TOP'); |
998 /// Attempt to center the element in the scrollable area. | 999 /// Attempt to center the element in the scrollable area. |
999 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1000 static const CENTER = const ScrollAlignment._internal('CENTER'); |
1000 /// Attempt to align the element to the bottom of the scrollable area. | 1001 /// Attempt to align the element to the bottom of the scrollable area. |
1001 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1002 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
1002 } | 1003 } |
OLD | NEW |