Package org.sgx.yuigwt.yui.widget

Examples of org.sgx.yuigwt.yui.widget.WidgetConfig


    yuiWidget = yuiWidget.toLowerCase();
    // System.out.println(yuiWidget);

    // if (n.hasClass(CLASS_TABVIEW)) {
    if (yuiWidget != null && yuiWidget.equals("tabview")) {
      WidgetConfig config = TabViewConfig.create().srcNode(n);
      config = y.merge(config, nodeConfig).cast();
      w = y.newTabView(config).render();
    }

    // else if (n.hasClass(CLASS_BUTTON)) {
    else if (yuiWidget != null && yuiWidget.equals("button")) {
      Element e = n.getDOMNode();
      NodeList prevChildren = n.children();
     
      String prevId = n.get("id");
      String prevClass = e.getClassName();
     
      WidgetConfig config = ButtonConfig.create().srcNode(n);
      config = y.merge(config, nodeConfig).cast();
      w = y.newButton(config).render();
      e = w.contentBox().getDOMNode();
     
      //fix - re set previous id and class attributes - http://jsfiddle.net/cancerbero_sgx/MPc4g/3/
      e.setClassName(e.getClassName()+" "+prevClass);
      y.one(e).prepend(prevChildren);
      n.set("id", prevId);
    }
   
    else if (yuiWidget != null && yuiWidget.equals("togglebutton")) {
      Element e = n.getDOMNode();
      NodeList prevChildren = n.children();
     
      String prevId = n.get("id");
      String prevClass = e.getClassName();
     
      WidgetConfig config = ButtonConfig.create().srcNode(n);
      config = y.merge(config, nodeConfig).cast();
      w = y.newToggleButton(config).render();
     
      e = w.contentBox().getDOMNode();
     
View Full Code Here

TOP

Related Classes of org.sgx.yuigwt.yui.widget.WidgetConfig

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.