diff options
Diffstat (limited to 'src/com/vaadin/ui/Panel.java')
-rw-r--r-- | src/com/vaadin/ui/Panel.java | 42 |
1 files changed, 3 insertions, 39 deletions
diff --git a/src/com/vaadin/ui/Panel.java b/src/com/vaadin/ui/Panel.java index b2916f78c7..c339100cda 100644 --- a/src/com/vaadin/ui/Panel.java +++ b/src/com/vaadin/ui/Panel.java @@ -4,6 +4,7 @@ package com.vaadin.ui; +import java.util.Collections; import java.util.Iterator; import java.util.Map; @@ -164,6 +165,7 @@ public class Panel extends AbstractComponentContainer implements Scrollable, .addListener((ComponentContainer.ComponentDetachListener) this); content = newContent; + requestRepaint(); } /** @@ -192,15 +194,6 @@ public class Panel extends AbstractComponentContainer implements Scrollable, } } - @Override - public void requestRepaintAll() { - // Panel has odd structure, delegate to layout - requestRepaint(); - if (getContent() != null) { - getContent().requestRepaintAll(); - } - } - /** * Adds the component into this container. * @@ -237,7 +230,7 @@ public class Panel extends AbstractComponentContainer implements Scrollable, * @see com.vaadin.ui.ComponentContainer#getComponentIterator() */ public Iterator<Component> getComponentIterator() { - return content.getComponentIterator(); + return Collections.singleton((Component) content).iterator(); } /** @@ -354,35 +347,6 @@ public class Panel extends AbstractComponentContainer implements Scrollable, } /** - * Notifies the component that it is connected to an application. - * - * @see com.vaadin.ui.Component#attach() - */ - @Override - public void attach() { - getRoot().componentAttached(this); - // can't call parent here as this is Panels hierarchy is a hack - requestRepaint(); - if (content != null) { - content.attach(); - } - } - - /** - * Notifies the component that it is detached from the application. - * - * @see com.vaadin.ui.Component#detach() - */ - @Override - public void detach() { - // can't call parent here as this is Panels hierarchy is a hack - if (content != null) { - content.detach(); - } - getRoot().componentDetached(this); - } - - /** * Removes all components from this container. * * @see com.vaadin.ui.ComponentContainer#removeAllComponents() |