]> source.dussan.org Git - vaadin-framework.git/commitdiff
Subwindow can define size of layout even though its width is undefined
authorArtur Signell <artur.signell@itmill.com>
Thu, 18 Dec 2008 12:21:55 +0000 (12:21 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 18 Dec 2008 12:21:55 +0000 (12:21 +0000)
svn changeset:6269/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/server/ComponentSizeValidator.java

index cca56e30341313cbd0031a35e35a12874c58f3d4..ebb868ead4acda0b32fd43050a81701811a46b63 100644 (file)
@@ -543,15 +543,17 @@ public class ComponentSizeValidator {
                     || parent instanceof CustomComponent) {
                 // TODO vertical splitpanel with another non relative component?
                 return false;
+            } else if (parent instanceof Window) {
+                // Sub window can define width based on caption
+                if (parent.getCaption() != null
+                        && !parent.getCaption().equals("")) {
+                    return true;
+                } else {
+                    return false;
+                }
             } else if (parent instanceof Panel) {
                 // TODO Panel should be able to define width based on caption
                 return false;
-                // if (parent.getCaption() != null
-                // && !parent.getCaption().equals("")) {
-                // return true;
-                // } else {
-                // return false;
-                // }
             } else {
                 return true;
             }