ChildComponentContainer cc = getWidgetForPaintable().widgetToComponentContainer
.get(widget);
if (cc != null) {
- cc.updateCaption(uidl, getConnection());
+ cc.updateCaption(uidl, getConnection(), getMeasuredSize());
}
if (!getWidgetForPaintable().rendering) {
// ensure rel size details are updated
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.BrowserInfo;
+import com.vaadin.terminal.gwt.client.MeasuredSize;
import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize;
import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.UIDL;
return widgetSize;
}
- public void updateCaption(UIDL uidl, ApplicationConnection client) {
+ public void updateCaption(UIDL uidl, ApplicationConnection client,
+ MeasuredSize parentSize) {
if (VCaption.isNeeded(uidl)) {
// We need a caption
newCaption = new VCaption(paintable, client);
// Set initial height to avoid Safari flicker
newCaption.setHeight("18px");
+ parentSize.registerDependency(newCaption.getElement());
// newCaption.setHeight(newCaption.getHeight()); // This might
// be better... ??
if (BrowserInfo.get().isIE()) {
} else {
// Caption is not needed
if (caption != null) {
+ parentSize.deRegisterDependency(caption.getElement());
remove(caption);
}