Examples of toSafeStyles()


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

    // Create the wrapper based on the vertical alignment.
    SafeStylesBuilder cssStyles =
        new SafeStylesBuilder().appendTrustedString(direction + ":0px;");
    if (HasVerticalAlignment.ALIGN_TOP == valign) {
      return template.imageWrapperTop(cssStyles.toSafeStyles(), image);
    } else if (HasVerticalAlignment.ALIGN_BOTTOM == valign) {
      return template.imageWrapperBottom(cssStyles.toSafeStyles(), image);
    } else {
      int halfHeight = (int) Math.round(res.getHeight() / 2.0);
      cssStyles.appendTrustedString("margin-top:-" + halfHeight + "px;");
View Full Code Here

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

    SafeStylesBuilder cssStyles =
        new SafeStylesBuilder().appendTrustedString(direction + ":0px;");
    if (HasVerticalAlignment.ALIGN_TOP == valign) {
      return template.imageWrapperTop(cssStyles.toSafeStyles(), image);
    } else if (HasVerticalAlignment.ALIGN_BOTTOM == valign) {
      return template.imageWrapperBottom(cssStyles.toSafeStyles(), image);
    } else {
      int halfHeight = (int) Math.round(res.getHeight() / 2.0);
      cssStyles.appendTrustedString("margin-top:-" + halfHeight + "px;");
      return template.imageWrapperMiddle(cssStyles.toSafeStyles(), image);
    }
View Full Code Here

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

    } else if (HasVerticalAlignment.ALIGN_BOTTOM == valign) {
      return template.imageWrapperBottom(cssStyles.toSafeStyles(), image);
    } else {
      int halfHeight = (int) Math.round(res.getHeight() / 2.0);
      cssStyles.appendTrustedString("margin-top:-" + halfHeight + "px;");
      return template.imageWrapperMiddle(cssStyles.toSafeStyles(), image);
    }
  }

  /**
   * Get the parent element of the decorated cell.
View Full Code Here

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

    cssBuilder.appendTrustedString("height: " + res.getHeight() + "px;");

    AbstractImagePrototype proto = AbstractImagePrototype.create(res);
    SafeHtml image = SafeHtmlUtils.fromTrustedString(proto.getHTML());
    return template
        .imageWrapper(classesBuilder.toString(), cssBuilder.toSafeStyles(), image);
  }

  /**
   * Handle keyboard navigation.
   *
 
View Full Code Here

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

        ssb.top(VERTICAL_OFFSET, Style.Unit.PX);

        if (isMultiple) {
            containerTemp.html(ChozenTemplate.templates.contentMultiple(css.chznChoices(),
                    css.searchField(), defaultText, css.defaultClass(), css.chznDrop(), css.chznResults(),
                    ssb.toSafeStyles())
                    .asString());
        } else {
            containerTemp.html(ChozenTemplate.templates.contentSingle(css.chznSingle(),
                    css.chznDefault(), defaultText, css.chznDrop(), css.chznSearch(), css.chznResults(),
                    ssb.toSafeStyles())
View Full Code Here

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

                    ssb.toSafeStyles())
                    .asString());
        } else {
            containerTemp.html(ChozenTemplate.templates.contentSingle(css.chznSingle(),
                    css.chznDefault(), defaultText, css.chznDrop(), css.chznSearch(), css.chznResults(),
                    ssb.toSafeStyles())
                    .asString());
        }

        // insert container after the select elements
        $selectElement.hide().after(containerTemp);
View Full Code Here

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

        ssb.top(VERTICAL_OFFSET, Style.Unit.PX);

        if (isMultiple) {
            containerTemp.html(ChozenTemplate.templates.contentMultiple(css.chznChoices(),
                    css.searchField(), defaultText, css.defaultClass(), css.chznDrop(), css.chznResults(),
                    ssb.toSafeStyles())
                    .asString());
        } else {
            containerTemp.html(ChozenTemplate.templates.contentSingle(css.chznSingle(),
                    css.chznDefault(), defaultText, css.chznDrop(), css.chznSearch(), css.chznResults(),
                    ssb.toSafeStyles())
View Full Code Here

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

                    ssb.toSafeStyles())
                    .asString());
        } else {
            containerTemp.html(ChozenTemplate.templates.contentSingle(css.chznSingle(),
                    css.chznDefault(), defaultText, css.chznDrop(), css.chznSearch(), css.chznResults(),
                    ssb.toSafeStyles())
                    .asString());
        }

        // insert container after the select elements
        $selectElement.hide().after(containerTemp);
View Full Code Here

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

    } else {
      cssBuilder.appendTrustedString("right:0px;");
    }
    cssBuilder.appendTrustedString("width: " + res.getWidth() + "px;");
    cssBuilder.appendTrustedString("height: " + res.getHeight() + "px;");
    return template.imageWrapper(cssBuilder.toSafeStyles(), image);
  }

  /**
   * Get the {@link KeyboardSelectionPolicy} to apply to lists. We use keyboard
   * selection to track the open node, so we never actually disable keyboard
View Full Code Here

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

    cssBuilder.appendTrustedString("height: " + res.getHeight() + "px;");

    AbstractImagePrototype proto = AbstractImagePrototype.create(res);
    SafeHtml image = SafeHtmlUtils.fromTrustedString(proto.getHTML());
    return template
        .imageWrapper(classesBuilder.toString(), cssBuilder.toSafeStyles(), image);
  }

  /**
   * Handle keyboard navigation.
   *
 
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.