protected void setWidget(Widget widget, int width, int height ,AsyncCallback<Boolean> callback)
{
if(_w != -1) // deserialized
{
View view = screen.getView(_v);
zwindow = new ZWindow(widget,_w, _h, callback);
view.addWindow(zwindow, _l, _t);
}else
{
View activeView = screen.getActiveView();
if(zwindow == null)
{
zwindow = new ZWindow(widget,width, height, callback);
}
int centerX = (activeView.getWidth() - width) / 2;
int centerY = (activeView.getHeight() - height)/2;
activeView.addWindow(zwindow, centerX, centerY);
}
zwindow.setTitle((title!=null ? title : getProcessName()));
// else ignore it
}