Example usage for com.google.gwt.user.client.ui SimpleLayoutPanel setWidget

List of usage examples for com.google.gwt.user.client.ui SimpleLayoutPanel setWidget

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui SimpleLayoutPanel setWidget.

Prototype

@Override
    public void setWidget(Widget w) 

Source Link

Usage

From source file:ch.unifr.pai.twice.layout.client.singlepointer.SinglePointerLayout.java

License:Apache License

@Override
public <W extends Widget> void addModule(final String name, TWICEModule<W> module,
        final AsyncCallback<W> callback) {
    // TODO do instantiate on demand - not at registration time

    final SimpleLayoutPanel placeHolder = new SimpleLayoutPanel();
    addWidget(name, placeHolder);/*from www.  j  a  v a 2s. c om*/
    TWICEModuleController.instantiateModule(module, new AsyncCallback<Widget>() {

        @Override
        public void onFailure(Throwable caught) {
            Window.alert("Was not able to instantiate " + name);
        }

        @Override
        public void onSuccess(Widget result) {
            placeHolder.setWidget(result);
            callback.onSuccess((W) result);
            // TWICEModuleController.start(result);
        }
    });

}

From source file:com.codenvy.client.gwtmocks.Presenter2.java

License:Apache License

public void go(SimpleLayoutPanel container) {
    container.setWidget(view);
}