aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2008-12-11 06:59:45 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2008-12-11 06:59:45 +0000
commit8c349f292e611137db7b08ec5814ff4bfd5b3a11 (patch)
tree9cc01323500b59011bed41b146e94ceab9d50fd6
parent2068a0dd49ae8ca1546bc9380f9c80441d9b6fad (diff)
downloadvaadin-framework-8c349f292e611137db7b08ec5814ff4bfd5b3a11.tar.gz
vaadin-framework-8c349f292e611137db7b08ec5814ff4bfd5b3a11.zip
splitpanel now behaves on size changes that happen outside its own updateFromUIDL method
svn changeset:6160/svn branch:trunk
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/ISplitPanel.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/ISplitPanel.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/ISplitPanel.java
index 9e8f7d8301..0c2f0f2cd9 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/ISplitPanel.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/ISplitPanel.java
@@ -79,6 +79,8 @@ public class ISplitPanel extends ComplexPanel implements Container,
private boolean immediate;
+ private boolean rendering = false;
+
public ISplitPanel() {
this(ORIENTATION_HORIZONTAL);
}
@@ -144,10 +146,12 @@ public class ISplitPanel extends ComplexPanel implements Container,
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
this.client = client;
id = uidl.getId();
+ rendering = true;
immediate = uidl.hasAttribute("immediate");
if (client.updateComponent(this, uidl, true)) {
+ rendering = false;
return;
}
@@ -190,6 +194,8 @@ public class ISplitPanel extends ComplexPanel implements Container,
}
});
}
+ rendering = false;
+
}
private void setSplitPosition(String pos) {
@@ -199,7 +205,6 @@ public class ISplitPanel extends ComplexPanel implements Container,
DOM.setStyleAttribute(splitter, "top", pos);
}
iLayout();
- // TODO Check if this is needed
client.runDescendentsLayout(this);
}
@@ -459,12 +464,20 @@ public class ISplitPanel extends ComplexPanel implements Container,
public void setHeight(String height) {
this.height = height;
super.setHeight(height);
+ if (!rendering && client != null) {
+ iLayout();
+ client.runDescendentsLayout(this);
+ }
}
@Override
public void setWidth(String width) {
this.width = width;
super.setWidth(width);
+ if (!rendering && client != null) {
+ iLayout();
+ client.runDescendentsLayout(this);
+ }
}
public RenderSpace getAllocatedSpace(Widget child) {