private boolean hasHeight;
private boolean hasWidth;
+ private boolean rendering;
public VCssLayout() {
super();
super.setWidth(width);
// panel.setWidth(width);
hasWidth = width != null && !width.equals("");
+ if (!rendering) {
+ panel.updateRelativeSizes();
+ }
}
@Override
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);
setStyleName(margin, CLASSNAME + "-" + "spacing", uidl
.hasAttribute("spacing"));
panel.updateFromUIDL(uidl, client);
+ rendering = false;
}
public boolean hasChildComponent(Widget component) {
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