Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: samples/swarm/swarm_ui_lib/view/CompositeView.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 /** 5 /**
6 * A View that is composed of child views. 6 * A View that is composed of child views.
7 */ 7 */
8 class CompositeView extends View { 8 class CompositeView extends View {
9 9
10 List<View> childViews; 10 List<View> childViews;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 for (View childView in childViews) { 57 for (View childView in childViews) {
58 container.nodes.add(childView.node); 58 container.nodes.add(childView.node);
59 } 59 }
60 60
61 return node; 61 return node;
62 } 62 }
63 63
64 void afterRender(Element node) { 64 void afterRender(Element node) {
65 if (_scrollbar !== null) { 65 if (_scrollbar != null) {
66 _scrollbar.initialize(); 66 _scrollbar.initialize();
67 } 67 }
68 } 68 }
69 69
70 View addChild(View view) { 70 View addChild(View view) {
71 childViews.add(view); 71 childViews.add(view);
72 // TODO(rnystrom): Container shouldn't be null. Remove this check. 72 // TODO(rnystrom): Container shouldn't be null. Remove this check.
73 if (container !== null) { 73 if (container != null) {
74 container.nodes.add(view.node); 74 container.nodes.add(view.node);
75 } 75 }
76 childViewAdded(view); 76 childViewAdded(view);
77 return view; 77 return view;
78 } 78 }
79 79
80 void removeChild(View view) { 80 void removeChild(View view) {
81 childViews = childViews.filter(bool _(e) { return view != e; }); 81 childViews = childViews.filter(bool _(e) { return view != e; });
82 // TODO(rnystrom): Container shouldn't be null. Remove this check. 82 // TODO(rnystrom): Container shouldn't be null. Remove this check.
83 if (container !== null) { 83 if (container != null) {
84 view.node.remove(); 84 view.node.remove();
85 } 85 }
86 } 86 }
87 } 87 }
OLDNEW
« no previous file with comments | « samples/swarm/swarm_ui_lib/util/Uri.dart ('k') | samples/swarm/swarm_ui_lib/view/MeasureText.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698