Package com.extjs.gxt.ui.client.core

Examples of com.extjs.gxt.ui.client.core.Template


    StringBuffer sb = new StringBuffer();
    sb.append("<div class='{cls}-wrap'><div class='{cls}-inner'><div class='{cls}-bar'>");
    sb.append("<div class='{cls}-text'><div>&#160;</div></div></div>");
    sb.append("<div class='{cls}-text {cls}-text-back'><div>&#160;</div></div></div></div>");

    Template t = new Template(sb.toString());
    setElement(t.create(new Params("cls", baseStyle)), target, index);

    El inner = el().firstChild();
    progressBar = inner.firstChild();
    textTopElem = progressBar.firstChild();
    textBackElem = inner.childNode(1);
View Full Code Here


        sb.append("<tr><td class=\"{4}-tl\"><i>&#160;</i></td><td class=\"{4}-tc\"></td><td class=\"{4}-tr\"><i>&#160;</i></td></tr>");
        sb.append("<tr><td class=\"{4}-ml\"><i>&#160;</i></td><td class=\"{4}-mc\"><em class=\"{3}\" unselectable=\"on\"><button class=\"{4}-text\" type=\"{1}\" style='position: static'>{0}</button></em></td><td class=\"{4}-mr\"><i>&#160;</i></td></tr>");
        sb.append("<tr><td class=\"{4}-bl\"><i>&#160;</i></td><td class=\"{4}-bc\"></td><td class=\"{4}-br\"><i>&#160;</i></td></tr>");
        sb.append("</tbody></table>");

        buttonTemplate = new Template(sb.toString());
      }
      template = buttonTemplate;
    }

    setElement(
View Full Code Here

      sb.append("<div role='presentation' class='x-form-item {5}' tabIndex='-1'>");
      sb.append("<label for={8} style='{2};{7}' class=x-form-item-label>{1}{4}</label>");
      sb.append("<div role='presentation' class='x-form-element x-form-el-{0}' id='x-form-el-{0}' style='{3}'>");
      sb.append("</div><div class='{6}' role='presentation'></div>");
      sb.append("</div>");
      fieldTemplate = new Template(sb.toString());
      fieldTemplate.compile();
    }
    super.onLayout(container, target);
  }
View Full Code Here

      StringBuffer sb = new StringBuffer();
      sb.append("<div class='x-grid3-summary-row' style='{tstyle}'>");
      sb.append("<table class='x-grid3-summary-table' border='0' cellspacing='0' cellpadding='0' style='{tstyle}'>");
      sb.append("<tbody><tr>{cells}</tr></tbody>");
      sb.append("</table></div>");
      rowTpl = new Template(sb.toString());
      rowTpl.compile();
    }

    if (cellTpl == null) {
      StringBuffer sb = new StringBuffer();
      sb.append("<td class='x-grid3-col x-grid3-cell x-grid3-td-{id} {css}' style='{style}'>");
      sb.append("<div class='x-grid3-cell-inner x-grid3-col-{id}' unselectable='on'>{value}</div>");
      sb.append("</td>");
      cellTpl = new Template(sb.toString());
      cellTpl.compile();
    }
  }
View Full Code Here

      StringBuffer sb = new StringBuffer();
      sb.append("<li class='{style}' id={id} role='tab' tabindex='0'><a class=x-tab-strip-close role='presentation'></a>");
      sb.append("<a class='x-tab-right' role='presentation'><em role='presentation' class='x-tab-left'>");
      sb.append("<span class='x-tab-strip-inner' role='presentation'><span class='x-tab-strip-text {textStyle} {iconStyle}'>{text}</span></span>");
      sb.append("</em></a></li>");
      itemTemplate = new Template(sb.toString());
      itemTemplate.compile();
    }

    renderAll();
View Full Code Here

   * Sets the view's template.
   *
   * @param html the HTML fragment
   */
  public void setTemplate(String html) {
    setTemplate(new Template(html));
  }
View Full Code Here

    sinkEvents(Event.ONCLICK | Event.ONDBLCLICK | Event.MOUSEEVENTS | Event.KEYEVENTS);
  }

  protected void renderAll() {
    if (template == null) {
      template = new Template(defaultTemplate);
    }

    StringBuffer sb = new StringBuffer();
    for (DataViewItem item : getItems()) {
      sb.append(bulkRenderItem(item));
View Full Code Here

    StringBuffer sb = new StringBuffer();
    sb.append("<div class='{cls}-wrap'><div class='{cls}-inner'><div class='{cls}-bar'>");
    sb.append("<div class='{cls}-text'><div>&#160;</div></div></div>");
    sb.append("<div class='{cls}-text {cls}-text-back'><div>&#160;</div></div></div></div>");

    Template t = new Template(sb.toString());
    setElement(t.create(new Params("cls", baseStyle)), target, index);

    El inner = el().firstChild();
    progressBar = inner.firstChild();
    textTopElem = progressBar.firstChild();
    textBackElem = inner.childNode(1);
View Full Code Here

      sb.append("<div role='presentation' class='x-form-item {5}' tabIndex='-1'>");
      sb.append("<label for={8} style='{2};{7}' class=x-form-item-label>{1}{4}</label>");
      sb.append("<div role='presentation' class='x-form-element x-form-el-{0}' id='x-form-el-{0}' style='{3}'>");
      sb.append("</div><div class='{6}' role='presentation'></div>");
      sb.append("</div>");
      fieldTemplate = new Template(sb.toString());
      fieldTemplate.compile();
    }
    super.onLayout(container, target);
  }
View Full Code Here

      StringBuffer sb = new StringBuffer();
      sb.append("<div class='x-grid3-summary-row' style='{tstyle}'>");
      sb.append("<table class='x-grid3-summary-table' border='0' cellspacing='0' cellpadding='0' style='{tstyle}'>");
      sb.append("<tbody><tr>{cells}</tr></tbody>");
      sb.append("</table></div>");
      rowTpl = new Template(sb.toString());
      rowTpl.compile();
    }

    if (cellTpl == null) {
      StringBuffer sb = new StringBuffer();
      sb.append("<td class='x-grid3-col x-grid3-cell x-grid3-td-{id} {css}' style='{style}'>");
      sb.append("<div class='x-grid3-cell-inner x-grid3-col-{id}' unselectable='on'>{value}</div>");
      sb.append("</td>");
      cellTpl = new Template(sb.toString());
      cellTpl.compile();
    }
  }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.core.Template

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.