Example usage for com.google.gwt.user.client Window addCloseHandler

List of usage examples for com.google.gwt.user.client Window addCloseHandler

Introduction

In this page you can find the example usage for com.google.gwt.user.client Window addCloseHandler.

Prototype

public static HandlerRegistration addCloseHandler(final CloseHandler<Window> handler) 

Source Link

Document

Adds a CloseEvent handler.

Usage

From source file:tv.dyndns.kishibe.qmaclone.client.game.SceneGame.java

License:Open Source License

@Override
protected void onLoad() {
    super.onLoad();

    updater.start();//from w w  w  . j a va  2 s .c om

    if (sessionData.isAddPenalty()) {
        handlerRegistrationCloseHandler = Window.addCloseHandler(this);
        handlerRegistrationClosingHandler = Window.addWindowClosingHandler(this);
    }
}

From source file:tv.dyndns.kishibe.qmaclone.client.UserData.java

License:Open Source License

private UserData() {
    if (GWT.isClient()) {
        Window.addCloseHandler(this);
        load();
    }
}