| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 view; | 5 part of view; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A View that is composed of child views. | 8 * A View that is composed of child views. |
| 9 */ | 9 */ |
| 10 class CompositeView extends View { | 10 class CompositeView extends View { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 childViews.add(view); | 73 childViews.add(view); |
| 74 // TODO(rnystrom): Container shouldn't be null. Remove this check. | 74 // TODO(rnystrom): Container shouldn't be null. Remove this check. |
| 75 if (container != null) { | 75 if (container != null) { |
| 76 container.nodes.add(view.node); | 76 container.nodes.add(view.node); |
| 77 } | 77 } |
| 78 childViewAdded(view); | 78 childViewAdded(view); |
| 79 return view; | 79 return view; |
| 80 } | 80 } |
| 81 | 81 |
| 82 void removeChild(View view) { | 82 void removeChild(View view) { |
| 83 childViews = childViews.filter((e) { return view != e; }); | 83 childViews = childViews.where((e) { return view != e; }).toList(); |
| 84 // TODO(rnystrom): Container shouldn't be null. Remove this check. | 84 // TODO(rnystrom): Container shouldn't be null. Remove this check. |
| 85 if (container != null) { | 85 if (container != null) { |
| 86 view.node.remove(); | 86 view.node.remove(); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 } | 89 } |
| OLD | NEW |