| 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 library view; | 5 library view; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'dart:math' as Math; | 9 import 'dart:math' as Math; |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 return _node; | 64 return _node; |
| 65 } | 65 } |
| 66 | 66 |
| 67 /** | 67 /** |
| 68 * A subclass that contains child views should override this to return those | 68 * A subclass that contains child views should override this to return those |
| 69 * views. View uses this to ensure that child views are properly rendered | 69 * views. View uses this to ensure that child views are properly rendered |
| 70 * and initialized when their parent view is without the parent having to | 70 * and initialized when their parent view is without the parent having to |
| 71 * manually handle that traversal. | 71 * manually handle that traversal. |
| 72 */ | 72 */ |
| 73 Collection<View> get childViews { | 73 Iterable<View> get childViews { |
| 74 return const []; | 74 return const []; |
| 75 } | 75 } |
| 76 | 76 |
| 77 /** | 77 /** |
| 78 * View presumes the collection of views returned by childViews is more or | 78 * View presumes the collection of views returned by childViews is more or |
| 79 * less static after the view is first created. Subclasses should call this | 79 * less static after the view is first created. Subclasses should call this |
| 80 * when that invariant doesn't hold to let View know that a new childView has | 80 * when that invariant doesn't hold to let View know that a new childView has |
| 81 * appeared. | 81 * appeared. |
| 82 */ | 82 */ |
| 83 void childViewAdded(View child) { | 83 void childViewAdded(View child) { |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 } | 371 } |
| 372 } | 372 } |
| 373 | 373 |
| 374 void _applyLayout() { | 374 void _applyLayout() { |
| 375 if (_layout != null) { | 375 if (_layout != null) { |
| 376 _layout.applyLayout(); | 376 _layout.applyLayout(); |
| 377 } | 377 } |
| 378 _applyLayoutToChildren(); | 378 _applyLayoutToChildren(); |
| 379 } | 379 } |
| 380 } | 380 } |
| OLD | NEW |