widget.setSize(getWidthAsString(), getHeightAsString());
widget.resize();
}
});
graphicsRegistration = widget.addGraphicsReadyHandler(new GraphicsReadyHandler() {
public void onReady(GraphicsReadyEvent event) {
// Triggered by the resized handler (i.e. we're ready to render the legend):
renderWithoutResize();
}