diff options
author | Henri Sara <hesara@vaadin.com> | 2012-11-14 15:13:21 +0200 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2012-11-14 15:13:21 +0200 |
commit | 259b441265677906631c923d8fe51f549adfc120 (patch) | |
tree | bb44a5bc05eb914d3f9538898900d9605c336e9f /server/src/com/vaadin/ui/Window.java | |
parent | aca92f4937cc54f122b20c4bfb6288ee007c9e47 (diff) | |
download | vaadin-framework-259b441265677906631c923d8fe51f549adfc120.tar.gz vaadin-framework-259b441265677906631c923d8fe51f549adfc120.zip |
Remove Window.addComponent() (#2924)
Change-Id: Ida3269e3cce906fd4b55c5e1049b24e0ff383289
Diffstat (limited to 'server/src/com/vaadin/ui/Window.java')
-rw-r--r-- | server/src/com/vaadin/ui/Window.java | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java index 7e9fecbdc5..3f6091aa90 100644 --- a/server/src/com/vaadin/ui/Window.java +++ b/server/src/com/vaadin/ui/Window.java @@ -105,40 +105,6 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, setSizeUndefined(); } - /** - * Add a component to the content ({@link ComponentContainer}) of a window. - * - * This version creates an empty {@link VerticalLayout} if no container is - * defined, but this automatic creation will be removed in future versions. - * - * @param c - * component to add - * - * @deprecated use Window.setContent(Component) instead - */ - @Deprecated - public void addComponent(Component c) { - if (c instanceof Window) { - throw new IllegalArgumentException( - "Window cannot be added to another via addComponent. " - + "Use addWindow(Window) instead."); - } - - if (getContent() == null) { - // TODO this automatic creation should be removed in the future - VerticalLayout content = new VerticalLayout(); - content.setMargin(true); - setContent(content); - } - - if (getContent() instanceof ComponentContainer) { - ((ComponentContainer) getContent()).addComponent(c); - } else { - throw new IllegalArgumentException( - "Cannot add component to a window whose content is not a ComponentContainer"); - } - } - /* ********************************************************************* */ /* |