Example usage for com.google.gwt.gwtai.applet.client AppletCallback AppletCallback

List of usage examples for com.google.gwt.gwtai.applet.client AppletCallback AppletCallback

Introduction

In this page you can find the example usage for com.google.gwt.gwtai.applet.client AppletCallback AppletCallback.

Prototype

AppletCallback

Source Link

Usage

From source file:com.google.gwt.gwtai.demo.client.GwtAI.java

License:Apache License

private Widget createCallbackApplet() {
    CallbackApplet applet = (CallbackApplet) GWT.create(CallbackApplet.class);
    Widget widgetAppletOne = AppletJSUtil.createAppletWidget(applet);
    RootPanel.get().add(widgetAppletOne);

    AppletJSUtil.registerAppletCallback(applet, new AppletCallback<String>() {
        public void callback(String callbackValue) {
            Window.alert("Received: " + callbackValue);
        }// ww  w  . j a  v  a  2  s . c o  m
    });

    return widgetAppletOne;
}