Examples of SimpleCallback


Examples of com.magnetica.shared.SimpleCallback

    //    final List<EntityType> entities = cacheLoadEntities(extractEntitiesToIterateOver(request, resultSoFar));
    final List<EntityType> entities = new LinkedList<EntityType>();
    extractEntitiesToIterateOver(request, result, entities);
    final int[] runningModulesCount = new int[] { 0 };
    LinkedList<Retriever> retrievers = new LinkedList<ParallelUrlRetriever.Retriever>();
    SimpleCallback waitForAllModulesToFinish = new SimpleCallback() {

      int finishedModules = 0;

      @Override public void done(boolean success) {
        if (request.isCancelled()) {
View Full Code Here

Examples of com.magnetica.shared.SimpleCallback

      return true;
    }
    if (!testRunning && (isWorking && (lastCheck + CHECK_WORKING_INTERVAL < currentTimeMillis))
      || (!isWorking && (lastCheck + CHECK_BROKEN_INTERVAL < currentTimeMillis))) {
      testRunning = true;
      testModule(new SimpleCallback() {

        @Override public void done(boolean success) {
          isWorking = success;
          lastCheck = System.currentTimeMillis();
          testRunning = false;
View Full Code Here

Examples of com.robustaweb.library.rest.client.SimpleCallback

            }
           
        };

        //@todo2 : use Logger rather than sout
        Callback cb = new SimpleCallback(client) {

            @Override
            public void onSuccess(String response) {
                System.out.println("success");
            }
View Full Code Here

Examples of org.brixcms.plugin.site.SimpleCallback

                        // panel
                        if (lastEditor == null ||
                                currentEditor.getMetaData(EDITOR_NODE_TYPE) == null) {
                            lastEditor = currentEditor;
                        }
                        SimpleCallback goBack = new SimpleCallback() {
                            public void execute() {
                                setupEditor(lastEditor);
                            }
                        };
                        Panel panel = plugin.newCreateNodePanel(EDITOR_ID, getNewNodeParent(),
View Full Code Here

Examples of org.gwtoolbox.widget.client.notification.SimpleCallback

        addGap(labels, "10px");

        label = createLabel("Click Me", null);
        label.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                DefaultNotifier.getInstance().showInfo("Click", "You see, you can even register click listeners on a BasicLabel", new SimpleCallback() {
                    public void handle() {
                    }
                });
            }
        });
View Full Code Here

Examples of org.sgx.yuigwt.yui.util.SimpleCallback

  button1.on("click", new EventCallback<EventFacade>() {
    @Override
    public void call(EventFacade e) {
      final ButtonItem clickedButton = e.getTarget().cast();
      clickedButton.hide();
      JsUtil.setTimeout(new SimpleCallback() {
       
        @Override
        public void call() {
          clickedButton.show();
        }
View Full Code Here

Examples of org.sgx.yuigwt.yui.util.SimpleCallback

        ta.setStyle("width", "100%");

        final Console console = Y.newConsole(ConsoleConfig.create());
        console.render();

        AsyncQueueItem aqItem = AsyncQueueItem.create().id("aq1").iterations(5).timeout(150).fn(new SimpleCallback() {
          @Override
          public void call() {
            ta.set("text", ta.get("text") + " - 1");
          }
        });

        AsyncQueueItem aqItem2 = AsyncQueueItem.create().id("aq2").iterations(6).timeout(100).fn(new SimpleCallback() {
          @Override
          public void call() {
            ta.set("text", ta.get("text") + " - 2");
          }
        });
        AsyncQueueItem aqItem3 = AsyncQueueItem.create().id("aq3").iterations(6).timeout(100).fn(new SimpleCallback() {
          @Override
          public void call() {
            ta.set("text", ta.get("text") + " - 3");
          }
        });

        // All AsyncQueue instances will execute all callbacks
        // synchronously by default
        Y.AsyncQueue().defaults().timeout(-1);

        final AsyncQueue aq = Y.newAsyncQueue().add(aqItem).add(aqItem2).add(aqItem3);
        ta.set("text", "indexOf A = " + aq.indexOf("aq1"));

        EventCallback<AsyncQueueEvent> callback1 = new EventCallback<AsyncQueueEvent>() {
          @Override
          public void call(AsyncQueueEvent e) {
            console.log("Event type: " + e.type(), "", "");
          }
        };

        aq.on(new String[] { AsyncQueue.EVENT_COMPLETE, AsyncQueue.EVENT_SHIFT, AsyncQueue.EVENT_PROMOTE }, callback1);

        // a button to start and later promote item 3
        Y.newButton(ButtonConfig.create().label("start").on("click", new EventCallback<EventFacade>() {
          @Override
          public void call(EventFacade e) {
            aq.run();

            JsUtil.setTimeout(new SimpleCallback() {
              @Override
              public void call() {
                aq.promote("aq3");
              }
            }, 200);
View Full Code Here

Examples of org.sgx.yuigwt.yui.util.SimpleCallback

      "]")).
      caption("Example table with sortable columns from json string").
      summary("Price sheet for inventory parts").sortable(true));
    dt3.render("#ssimple3");
   
    JsUtil.setTimeout(new SimpleCallback() {     
      @Override
      public void call() {
        dt3.data((JsArray<JavaScriptObject>) JsonUtils.unsafeEval("["+
          "{ username: \"root123\", read: true, write: true },\n"+
          "{ username: \"2222spilgrim\", read: true, write: false },\n"+
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.