Example usage for com.google.gwt.core.client.impl Disposable Disposable

List of usage examples for com.google.gwt.core.client.impl Disposable Disposable

Introduction

In this page you can find the example usage for com.google.gwt.core.client.impl Disposable Disposable.

Prototype

Disposable

Source Link

Usage

From source file:org.gwt.dynamic.common.client.widgets.WrapPanel.java

License:MIT License

private static void hookWindowClosing() {
    Impl.scheduleDispose(new Disposable() {
        @Override/*from  w  w  w.j  a  va2s  .  c om*/
        public void dispose() {
            detachWidgets();
        }
    });
    // Catch the window closing event.
    Window.addCloseHandler(new CloseHandler<Window>() {
        @Override
        public void onClose(CloseEvent<Window> closeEvent) {
            detachWidgets();
        }
    });
}