diff options
author | Leif Åstrand <leif@vaadin.com> | 2011-11-08 13:19:53 +0200 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2011-11-08 13:19:53 +0200 |
commit | 0397e222c508c62b36d352a825b2f2998cf843c8 (patch) | |
tree | d50a9645a6bdcd72af1cd8dbc3faa4fa1ec09b0f /src/com/vaadin/ui | |
parent | 0254e9f248497052accee2410e0ba7f3445e1e24 (diff) | |
download | vaadin-framework-0397e222c508c62b36d352a825b2f2998cf843c8.tar.gz vaadin-framework-0397e222c508c62b36d352a825b2f2998cf843c8.zip |
Added Root.init() and run RootLayout.init() from there
Use getRootLayout() instead of the the rootLayout field
Diffstat (limited to 'src/com/vaadin/ui')
-rw-r--r-- | src/com/vaadin/ui/Root.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/vaadin/ui/Root.java b/src/com/vaadin/ui/Root.java index 75cf6517dd..4454800bb3 100644 --- a/src/com/vaadin/ui/Root.java +++ b/src/com/vaadin/ui/Root.java @@ -48,7 +48,6 @@ public class Root extends AbstractComponentContainer { public Root(RootLayout rootLayout) { this.rootLayout = rootLayout; addComponent(rootLayout); - rootLayout.init(); } @Override @@ -67,7 +66,7 @@ public class Root extends AbstractComponentContainer { @Override public void paintContent(PaintTarget target) throws PaintException { - rootLayout.paint(target); + getRootLayout().paint(target); // Paint subwindows for (final Iterator<Window> i = windows.iterator(); i.hasNext();) { @@ -133,7 +132,7 @@ public class Root extends AbstractComponentContainer { } public Iterator<Component> getComponentIterator() { - return Collections.singleton((Component) rootLayout).iterator(); + return Collections.singleton((Component) getRootLayout()).iterator(); } public String getName() { @@ -443,4 +442,8 @@ public class Root extends AbstractComponentContainer { public RootLayout getRootLayout() { return rootLayout; } + + public void init() { + getRootLayout().init(); + } } |