diff options
author | Artur Signell <artur@vaadin.com> | 2012-06-21 10:36:09 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-06-21 17:11:30 +0300 |
commit | 99571617b239c33c6ea085323b88ddf32b8a3827 (patch) | |
tree | 9d9ed2418367df584a9c7e69e32b97019f1fc657 /src/com | |
parent | a75c42b0641059aca186a26cf648e303f34f6a82 (diff) | |
download | vaadin-framework-99571617b239c33c6ea085323b88ddf32b8a3827.tar.gz vaadin-framework-99571617b239c33c6ea085323b88ddf32b8a3827.zip |
Root javadoc
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/vaadin/ui/Component.java | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/com/vaadin/ui/Component.java b/src/com/vaadin/ui/Component.java index ce6df9854f..2394d0f307 100644 --- a/src/com/vaadin/ui/Component.java +++ b/src/com/vaadin/ui/Component.java @@ -497,21 +497,15 @@ public interface Component extends ClientConnector, Sizeable, Serializable { public void setIcon(Resource icon); /** - * Gets the parent window of the component. + * Gets the Root the component is attached to. * * <p> - * If the component is not attached to a window through a component + * If the component is not attached to a Root through a component * containment hierarchy, <code>null</code> is returned. * </p> * - * <p> - * The window can be either an application-level window or a sub-window. If - * the component is itself a window, it returns a reference to itself, not - * to its containing window (of a sub-window). - * </p> - * - * @return the parent window of the component or <code>null</code> if it is - * not attached to a window or is itself a window + * @return the Root of the component or <code>null</code> if it is not + * attached to a Root */ public Root getRoot(); @@ -520,11 +514,16 @@ public interface Component extends ClientConnector, Sizeable, Serializable { * * <p> * The method will return {@code null} if the component is not currently - * attached to an application. This is often a problem in constructors of - * regular components and in the initializers of custom composite - * components. A standard workaround is to move the problematic - * initialization to {@link #attach()}, as described in the documentation of - * the method. + * attached to an application. + * </p> + * + * <p> + * Getting a null value is often a problem in constructors of regular + * components and in the initializers of custom composite components. A + * standard workaround is to use {@link Application#getCurrentApplication()} + * to retrieve the application instance that the current request relates to. + * Another way is to move the problematic initialization to + * {@link #attach()}, as described in the documentation of the method. * </p> * * @return the parent application of the component or <code>null</code>. |