summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2008-12-18 09:11:24 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2008-12-18 09:11:24 +0000
commitbbe33ce67db77464b211669c85aca2ea4aecce4e (patch)
tree3556c26caf5fbb3ce53258afd31d788d9b5e4d41 /src
parent64787c061fde1dd2e9c2e05f13d59c6a70d12ff9 (diff)
downloadvaadin-framework-bbe33ce67db77464b211669c85aca2ea4aecce4e.tar.gz
vaadin-framework-bbe33ce67db77464b211669c85aca2ea4aecce4e.zip
fixes #2365
svn changeset:6260/svn branch:trunk
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/ui/AbstractComponentContainer.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/ui/AbstractComponentContainer.java b/src/com/itmill/toolkit/ui/AbstractComponentContainer.java
index a0717579a4..51aca35d25 100644
--- a/src/com/itmill/toolkit/ui/AbstractComponentContainer.java
+++ b/src/com/itmill/toolkit/ui/AbstractComponentContainer.java
@@ -216,6 +216,36 @@ public abstract class AbstractComponentContainer extends AbstractComponent
}
}
+ @Override
+ public void setWidth(float width, int unit) {
+ if (getWidth() < 0 && width >= 0) {
+ // width becoming defined -> relative width children currently
+ // painted undefined may become defined
+ // TODO could be optimized(subtree of only those components
+ // which have undefined height due this component), currently just
+ // repaints whole subtree
+ requestRepaintAll();
+ } else if (getWidth() >= 0 && width < 0) {
+ requestRepaintAll();
+ }
+ super.setWidth(width, unit);
+ }
+
+ @Override
+ public void setHeight(float height, int unit) {
+ if (getHeight() < 0 && height >= 0) {
+ // height becoming defined -> relative height childs currently
+ // painted undefined may become defined
+ // TODO this could be optimized (subtree of only those components
+ // which have undefined width due this component), currently just
+ // repaints whole
+ // subtree
+ } else if (getHeight() >= 0 && height < 0) {
+ requestRepaintAll();
+ }
+ super.setHeight(height, unit);
+ }
+
public void requestRepaintAll() {
requestRepaint();
for (Iterator childIterator = getComponentIterator(); childIterator