Create body widget in Screen constructor

By building the body early subclasses can use a UiBinder and
immediately create their child widget(s) in the constructor.

Change-Id: Ifecec0301b072507d21bb54b4eb0763f7c912c17
This commit is contained in:
Shawn Pearce
2013-07-06 19:19:21 -07:00
parent 11aa47debf
commit d16a3d549b

View File

@@ -48,6 +48,7 @@ public abstract class Screen extends View {
protected Screen() {
initWidget(new FlowPanel());
setStyleName(Gerrit.RESOURCES.css().screen());
body = new FlowPanel();
}
@Override
@@ -76,7 +77,7 @@ public abstract class Screen extends View {
protected void onInitUI() {
final FlowPanel me = (FlowPanel) getWidget();
me.add(header = new Grid(1, Cols.values().length));
me.add(body = new FlowPanel());
me.add(body);
headerText = new InlineLabel();
if (titleWidget == null) {