Package org.sgx.yuigwt.yui.node

Examples of org.sgx.yuigwt.yui.node.Node


    prettyPrint();
//    y.one(".main-header").setStyles(Style.create().position("fixed"));
   
    String [] sectionNames = {"sec-intro", "sec-gettingstarted"};
    for (int i = 0; i < sectionNames.length; i++) {
      final Node target = y.one("#"+sectionNames[i]);
      Node nav = y.one("#nav-"+sectionNames[i]);
      if(target!=null && nav!=null) {
        nav.on("click", new EventCallback<EventFacade>() {
          @Override
          public void call(EventFacade e) {
            target.scrollIntoView();
          }
        });
View Full Code Here


   
  @Override
  public void ready(final YuiContext Y) {
    String base = GWT.getModuleBaseURL()+"testfiles/";
   
    Node n1 = Y.one(parent.getDOMNode()).appendChild("<div></div>");
    Window.alert(n1+"");
    n1.load(base+"page1.html", "#p1", new NodeLoadCallback() {
     
      @Override
      public void call(NodeLoadCallbackArg arguments) {
        Window.alert("from java: "+JsUtil.dumpObj(arguments));
      }
View Full Code Here

    /* Note we say Y.one(parent.getDOMNode()) and not only parent because we need the parent
    node to load the new YUI sandbox with AC: */
   
    String[] source1 = new String[]{"ab", "abc", "abcd", "abc dfgh", "abcdfg"};    
   
    Node inputEl2 = Y.one(parent.getDOMNode()).
      appendChild("<input type=\"text\" id=\"ac-input\" value=\"someval\"></input>");
   
    inputEl2.plug(Y.Plugin().AutoComplete(), AutoCompleteConfig.create().
      resultHighlighter("phraseMatch").resultFilters("phraseMatch").
      source(source1)
    );
   
    Node inputEl = Y.one(parent.getDOMNode()).
        appendChild("<input type=\"text\" id=\"ac-input\" value=\"a\"></input>");

    inputEl.plug(Y.Plugin().AutoComplete(), AutoCompleteConfig.create().
      resultHighlighter("phraseMatch").resultFilters("phraseMatch").
      source(new String[]{"ab", "abc", "abcd", "abc dfgh", "abcdfg"}).render(true));
   
    AutoComplete ac = Y.newAutoComplete(AutoCompleteConfig.create().
      resultHighlighter("phraseMatch").resultFilters("phraseMatch").
View Full Code Here

    final Console console1 = Y.newConsole(ConsoleConfig.create());
    console1.render();
   
    //install some html list markup to scroll with paginator
    Node sv1Node = parent.appendChild("<ul id=\"scrollview1\"></ul>");    
   
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < 100; i++) {
      sb.append("<li>This is a long line "+i+" </li>");
    }
    sv1Node.set("innerHTML", sb.toString());
   
    parent.all("li").setStyles(Style.create().width("100px").display("inline"))
   
    sv1 = Y.newScrollView(ScrollViewConfig.create().
      flick(Flick.create().minDistance(8).minVelocity(0.3).axis("x")).
View Full Code Here

  YUI.YUI().use(new String[]{"slider"}, new YUICallback() {
 
    @Override
    public void ready(YuiContext Y) {
      parent.append("<p>First a horizontal default slider...");
      Node n1 = parent.appendChild("<span></span>").cast();
      Widget slider1 = Y.newSlider().render(n1);
//      slider1.on(TYPE, c)
     
      parent.append("<p>Now a vertical, custom slider...");
      Node n2 = parent.appendChild("<span>unknownsoldierflag123</span>").cast();
      final Slider sl2 = Y.newSlider(SliderConfig.create().axis("y").min(1).max(5).value(3).length(200)).render(n2).cast();
      sl2.on(Slider.EVENT_SLIDEEND, new EventCallback<SliderEvent>() {

        @Override
        public void call(SliderEvent e) {
View Full Code Here

      .height("100px")
    );
//    uploader1.render(parent);
    final Console console = Y.newConsole().render().cast();
   
    final Node selectFilesButtonContainer = parent.appendChild("<div></div>");
   
   
    //if html5 add support from drag&drop files from desktop. see http://yuilibrary.com/yui/docs/uploader/uploader-dd.html
    if(Y.Uploader().TYPE().equals("html5")) {
     
      final Node uploaderMessage = parent.appendChild("<div>Drag and drop files</div>");
      final Node ddarea = parent.appendChild("<div>on this BOX</div>");
      uploader1.set("dragAndDropArea", ddarea);
      console.log("html5 uploader");
     
      uploader1.on(new String[]{UploaderHTML5.EVENT_DRAGENTER, UploaderHTML5.EVENT_DRAGOVER}, new EventCallback<UploaderEvent>() {
        @Override
View Full Code Here

TOP

Related Classes of org.sgx.yuigwt.yui.node.Node

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.