summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2010-03-16 09:11:05 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2010-03-16 09:11:05 +0000
commitf3f88b57d42e83dde1aaeac7f78cdbc6a907b827 (patch)
treef9b0fcc82fe377a1caebd0761f3cce8808880f4d
parent3732b1fc9654f8cdeb23c079a6b2a96b323c49ea (diff)
downloadvaadin-framework-f3f88b57d42e83dde1aaeac7f78cdbc6a907b827.tar.gz
vaadin-framework-f3f88b57d42e83dde1aaeac7f78cdbc6a907b827.zip
merged [11905] from 6.3
svn changeset:11906/svn branch:6.2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java
index 90cf102cb9..5307234869 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java
@@ -55,6 +55,7 @@ public class VCssLayout extends SimplePanel implements Paintable, Container {
private boolean hasHeight;
private boolean hasWidth;
+ private boolean rendering;
public VCssLayout() {
super();
@@ -74,6 +75,9 @@ public class VCssLayout extends SimplePanel implements Paintable, Container {
super.setWidth(width);
// panel.setWidth(width);
hasWidth = width != null && !width.equals("");
+ if (!rendering) {
+ panel.updateRelativeSizes();
+ }
}
@Override
@@ -81,11 +85,16 @@ public class VCssLayout extends SimplePanel implements Paintable, Container {
super.setHeight(height);
// panel.setHeight(height);
hasHeight = height != null && !height.equals("");
+ if (!rendering) {
+ panel.updateRelativeSizes();
+ }
}
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
+ rendering = true;
if (client.updateComponent(this, uidl, true)) {
+ rendering = false;
return;
}
clickEventHandler.handleEventHandlerRegistration(client);
@@ -104,6 +113,7 @@ public class VCssLayout extends SimplePanel implements Paintable, Container {
setStyleName(margin, CLASSNAME + "-" + "spacing", uidl
.hasAttribute("spacing"));
panel.updateFromUIDL(uidl, client);
+ rendering = false;
}
public boolean hasChildComponent(Widget component) {
@@ -128,6 +138,14 @@ public class VCssLayout extends SimplePanel implements Paintable, Container {
setStyleName(CLASSNAME + "-container");
}
+ public void updateRelativeSizes() {
+ for (Widget w : getChildren()) {
+ if (w instanceof Paintable) {
+ client.handleComponentRelativeSize(w);
+ }
+ }
+ }
+
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
// for later requests