Package com.google.gwt.user.client.Window

Examples of com.google.gwt.user.client.Window.ClosingHandler


        getLoadingIndicator().show();

        heartbeat.init(this);

        Window.addWindowClosingHandler(new ClosingHandler() {
            @Override
            public void onWindowClosing(ClosingEvent event) {
                /*
                 * Set some flags to avoid potential problems with XHR requests,
                 * see javadocs of the flags for details
View Full Code Here


  /** If true, then pushing cancel is expected, so it won't show a message for it. */
  public static boolean        isPushingCancelledExpected  = false;

  public void onModuleLoad() {
    // If the user closes the window, it sends a leaving message
    Window.addWindowClosingHandler(new ClosingHandler() {
      @Override
      public void onWindowClosing(ClosingEvent event) {
        isPushingCancelledExpected = true;
        FreenetRequest.sendRequest(UpdaterConstants.leavingPath, new QueryParameter("requestId", requestId));
        cm.closeConnection();
View Full Code Here

      docDisplay_.addValueChangeHandler(this);
      docDisplay_.addFoldChangeHandler(this);

      // Web only
      closeHandlerReg_ = Window.addWindowClosingHandler(new ClosingHandler()
      {
         public void onWindowClosing(ClosingEvent event)
         {
            if (changesPending_)
               event.setMessage("Some of your source edits are still being " +
View Full Code Here

  protected void fireWindowClosingEvent(ClosingEvent event)
  {
    fireUnloadEvent();
    for (int i = 0; i < windowClosingHandlers.size(); i++)
    {
      ClosingHandler handler = windowClosingHandlers.get(i);
      handler.onWindowClosing(event);
    }
  }
View Full Code Here

  protected static void ensureViewContainerClosingHandler(ViewContainer viewContainer)
    {
      if (!hasWindowClosingHandler && viewContainer.hasWindowClosingHandlers())
      {
        hasWindowClosingHandler = true;
        closingHandler = Window.addWindowClosingHandler(new ClosingHandler()
      {
        @Override
        public void onWindowClosing(ClosingEvent event)
        {
          for (int i=0; i< boundContainers.size(); i++)
View Full Code Here

      // NOTE: Desktop doesn't seem to get onWindowClosing events in Qt 4.8
      // so we instead rely on an explicit callback from the desktop frame
      // to notifyRStudioSatelliteClosing
      if (!Desktop.isDesktop())
      {
         Window.addWindowClosingHandler(new ClosingHandler() {
            @Override
            public void onWindowClosing(ClosingEvent event)
            {
               fireCloseEvent();
            }
View Full Code Here

       

        Element form = this.createForm(id, payload);
        DOM.appendChild(RootPanel.getBodyElement(), form);
        this.submit(form);
        this.registration = Window.addWindowClosingHandler(new ClosingHandler(){

            public void onWindowClosing(ClosingEvent event) {
                control.terminate();
                event.setMessage("Terminate open stream?");
               
View Full Code Here

    super();
    if ( setupNativeHooks ) {
      setupNativeHooks( this );
    }
    // add window close listener
    Window.addWindowClosingHandler( new ClosingHandler() {

      public void onWindowClosing( ClosingEvent event ) {
        // close only if we have stuff open
        if ( getTabCount() > 0 ) {
          for ( int i = 0; i < getTabCount(); i++ ) {
View Full Code Here

         }
      });
     
      // if there is an askpass pending when the window closes then send an
      // askpass cancel
      Window.addWindowClosingHandler(new ClosingHandler() {

         @Override
         public void onWindowClosing(ClosingEvent event)
         {
            if (askpassPending_)
View Full Code Here

      // (e.g. for multi-user cases) then we would need to make sure there
      // is another way to restart the listener (perhaps a global timer
      // that checks for isListening every few seconds, or perhaps some
      // abstraction over addWindowClosingHandler that allows "undo" of
      // things which were closed or shutdown during closing
      Window.addWindowClosingHandler(new ClosingHandler() {
         public void onWindowClosing(ClosingEvent event)
         {
            stop();
         }
      });
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.Window.ClosingHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.