diff options
author | Artur Signell <artur@vaadin.com> | 2013-06-10 19:28:57 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-06-11 08:08:47 +0000 |
commit | 424af57c0a99bf93066d331fe6a3a870cc44cf24 (patch) | |
tree | 701ed59ab57c4279bb92bdde9c6879432ce05a4b /server/src/com/vaadin/ui/Component.java | |
parent | 5adb5c2cfa5cb3d5c148e1116bd99523998e95fa (diff) | |
download | vaadin-framework-424af57c0a99bf93066d331fe6a3a870cc44cf24.tar.gz vaadin-framework-424af57c0a99bf93066d331fe6a3a870cc44cf24.zip |
Move ClientConnector.setParent to Component and Extension (#11777)
Change-Id: I1f0b2597f621160329ddc432869277b2758efd52
Diffstat (limited to 'server/src/com/vaadin/ui/Component.java')
-rw-r--r-- | server/src/com/vaadin/ui/Component.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/Component.java b/server/src/com/vaadin/ui/Component.java index 20958812fc..485327bb54 100644 --- a/server/src/com/vaadin/ui/Component.java +++ b/server/src/com/vaadin/ui/Component.java @@ -333,6 +333,32 @@ public interface Component extends ClientConnector, Sizeable, Serializable { public void setVisible(boolean visible); /** + * Sets the parent connector of the component. + * + * <p> + * This method automatically calls {@link #attach()} if the component + * becomes attached to the session, regardless of whether it was attached + * previously. Conversely, if the component currently is attached to the + * session, {@link #detach()} is called for the connector before attaching + * it to a new parent. + * </p> + * <p> + * This method is rarely called directly. + * {@link ComponentContainer#addComponent(Component)} or a + * {@link HasComponents} specific method is normally used for adding + * components to a parent and the used method will call this method + * implicitly. + * </p> + * + * @param parent + * the parent connector + * @throws IllegalStateException + * if a parent is given even though the connector already has a + * parent + */ + public void setParent(HasComponents parent); + + /** * Gets the parent component of the component. * * <p> |