Package com.google.gwt.safehtml.shared

Examples of com.google.gwt.safehtml.shared.SafeHtml


      } else {
        dataTableBody.setInnerHTML("");
      }
    }

    SafeHtml html = renderRows(firstRow, lastRow);
    XElement before = getRow(firstRow).cast();

    if (before != null) {
      DomHelper.insertBefore(before, html.asString());
    } else {
      DomHelper.insertHtml("beforeEnd", dataTableBody, html.asString());
    }
    if (!isUpdate) {
      processRows(firstRow, false);
    }
  }
View Full Code Here


      int[] vr = getVisibleRows(visible, count);

      for (int i = vr[0]; i <= vr[1]; i++) {
        if (!isRowRendered(i, visible)) {
          M parent = store.getParent(visible.get(i));
          SafeHtml html = renderChild(parent, visible.get(i), store.getDepth(parent), TreeViewRenderMode.BUFFER_BODY);
          view.getElement(findNode(visible.get(i))).getFirstChildElement().setInnerHTML(html.asString());
        }
      }
      clean();
    }
View Full Code Here

    if (text != null) {
      int v = (int) Math.round(value * 100);
      text = Format.substitute(text, v);
    }

    SafeHtml txt;
    if (text == null) {
      txt = SafeHtmlUtils.fromSafeConstant("&#160;");
    } else {
      txt = SafeHtmlUtils.fromString(text);
    }
View Full Code Here

    for (int i = 0; i < rows; i++) {
      result.appendHtmlConstant("<tr>");
      for (int j = 0; j < columnCount && mark < colors.length; j++) {
        String c = colors[mark];
        String label = labels[mark];
        SafeHtml cellTemplate = template.cellTemplate(style, label, XDOM.getUniqueId(), i, j, c,
            SafeStylesUtils.fromTrustedString("background-color: #" + SafeHtmlUtils.htmlEscape(c) + ";"),
            c.equals(value) ? style.selected() : "");
        result.append(cellTemplate);
        mark++;
      }
View Full Code Here

    String styles = "width:" + getTotalWidth() + "px;";
    SafeStyles tableStyles = SafeStylesUtils.fromTrustedString(styles);

    for (int i = 0, len = groups.size(); i < len; i++) {
      GroupingData<M> g = groups.get(i);
      SafeHtml renderedRows = tpls.table(getAppearance().styles().dataTable(), tableStyles,
          super.doRender(cs, g.getItems(), g.getStartRow()), renderHiddenHeaders(getColumnWidths()));
      renderGroup(buf, g, renderedRows);
    }

    return buf.toSafeHtml();
View Full Code Here

    if (g.isCollapsed()) {
      groupClass += " " + groupAppearance.style().groupCollapsed();
      bodyClass = groupAppearance.style().bodyCollapsed();
    }
    String headClass = groupAppearance.style().groupHead();
    final SafeHtml groupHtml;
    String cellClasses = headClass + " " + styles.cell() + " " + states.cell();
    if (selectable) {
      groupHtml = (tpls.tr(groupClass,
          tpls.tdWrap(cm.getColumnCount(), cellClasses, styles.cellInner() + " " + states.cellInner(), renderGroupHeader(g))));
    } else {
View Full Code Here

    String textHtml = "";

    if (toolTipConfig.getRenderer() != null) {
      Object data = toolTipConfig.getData();
      ToolTipRenderer r = toolTipConfig.getRenderer();
      SafeHtml html = r.renderToolTip(data);
      textHtml = html.asString();
    } else {
      textHtml = Util.isEmptyString(bodyHtml) ? "&#160;" : bodyHtml;
    }

    getAppearance().updateContent(getElement(), titleHtml, textHtml);
View Full Code Here

        sb.appendHtmlConstant("<div>");

        // current user
        String userHtml = "<i style='color:#cecece' class='icon-user'></i>&nbsp;"+bootstrap.getPrincipal();

        SafeHtml principal = new SafeHtmlBuilder().appendHtmlConstant("<div class='header-textlink'>"+userHtml+"</div>").toSafeHtml();
        final HTML userButton = new HTML(principal);
        userButton.getElement().setAttribute("style", "cursor:pointer");
        tools.add(userButton);

        final DefaultPopup menuPopup = new DefaultPopup(DefaultPopup.Arrow.TOP);
View Full Code Here

            super(27);
        }

        @Override
        public SafeHtml getValue(final DeploymentRecord record) {
            SafeHtml value = super.getValue(record);
            if (record.getPath() != null) {
                value = new SafeHtmlBuilder().append(value).appendHtmlConstant("&nbsp;<span class=\"footnote\"><sup>[1]</sup></span>").toSafeHtml();
            }
            return value;
        }
View Full Code Here

   }

   @Override
   public void render(String str, SafeHtmlBuilder builder)
   {
      SafeHtml safeHtml = render(str);
      if (safeHtml != null)
         builder.append(safeHtml);
   }
View Full Code Here

TOP

Related Classes of com.google.gwt.safehtml.shared.SafeHtml

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.