diff options
author | Artur Signell <artur.signell@itmill.com> | 2008-10-27 13:39:26 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2008-10-27 13:39:26 +0000 |
commit | e11b767debff2fa7bf32bf8cbea5f8e38b799e4e (patch) | |
tree | 9b6a8195d2bc56d3ae342d66aff341f7bff36f8e /src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java | |
parent | 222aefd050b0ed6a9456fbb9aea56080556084fc (diff) | |
download | vaadin-framework-e11b767debff2fa7bf32bf8cbea5f8e38b799e4e.tar.gz vaadin-framework-e11b767debff2fa7bf32bf8cbea5f8e38b799e4e.zip |
Fix for #2181 - Caption update problems
svn changeset:5740/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java')
-rw-r--r-- | src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java index 6922d3dcc0..06943d6765 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java @@ -340,8 +340,8 @@ public class IOrderedLayout extends CellBasedLayout { remainingSpace = 0;
}
- // ApplicationConnection.getConsole().log(
- // "Layout size: " + activeLayoutSize);
+ ApplicationConnection.getConsole().log(
+ "Layout size: " + activeLayoutSize);
return remainingSpace;
}
@@ -361,7 +361,9 @@ public class IOrderedLayout extends CellBasedLayout { * the caption may determine the space used by the component
*/
if (!childComponentContainer.widgetHasSizeSpecified(orientation)) {
- int captionWidth = childComponentContainer.getCaptionWidth();
+ int captionWidth = childComponentContainer
+ .getCaptionRequiredWidth();
+
if (captionWidth > widgetWidth) {
widgetWidth = captionWidth;
}
@@ -426,7 +428,10 @@ public class IOrderedLayout extends CellBasedLayout { if (!childComponentContainer
.widgetHasSizeSpecified(orientation)) {
int captionWidth = childComponentContainer
- .getCaptionWidth();
+ .getCaptionRequiredWidth();
+ // ApplicationConnection.getConsole().log(
+ // "Component width: " + width
+ // + ", caption width: " + captionWidth);
if (captionWidth > width) {
width = captionWidth;
}
@@ -612,7 +617,14 @@ public class IOrderedLayout extends CellBasedLayout { public boolean requestLayout(Set<Paintable> children) {
for (Paintable p : children) {
/* Update widget size from DOM */
- getComponentContainer((Widget) p).updateWidgetSize();
+ ChildComponentContainer componentContainer = getComponentContainer((Widget) p);
+ componentContainer.updateWidgetSize();
+
+ /*
+ * If this is the result of an caption icon onload event the caption
+ * size may have changed
+ */
+ componentContainer.updateCaptionSize();
}
boolean sameSize = recalculateLayoutAndComponentSizes();
|