Commit 409b12e5 authored by Rafael Weinstein's avatar Rafael Weinstein

Change the name of Component.render to Component.build in Effen.

"Render" is misleading. "Build" may not be the best word either, it's closer to what's actually happening.

R=ojan@chromium.org
TBR=abarth
BUG=

Review URL: https://codereview.chromium.org/992033002
parent b7d9e475
This diff is collapsed.
......@@ -27,7 +27,7 @@ class Box extends Component {
Box({String key, this.title, this.children }) : super(key: key);
Node render() {
Node build() {
return new Container(
style: _style,
children: [
......
......@@ -29,11 +29,11 @@ class Button extends ButtonBase {
Button({ Object key, this.content }) : super(key: key);
Node render() {
Node build() {
return new Container(
key: 'Button',
style: _highlight ? _highlightStyle : _style,
children: [super.render(), content]
children: [super.build(), content]
);
}
}
......@@ -54,11 +54,11 @@ class Checkbox extends ButtonBase {
Checkbox({ Object key, this.onChanged, this.checked }) : super(key: key);
Node render() {
Node build() {
return new Container(
style: _style,
children: [
super.render(),
super.build(),
new Container(
style: _highlight ? _containerHighlightStyle : _containerStyle,
children: [
......
......@@ -152,7 +152,7 @@ class Drawer extends Component {
});
}
Node render() {
Node build() {
_ensureListening();
bool isClosed = _position <= -_kWidth;
......
......@@ -27,7 +27,7 @@ class DrawerHeader extends Component {
DrawerHeader({ Object key, this.children }) : super(key: key);
Node render() {
Node build() {
return new Container(
style: _style,
children: [
......
......@@ -32,7 +32,7 @@ abstract class FixedHeightScrollable extends Component {
this.maxOffset
}) : super(key: key) {}
List<Node> renderItems(int start, int count);
List<Node> buildItems(int start, int count);
void didMount() {
var root = getRoot();
......@@ -48,7 +48,7 @@ abstract class FixedHeightScrollable extends Component {
});
}
Node render() {
Node build() {
var itemNumber = 0;
var drawCount = 1;
var transformStyle = '';
......@@ -73,7 +73,7 @@ abstract class FixedHeightScrollable extends Component {
new Container(
style: _scrollAreaStyle,
inlineStyle: transformStyle,
children: renderItems(itemNumber, drawCount)
children: buildItems(itemNumber, drawCount)
)
]
)
......
......@@ -30,8 +30,8 @@ class FloatingActionButton extends MaterialComponent {
FloatingActionButton({ Object key, this.content }) : super(key: key);
Node render() {
List<Node> children = [super.render()];
Node build() {
List<Node> children = [super.build()];
if (content != null)
children.add(content);
......
......@@ -15,7 +15,7 @@ class Icon extends Component {
this.type: ''
}) : super(key: key);
Node render() {
Node build() {
String category = '';
String subtype = '';
List<String> parts = type.split('/');
......
......@@ -80,7 +80,7 @@ class InkSplash extends Component {
});
}
Node render() {
Node build() {
_ensureListening();
return new Container(
......
......@@ -17,7 +17,7 @@ abstract class MaterialComponent extends Component {
MaterialComponent({ Object key }) : super(key: key);
Node render() {
Node build() {
List<Node> children = [];
if (_splashes != null) {
......
......@@ -9,7 +9,7 @@ class MenuDivider extends Component {
MenuDivider({ Object key }) : super(key: key);
Node render() {
Node build() {
return new Container(
style: _style
);
......
......@@ -35,11 +35,11 @@ class MenuItem extends ButtonBase {
MenuItem({ Object key, this.icon, this.children }) : super(key: key);
Node render() {
Node build() {
return new Container(
style: _highlight ? _highlightStyle : _style,
children: [
super.render(),
super.build(),
new Icon(
style: _iconStyle,
size: 24,
......
......@@ -45,11 +45,11 @@ class Radio extends ButtonBase {
this.groupValue
}) : super(key: key);
Node render() {
Node build() {
return new Container(
style: _highlight ? _highlightStyle : _style,
children: value == groupValue ?
[super.render(), new Container( style : _dotStyle )] : [super.render()]
[super.build(), new Container( style : _dotStyle )] : [super.build()]
)..events.listen('click', _handleClick);
}
......
......@@ -16,7 +16,7 @@ class Toolbar extends Component {
Toolbar({String key, this.children}) : super(key: key);
Node render() {
Node build() {
return new Container(
style: _style,
children: children
......
......@@ -67,7 +67,7 @@ class StockArrow extends Component {
return _kRedColors[_colorIndexForPercentChange(percentChange)];
}
Node render() {
Node build() {
String border = _colorForPercentChange(percentChange).toString();
bool up = percentChange > 0;
String type = up ? 'bottom' : 'top';
......
......@@ -9,7 +9,7 @@ class Stocklist extends FixedHeightScrollable {
this.stocks
}) : super(key: key, minOffset: 0.0);
List<Node> renderItems(int start, int count) {
List<Node> buildItems(int start, int count) {
var items = [];
for (var i = 0; i < count; i++) {
items.add(new StockRow(stock: stocks[start + i]));
......
......@@ -34,7 +34,7 @@ class StockRow extends MaterialComponent {
this.stock = stock;
}
Node render() {
Node build() {
String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}";
String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%";
......@@ -62,7 +62,7 @@ class StockRow extends MaterialComponent {
)
];
children.add(super.render());
children.add(super.build());
return new Container(
style: _style,
......
......@@ -33,7 +33,7 @@ class StocksApp extends App {
StocksApp() : super();
Node render() {
Node build() {
var drawer = new Drawer(
animation: _drawerAnimation,
children: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment