if (parent != null) {
final Widget w = (Widget) widgetSet.createWidget(uidl);
parent.replaceChildComponent(component, w);
+ unregisterPaintable((Paintable) component);
registerPaintable(uidl.getId(), (Paintable) w);
((Paintable) w).updateFromUIDL(uidl, this);
return true;
*/
public void runDescendentsLayout(HasWidgets container) {
// getConsole().log(
- // "runDescendentsLayout("
- // + container.getClass().getName().replaceAll(
- // "[^\\.]*\\.", "") + "/" + container.hashCode()
- // + ")");
+ // "runDescendentsLayout(" + Util.getSimpleName(container) + ")");
final Iterator childWidgets = container.iterator();
while (childWidgets.hasNext()) {
final Widget child = (Widget) childWidgets.next();
if (height < 0) {
height = 0;
}
+
// getConsole().log(
- // "Widget " + widget.getClass().getName() + "/"
+ // "Widget " + Util.getSimpleName(widget) + "/"
// + widget.hashCode() + " relative height "
// + relativeSize.getHeight() + "% of "
- // + renderSpace.getHeight() + "px ("
- // + renderSpace.getReservedHeight()
- // + "px reserved): " + height + "px");
+ // + renderSpace.getHeight() + "px (reported by "
+ //
+ // + Util.getSimpleName(parent) + "/"
+ // + parent.hashCode() + ") : " + height + "px");
widget.setHeight(height + "px");
} else {
widget.setHeight(relativeSize.getHeight() + "%");
}
// getConsole().log(
- // "Widget " + widget.getClass().getName() + "/"
+ // "Widget " + Util.getSimpleName(widget) + "/"
// + widget.hashCode() + " relative width "
// + relativeSize.getWidth() + "% of "
- // + renderSpace.getWidth() + "px ("
- // + renderSpace.getReservedWidth()
- // + "px reserved): " + width + "px");
+ // + renderSpace.getWidth() + "px (reported by "
+ // + Util.getSimpleName(parent) + "/"
+ // + parent.hashCode() + ") : " + width + "px");
widget.setWidth(width + "px");
} else {
widget.setWidth(relativeSize.getWidth() + "%");