Package com.google.gwt.user.client

Examples of com.google.gwt.user.client.Timer


    model.setSelected("test1", true);
    handler.assertEventFired(false);
    model.isSelected("test1");

    new Timer() {
      @Override
      public void run() {
        handler.assertEventFired(true);
        finishTest();
      }
View Full Code Here


    model.scheduleSelectionChangeEvent();
    model.setSelected("test6", true);
    model.scheduleSelectionChangeEvent();
    handler.assertEventFired(false);

    new Timer() {
      @Override
      public void run() {
        handler.assertEventFired(true);
        finishTest();
      }
View Full Code Here

    map.setSize("500px", "300px");
    initWidget(map);
    map.addControl(new SmallMapControl());
    map.addControl(new MapTypeControl());

    Timer timer = new Timer() {

      @Override
      public void run() {
        // Exercise the minimum & maximum resolution entry points.
        MapType types[] = map.getMapTypes();
        for (MapType t : types) {
          int minResolution = t.getMinimumResolution();
          int maxResolution = t.getMaximumResolution();
          GWT.log("Map Type: " + t.getName(true) + " Min resolution: "
              + minResolution + " Max Resolution: " + maxResolution, null);

          minResolution = t.getMinimumResolution();
          maxResolution = t.getMaximumResolution();
          GWT.log("@ point: " + map.getCenter().toString() + " Map Type: "
              + t.getName(true) + " Min resolution: " + minResolution
              + " Max Resolution: " + maxResolution, null);
        }
      }
    };
    timer.schedule(1000);
  }
View Full Code Here

    map.addMapType(MapType.getMarsVisibleMap());
    map.addMapType(MapType.getMarsElevationMap());
    map.addMapType(MapType.getMarsInfraredMap());
    vertPanel.add(map);

    new Timer() {
      @Override
      public void run() {
        displayCustomControl();
      }
    }.schedule(250);
View Full Code Here

   * return.)
   */
  public void startMainLoop() {
    init();

    Timer t = new Timer() {
      @Override
      public void run() {
        if (!ready) {
          return;
        }
        update();
      }
    };
    t.scheduleRepeating(10);
  }
View Full Code Here

      // initialize the localstore and have it update the manifest
      localServer = Factory.getInstance().createLocalServer();
      store = localServer.createManagedStore("GWTGearsNote");
      store.setManifestUrl(GWT.getModuleBaseURL() + "manifest");
      store.checkForUpdate();
      Timer t = new Timer() {
        @Override
        public void run() {
          int status = store.getUpdateStatus();
          if (status == ManagedResourceStore.UPDATE_OK) {
            this.cancel();
          } else if (status == ManagedResourceStore.UPDATE_FAILED) {
            this.cancel();
          }
        }
      };
      t.scheduleRepeating(100);
    } catch (Throwable t) { // not just GearsException b/c we can also have NPEs
      localServer = null;
      store = null;
      db = null;
    }
View Full Code Here

    // create the plot
    final PlotWithOverview plot = new PlotWithOverview(model, plotOptions);

    // pull the "fake" RPC service for new data
    final Timer updater = new Timer() {
      @Override
      public void run() {
        update(series, plot);
      }
    };

    // put it on a panel
    FlowPanel panel = new FlowPanel();
    panel.add(plot);
    HorizontalPanel buttonsPanel = new HorizontalPanel();
    buttonsPanel.setSpacing(5);
    buttonsPanel.add(new Button("Start", new ClickListener() {
      public void onClick(Widget sender) {
        updater.scheduleRepeating(1000);
      }
    }));
    buttonsPanel.add(new Button("Stop", new ClickListener() {
      public void onClick(Widget sender) {
        updater.cancel();
      }
    }));
    panel.add(buttonsPanel);
    return panel;
  }
View Full Code Here

    // create the plot
    final PlotWithOverview plot = new PlotWithOverview(model, plotOptions, overviewPlotOptions);

    // pull the "fake" RPC service for new data
    final Timer updater = new Timer() {
      @Override
      public void run() {
        update(series, plot);
      }
    };

    // put it on a panel
    FlowPanel panel = new FlowPanel();
    panel.add(plot);
    HorizontalPanel buttonsPanel = new HorizontalPanel();
    buttonsPanel.setSpacing(5);
    buttonsPanel.add(new Button("Start", new ClickListener() {
      public void onClick(Widget sender) {
        updater.scheduleRepeating(1000);
      }
    }));
    buttonsPanel.add(new Button("Stop", new ClickListener() {
      public void onClick(Widget sender) {
        updater.cancel();
      }
    }));
    panel.add(buttonsPanel);
    return panel;
  }
View Full Code Here

    // The purpose of this timer is to let the bus yield and give other modules a chance to register
    // services before we send our state synchronization message. This is not strictly necessary
    // but significantly decreases network chattiness since more (if not all known services)
    // can then be listed in the initial handshake message.
    initialConnectTimer = new Timer() {
      @Override
      public void run() {
        sendInitialMessage();
      }
    };
View Full Code Here

    else {
      final String failOnConnectAfterMs = properties.get(ChaosMonkey.FAIL_ON_CONNECT_AFTER_MS);
      if (failOnConnectAfterMs != null) {
        final int ms = Integer.parseInt(failOnConnectAfterMs);

        new Timer() {
          @Override
          public void run() {
            setState(BusState.CONNECTION_INTERRUPTED);
          }
        }.schedule(ms);
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.Timer

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.