Package org.sgx.yuigwt.yui.console

Examples of org.sgx.yuigwt.yui.console.Console.log()


     
      colorPiker1 = Y.newColorPicker(ColorPickerConfig.create().after(ColorPicker.EVENT_COLORCHANGE, new EventCallback<EventFacade>() {

        @Override
        public void call(EventFacade e) {
          console.log(colorPiker1.get("hex"));
        }
      }));
      colorPiker1.render("#demo");
//      button1.render(parent);
    }
View Full Code Here


         */
        Widget selChild = e.newValObj().cast();
       
        int newTabIndex = selChild.getInt("index");
       
        console.log("tabview selectionChange: "+newTabIndex);
       
        history.addValue("tab", newTabIndex==0 ? null : newTabIndex+"");
      }
    });    
   
View Full Code Here

        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);
View Full Code Here

    ).render(parent)
    //register a click listener that will unregister itself after the first event
    handle1 = button1.on("click", new EventCallback<ButtonEvent>() {     
      @Override
      public void call(ButtonEvent e) {
        console.log("button pressed at x  ="+e.domEvent().getClientX()+".\n And this will be THE LAST TIME !!!");
        handle1.detach(); //unregister this event listener!
      }
    });
    console.log("button's region is : " + button1.boundingBox().region().print());
    button1.boundingBox().setStyles(Style.create().border("3px solid green"));
View Full Code Here

      public void call(ButtonEvent e) {
        console.log("button pressed at x  ="+e.domEvent().getClientX()+".\n And this will be THE LAST TIME !!!");
        handle1.detach(); //unregister this event listener!
      }
    });
    console.log("button's region is : " + button1.boundingBox().region().print());
    button1.boundingBox().setStyles(Style.create().border("3px solid green"));
   
    //another way of register an event listener, this time passing it to the config object
    Button b2 = Y.newButton(ButtonConfig.create().label("another button").render(parent).
      on("click", new EventCallback<ButtonEvent>() {       
View Full Code Here

    //another way of register an event listener, this time passing it to the config object
    Button b2 = Y.newButton(ButtonConfig.create().label("another button").render(parent).
      on("click", new EventCallback<ButtonEvent>() {       
        @Override
        public void call(ButtonEvent e) {
          console.log("button pressed at x  ="+e.domEvent().getClientX());
        }
      })
    );    

    //and the last example, an html node plugged with a button plugin   
View Full Code Here

    JavaScriptObject data1 = data1();
    DataSource ds1 = Y.newDataSourceLocal(DataSourceConfig.create().source(data1));
    ds1.sendRequest(DataSourceRequest.create().callback(new DataSourceCallbackAdapter() {
      @Override
      public void success(DataSourceEvent e) {
        console1.log("success1: "+JsUtil.dumpObj(e.response().meta())+
          " - "+JsUtil.dumpObj(e.response().results(), true));
      }
      @Override
      public void failure(DataSourceEvent e) {
        Window.alert("failure1: "+JsUtil.dumpObj(e));
View Full Code Here

//        console1.log("success2: "+JsUtil.dumpObj(e.response().meta())+
//          " - "+JsUtil.dumpObj(results.get(0).objGetObj("error"), true));
       
//        console1.log("success2: "+Y.dump(results.get(0), 10));
       
        console1.log("success2: "+Y.JSON().stringify(e.response().results()));
      }
      @Override
      public void failure(DataSourceEvent e) {
        Window.alert("failure2: "+JsUtil.dumpObj(e));
      }
View Full Code Here

  //create an io object for working that will notify us for some io events...
  IOConfig ioConfig = IOConfig.create().
      on(IO.EVENT_SUCCESS, new EventCallback<IOEvent>() {         
    @Override
    public void call(IOEvent e) {
      console1.log("SUCCESS, responseText: "+e.data().responseText());
    }
  }).on(IO.EVENT_FAILURE, new EventCallback<IOEvent>() {
    @Override
    public void call(IOEvent e) {
      console1.log("FAILURE. Status: "+e.data().status()+" - "+e.data().statusText(), "", "");
View Full Code Here

      console1.log("SUCCESS, responseText: "+e.data().responseText());
    }
  }).on(IO.EVENT_FAILURE, new EventCallback<IOEvent>() {
    @Override
    public void call(IOEvent e) {
      console1.log("FAILURE. Status: "+e.data().status()+" - "+e.data().statusText(), "", "");
    }
  }).cast();
  IO io1 = Y.newIO(ioConfig);
 
  //send a request.
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.