Paintable componentDataPaintable = client.getPaintable(componentDataUIDL);
and
Widget componentWidget = (Widget) componentDataPaintable;
to get the paintable and widget for a child component. Is there a way to get the components actual width and height? Using componentWidget.getOffsetWidth() for example always returns 0.
Keep in mind that GWT programming is actually plain old browsers programming but you just need to have typed variables.
So, if your widget is not yet attached to DOM, it cannot have width. Try following in Firebug so you will get the point.
>>> var element = document.createElement("div");
>>> element.offsetWidth
0
>>> document.body.appendChild(element);
<div>
>>> element.offsetWidth
1339
If you need to know the width of component before actually showing it to user you might use the common hack to set css visibility to hidden, attach to dom somewhere (possibly as absolutely positioned), query the sized, do your thing.