Examples of appendTrustedString()

In addition, the empty string is safe for use in a CSS attribute.

The following example values do not comply with this type's contract:

@param styles the input String @return a {@link SafeStyles} instance

Examples of com.google.gwt.safecss.shared.SafeStylesBuilder.appendTrustedString()

    if (cell.getWidth() != -1) {
      int w = cell.getWidth();
      if (w < cell.getMinWidth()) {
        w = cell.getMinWidth();
      }
      stylesBuilder.appendTrustedString("width:" + w + "px;");
      cls += " " + style.hasWidth() + " x-has-width";
      width = w;
    } else {

      if (cell.getMinWidth() != -1) {
View Full Code Here

Examples of com.google.gwt.safecss.shared.SafeStylesBuilder.appendTrustedString()

              // empty
          }
        }

        if (cell.getMinWidth() > length) {
          stylesBuilder.appendTrustedString("width:" + cell.getMinWidth() + "px;");
          cls += " " + style.hasWidth() + " x-has-width";
          width = cell.getMinWidth();
        }
      }
    }
View Full Code Here

Examples of com.google.gwt.safecss.shared.SafeStylesBuilder.appendTrustedString()

      }
    }

    final int height = cell.getHeight();
    if (height != -1) {
      stylesBuilder.appendTrustedString("height:" + height + "px;");
    }

    if (icon != null) {
      switch (iconAlign) {
        case TOP:
View Full Code Here

Examples of com.google.gwt.safecss.shared.SafeStylesBuilder.appendTrustedString()

  protected SafeHtml renderHiddenHeaders(int[] columnWidths) {
    SafeHtmlBuilder heads = new SafeHtmlBuilder();
    for (int i = 0; i < columnWidths.length; i++) {
      int w = cm.isHidden(i) ? 0 : columnWidths[i];
      SafeStylesBuilder builder = new SafeStylesBuilder();
      builder.appendTrustedString("height: 0px;");
      builder.appendTrustedString("width:" + w + "px;");
      heads.append(tpls.th("", builder.toSafeStyles()));
    }
    return tpls.tr(appearance.styles().headerRow(), heads.toSafeHtml());
  }
View Full Code Here

Examples of com.google.gwt.safecss.shared.SafeStylesBuilder.appendTrustedString()

    SafeHtmlBuilder heads = new SafeHtmlBuilder();
    for (int i = 0; i < columnWidths.length; i++) {
      int w = cm.isHidden(i) ? 0 : columnWidths[i];
      SafeStylesBuilder builder = new SafeStylesBuilder();
      builder.appendTrustedString("height: 0px;");
      builder.appendTrustedString("width:" + w + "px;");
      heads.append(tpls.th("", builder.toSafeStyles()));
    }
    return tpls.tr(appearance.styles().headerRow(), heads.toSafeHtml());
  }
View Full Code Here

Examples of com.google.gwt.safecss.shared.SafeStylesBuilder.appendTrustedString()

      if (cm.isHidden(i)) {
        continue;
      }

      SafeStylesBuilder builder = new SafeStylesBuilder();
      builder.appendTrustedString("height: 0px;");
      builder.appendTrustedString("width:" + columnWidths[i] + "px;");
      heads.append(tpls.th("", builder.toSafeStyles()));
    }

    return tpls.tr("", heads.toSafeHtml());
View Full Code Here

Examples of com.google.gwt.safecss.shared.SafeStylesBuilder.appendTrustedString()

        continue;
      }

      SafeStylesBuilder builder = new SafeStylesBuilder();
      builder.appendTrustedString("height: 0px;");
      builder.appendTrustedString("width:" + columnWidths[i] + "px;");
      heads.append(tpls.th("", builder.toSafeStyles()));
    }

    return tpls.tr("", heads.toSafeHtml());
  }
View Full Code Here

Examples of com.google.gwt.safecss.shared.SafeStylesBuilder.appendTrustedString()

    if (pad == 0) pad = 5;

    String fieldLabelWidth = align == LabelAlign.TOP ? "auto" : (labelWidth + "px");

    SafeStylesBuilder fieldLabelStylesBuilder = new SafeStylesBuilder().appendTrustedString("width:" + fieldLabelWidth + ";");
    fieldLabelStylesBuilder.appendTrustedString("white-space: " + (options.getWordWrap() ? "normal" : "nowrap") + ";");
   
    SafeStyles fieldLabelStyles = fieldLabelStylesBuilder.toSafeStyles();

    String fieldElementPadding = align == LabelAlign.TOP ? "0" : (labelWidth + pad + "px");
    SafeStyles fieldElementStyles = SafeStylesUtils.fromTrustedString("padding-left:" + fieldElementPadding + ";");
View Full Code Here

Examples of com.google.gwt.safecss.shared.SafeStylesBuilder.appendTrustedString()

  protected SafeHtml renderHiddenHeaders(int[] columnWidths) {
    SafeHtmlBuilder heads = new SafeHtmlBuilder();
    for (int i = 0; i < columnWidths.length; i++) {
      int w = cm.isHidden(i) ? 0 : columnWidths[i];
      SafeStylesBuilder builder = new SafeStylesBuilder();
      builder.appendTrustedString("height: 0px;");
      builder.appendTrustedString("width:" + w + "px;");
      heads.append(tpls.th("", builder.toSafeStyles()));
    }
    return tpls.tr(appearance.styles().headerRow(), heads.toSafeHtml());
  }
View Full Code Here

Examples of com.google.gwt.safecss.shared.SafeStylesBuilder.appendTrustedString()

    SafeHtmlBuilder heads = new SafeHtmlBuilder();
    for (int i = 0; i < columnWidths.length; i++) {
      int w = cm.isHidden(i) ? 0 : columnWidths[i];
      SafeStylesBuilder builder = new SafeStylesBuilder();
      builder.appendTrustedString("height: 0px;");
      builder.appendTrustedString("width:" + w + "px;");
      heads.append(tpls.th("", builder.toSafeStyles()));
    }
    return tpls.tr(appearance.styles().headerRow(), heads.toSafeHtml());
  }
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.