Java 类com.google.gwt.user.client.Window.ClosingEvent 实例源码

项目:sig-seguimiento-vehiculos    文件:EventListenerInitializer.java   
public void initialize() {

        addChangelayerListener();

        addRemoveLayerListener();

        addAddLayerListener();

        addChangeSelectedWMSLayerListener();

        Window.addWindowClosingHandler(new Window.ClosingHandler() {
            @Override
            public void onWindowClosing(final ClosingEvent event) {
                event.setMessage(UIMessages.INSTANCE.leaveWebText());
            }
        });
    }
项目:geowe-core    文件:EventListenerInitializer.java   
public void initialize() {

        addChangelayerListener();

        addRemoveLayerListener();

        addAddLayerListener();

        addChangeSelectedWMSLayerListener();

        Window.addWindowClosingHandler(new Window.ClosingHandler() {
            @Override
            public void onWindowClosing(final ClosingEvent event) {
                event.setMessage(UIMessages.INSTANCE.leaveWebText());
            }
        });
    }
项目:geomajas-project-client-gwt2    文件:GwtCommandDispatcher.java   
private GwtCommandDispatcher() {
    locale = LocaleInfo.getCurrentLocale().getLocaleName();
    if ("default".equals(locale)) {
        locale = null;
    }
    deferreds = new ArrayList<Deferred>();
    service = (GeomajasServiceAsync) GWT.create(GeomajasService.class);
    setServiceEndPointUrl(GWT.getModuleBaseURL() + "geomajasService");
    setUseLazyLoading(true);
    setShowError(true);

    Window.addWindowClosingHandler(new ClosingHandler() {

        public void onWindowClosing(ClosingEvent event) {
            GwtCommandDispatcher.getInstance().setShowError(false);

            // Cancel all outstanding requests:
            for (Deferred deferred : deferreds) {
                deferred.cancel();
            }
        }
    });
}
项目:Wiab.pro    文件:WebClient.java   
private void setupWindowClosingHandler() {
  Window.addWindowClosingHandler(new Window.ClosingHandler() {

    @Override
    public void onWindowClosing(ClosingEvent event) {
      if (savingInProcess) {
        event.setMessage("Failed to save your last changes.");
      }
    }
  });
}
项目:appformer    文件:LockManagerImpl.java   
private void releaseLockOnClose() {
    closeHandler = Window.addWindowClosingHandler(new ClosingHandler() {
        @Override
        public void onWindowClosing(ClosingEvent event) {
            releaseLock();
        }
    });
}
项目:qafe-platform    文件:EventFactory.java   
public static void createMenuCloseEvent(final String uuid, final WindowPanel sender) {
    sender.addWindowClosingHandler(new ClosingHandler() {
        public void onWindowClosing(ClosingEvent event) {
            if (Window.confirm("Are you sure you want to close the application and all of its windows ?")) {
                MainFactoryActions.remove(uuid);
                ComponentRepository.getInstance().removeAllItemsForWindow(uuid, null);
                // ClientApplicationContext.getInstance().closeAllWindowsForUUID(uuid);
                // return true;
            } else {
                // return false;
            }
            Window.prompt("Are you sure you want to close the application and all of its windows ?", "X");
        }
    });
}
项目:gwtinaction2    文件:BasicProject.java   
/**
 * Set up the History management for the application.
 */
public void setUpHistoryManagement(){
    // Make this class your history manager (see onValueChange method)
    History.addValueChangeHandler(this);
    // Handle any existing history token
    History.fireCurrentHistoryState();
    // Trap user hitting back button too many times.
    Window.addWindowClosingHandler(new ClosingHandler(){
        public void onWindowClosing(ClosingEvent event) {
            event.setMessage("Ran out of history.  Now leaving application, is that OK?");
        }
    });
}
项目:phenotype-portal    文件:Htp.java   
/**
 * Display a confirmation dialog to leave our site when the user refreshes
 * or goes to another URL.
 */
protected void initWindowClosingConfirmationDialog() {
    Window.addWindowClosingHandler(new ClosingHandler() {
        @Override
        public void onWindowClosing(ClosingEvent event) {
            // This message doesn't show, but by adding this close handler,
            // we get the default dialog to display and confirm that the
            // user does want to leave our site.
            event.setMessage("Are you sure you want to leave?");
        }
    });
}
项目:fullmetalgalaxy    文件:AppMain.java   
@Override
public void onWindowClosing(ClosingEvent p_event)
{
  AppMain.getRpcService().disconnect( getMyPresence(), m_dummyCallback );
}
项目:QMAClone    文件:SceneGame.java   
@Override
public void onWindowClosing(ClosingEvent event) {
  event.setMessage("ゲームプレイ中にウィンドウを閉じた場合\nレーティングにペナルティが加わります\nよろしいですか?");
}
项目:gwt-connectors    文件:Keyboard.java   
public void onWindowClosing(ClosingEvent event) {

    }