" com.google.gwt.user.client.ui.RootPanel __wbp_panel = com.google.gwt.user.client.ui.RootPanel.get();",
" __wbp_panel.setPixelSize(800, 600);",};
panel = (RootPanelInfo) parse(sourceLines);
}
// prepare Canvas
final DynamicFormInfo parentCanvas =
(DynamicFormInfo) JavaInfoUtils.createJavaInfo(
m_editor,
"com.smartgwt.client.widgets.form.DynamicForm",
new ConstructorCreationSupport());
{
// drop Canvas on RootPanel
panel.command_CREATE2(parentCanvas, null);
panel.command_BOUNDS(parentCanvas, new Point(10, 10), new Dimension(700, 500));
// broadcast for set widget as "live"
parentCanvas.addBroadcastListener(new JavaInfoSetObjectAfter() {
public void invoke(JavaInfo target, Object o) throws Exception {
if (target == parentCanvas) {
parentCanvas.removeBroadcastListener(this);
m_utils.setLiveWidget(o);
}
}
});
}
// prepare component
FormItemInfo formItem = createClone();
// add component on Canvas
parentCanvas.command_CREATE(formItem, null);
// remove "live" mark from RootPanel,
// because only one instance of RootPanel exists, so we update it also for "main" hierarchy
panel.getPropertyByTitle("title").setValue(null);
// ready to get live values
return formItem;