aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/terminal/gwt/server/DebugUtilities.java
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2008-12-11 13:16:47 +0000
committerArtur Signell <artur.signell@itmill.com>2008-12-11 13:16:47 +0000
commit730a1ae7dff83b12928db09fe7097166a1d58ea5 (patch)
tree16418ce5bf42a97f5fe565f81334a61d5f7c8ae7 /src/com/itmill/toolkit/terminal/gwt/server/DebugUtilities.java
parentf1b14bd8f9c4d81871f85e794bc39319ad69f902 (diff)
downloadvaadin-framework-730a1ae7dff83b12928db09fe7097166a1d58ea5.tar.gz
vaadin-framework-730a1ae7dff83b12928db09fe7097166a1d58ea5.zip
Fixed layout validation so only the invalid dimension is set to undefined
svn changeset:6173/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/terminal/gwt/server/DebugUtilities.java')
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/server/DebugUtilities.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/server/DebugUtilities.java b/src/com/itmill/toolkit/terminal/gwt/server/DebugUtilities.java
index d32ceae436..83f3de331c 100644
--- a/src/com/itmill/toolkit/terminal/gwt/server/DebugUtilities.java
+++ b/src/com/itmill/toolkit/terminal/gwt/server/DebugUtilities.java
@@ -32,12 +32,7 @@ public class DebugUtilities {
public static boolean validateComponentRelativeSizes(Component component,
boolean recursive) {
- boolean valid = true;
-
- if (!(component instanceof Window)) {
- valid = valid && checkWidths(component);
- valid = valid && checkHeights(component);
- }
+ boolean valid = checkWidths(component) && checkHeights(component);
if (recursive) {
if (component instanceof Panel) {
@@ -86,7 +81,11 @@ public class DebugUtilities {
}
- private static boolean checkHeights(Component component) {
+ public static boolean checkHeights(Component component) {
+ if (component instanceof Window) {
+ return true;
+ }
+
Component parent = component.getParent();
String msg = null;
Stack<ComponentInfo> attributes = null;
@@ -146,7 +145,11 @@ public class DebugUtilities {
}
- private static boolean checkWidths(Component component) {
+ public static boolean checkWidths(Component component) {
+ if (component instanceof Window) {
+ return true;
+ }
+
Component parent = component.getParent();
String msg = null;
Stack<ComponentInfo> attributes = null;