Package com.google.gwt.core.client.Scheduler

Examples of com.google.gwt.core.client.Scheduler.RepeatingCommand


         // navigate away from the page at any point afterwards would result
         // in the error "Document cannot change while printing or in Print
         // Preview". The only thing you could do is close the browser tab.
         // By inserting a 5-minute delay hopefully Firefox would be done with
         // whatever print related operations are important.
         Scheduler.get().scheduleFixedDelay(new RepeatingCommand()
         {
            public boolean execute()
            {
               PrintIFrame.this.removeFromParent();
               return false;
View Full Code Here


      int delayMs = initToEmptyString_ ? 100 : 500;

      // On Windows desktop sometimes we inexplicably end up at the wrong size
      // if the editor is being resized while it's loading (such as when a new
      // document is created while the source pane is hidden)
      Scheduler.get().scheduleFixedDelay(new RepeatingCommand()
      {
         public boolean execute()
         {
            if (isAttached())
               onResize();
View Full Code Here

      // call (necessary so two consecutive calls like we get during
      // some startup scenarios don't result in the first url displaying
      // rather than the second)
      targetUrl_ = url;
     
      RepeatingCommand navigateCommand = new RepeatingCommand() {
         @Override
         public boolean execute()
         {
            if (getIFrameEx() != null &&
                  getIFrameEx().getContentWindow() != null)
            {
               if (targetUrl_.equals(getUrl()))
               {
                  getIFrameEx().getContentWindow().reload();
               }
               else
               {
                  getIFrameEx().getContentWindow().replaceLocationHref(targetUrl_);
                  frame_.setUrl(targetUrl_);
               }
               return false;
            }
            else
            {
               return true;
            }
         }
      };

      if (navigateCommand.execute())
         Scheduler.get().scheduleFixedDelay(navigateCommand, 100);     
   }
View Full Code Here

            return;
        }

        createWaitingWindow(MSG.view_remoteAgentInstall_waitForUpload(), true);

        Scheduler.get().scheduleEntry(new RepeatingCommand() {
            @Override
            public boolean execute() {
                // Make sure the file upload(s) (if there are any) have completed before we do anything
                boolean waitForUploadToFinish = false;
                if (agentConfigXmlUploadForm != null && agentConfigXmlUploadForm.isUploadInProgress()) {
View Full Code Here

    @Override
    public void onError(String cause) {
        GWT.log("ERROR STOMP: " + cause, new Throwable(cause));
        //Window.alert("ERROR STOMP: " + cause);
        if (sc != null) {
            Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {
                @Override
                public boolean execute() {
                    GWT.log("STOMP retry...");
                    //Window.alert("STOMP retry...");
                    sc.connect();
View Full Code Here

  @Override
  public void onError(String cause) {
    GWT.log("ERROR STOMP: " + cause, new Throwable(cause));
    //Window.alert("ERROR STOMP: " + cause);
    if (sc != null) {
      Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {

        @Override
        public boolean execute() {
          GWT.log("STOMP retry...");
          //Window.alert("STOMP retry...");
View Full Code Here

            /*
             * If the failure is due to an authorization issue, there is no
             * reason to retry the request.
             */
            final ApiCallback<RESP> apiCallback = this;
            final RepeatingCommand cmd = new RepeatingCommand() {
              @Override
              public boolean execute() {
                send(msg, apiCallback);
                return false;
              }
View Full Code Here

   *
   * @param milliseconds time to expiry.
   */
  public final void expire(int milliseconds) {
    expiryTime = System.currentTimeMillis() + milliseconds;
    Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {
      @Override
      public boolean execute() {
        cancel();
        return false;
      }
View Full Code Here

   * this is a no-op.
   *
   * @param milliseconds time to delay firing this message.
   */
  public final void fireDelayed(int milliseconds) {
    Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {
      @Override
      public boolean execute() {
        fire();
        return false;
      }
View Full Code Here

      statusText.setTextContent(message.getText());

      // Render a countdown if the message is going to expire.
      if (message.getTimeToExpiry() > 0) {
        final StatusMessage msg = message;
        Scheduler.get().scheduleFixedPeriod(new RepeatingCommand() {
          @Override
          public boolean execute() {
            if (msg == StatusPresenter.View.this.statusMessage) {
              int seconds = msg.getTimeToExpiry() / 1000;
              statusText.setTextContent(msg.getText() + " ..." + seconds);
View Full Code Here

TOP

Related Classes of com.google.gwt.core.client.Scheduler.RepeatingCommand

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.