From 956367f656dcd23ae08b848390567cb35cf3a47a Mon Sep 17 00:00:00 2001 From: Joonas Lehtinen Date: Thu, 14 Jun 2007 08:39:37 +0000 Subject: [PATCH] Documented Layout interface svn changeset:1713/svn branch:trunk --- .../toolkit/terminal/gwt/client/Layout.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/com/itmill/toolkit/terminal/gwt/client/Layout.java b/src/com/itmill/toolkit/terminal/gwt/client/Layout.java index 850e6697a3..f3053e29ad 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/Layout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/Layout.java @@ -4,8 +4,44 @@ import com.google.gwt.user.client.ui.Widget; public interface Layout extends Paintable { + /** + * Replace child of this layout with another component. + * + * Each layout must be able to switch children. To to this, one must just + * give references to a current and new child. Note that the Layout is not + * responsible for registering paintable into client. + * + * @param oldComponent + * Child to be replaced + * @param newComponent + * Child that replaces the oldComponent + */ void replaceChildComponent(Widget oldComponent, Widget newComponent); + /** + * Is a given component child of this layout. + * + * @param component + * Component to test. + * @return true iff component is a child of this layout. + */ boolean hasChildComponent(Widget component); + /** + * Update child components caption, description and error message. + * + *

+ * Each component is responsible for maintaining its caption, description + * and error message. In most cases components doesn't want to do that and + * those elements reside outside of the component. Because of this layouts + * should provide service for it's childen to show those elements for them. + *

+ * + * @param component + * Child component that requests the service. + * @param uidl + * UIDL of the child component. + * @return true iff this layout updated caption succesfully. + */ + boolean updateCaption(Widget component, UIDL uidl); } -- 2.39.5