Package com.google.gwt.safehtml.shared

Examples of com.google.gwt.safehtml.shared.SafeHtmlBuilder.appendEscaped()


          String part2 = formattedSuggestion.substring(wordBounds.startIndex,
              wordBounds.endIndex);
          cursor = wordBounds.endIndex;
          accum.appendEscaped(part1);
          accum.appendHtmlConstant("<strong>");
          accum.appendEscaped(part2);
          accum.appendHtmlConstant("</strong>");
        }
        index = wordBounds.endIndex;
      }
View Full Code Here


      // Check to make sure the search was found in the string.
      if (cursor == 0) {
        continue;
      }

      accum.appendEscaped(formattedSuggestion.substring(cursor));
      MultiWordSuggestion suggestion = createSuggestion(formattedSuggestion,
          accum.toSafeHtml().asString());
      suggestions.add(suggestion);
    }
    return suggestions;
View Full Code Here

               sb.appendHtmlConstant("</span>");
            lastClass = charClass.get(i);
            if (lastClass != null)
               sb.appendHtmlConstant("<span class=\"" + lastClass + "\">");
         }
         sb.appendEscaped(plainText.substring(i, i+1));
      }
      if (lastClass != null)
         sb.appendHtmlConstant("</span>");
     
      return sb.toSafeHtml();
View Full Code Here

      {
         sb.appendHtmlConstant("<td width='" + pctWidth + "%'>");
         for (String colGroupName: colGroupNames)
         {
            sb.appendHtmlConstant("<h2>");
            sb.appendEscaped(colGroupName);
            sb.appendHtmlConstant("</h2><table>");
            for (int i = 0; i < shortcuts.size(); i++)
            {
               ShortcutInfo info = shortcuts.get(i);
               if (info.getDescription() == null ||
View Full Code Here

               }
               sb.appendHtmlConstant("<tr><td><strong>");
               sb.appendHtmlConstant(
                     StringUtil.joinStrings(info.getShortcuts(), ", "));
               sb.appendHtmlConstant("</strong></td><td>");
               sb.appendEscaped(info.getDescription());
               sb.appendHtmlConstant("</td></tr>");
            }
            sb.appendHtmlConstant("</table>");
         }
         sb.appendHtmlConstant("</td>");
View Full Code Here

            
            // build html
            SafeHtmlBuilder menuHtml = new SafeHtmlBuilder();
            for (int j=0; j<item.getIndent(); j++)
               menuHtml.appendHtmlConstant("&nbsp;&nbsp;&nbsp;");
            menuHtml.appendEscaped(item.getTitle());
        
            navigationMenu.addItem(new MenuItem(menuHtml.toSafeHtml(),
                                           new Command() {
               @Override
               public void execute()
View Full Code Here

   */
  private SafeHtml imageItemHTML(ImageResource imageProto, String title) {
    SafeHtmlBuilder builder = new SafeHtmlBuilder();
    builder.append(AbstractImagePrototype.create(imageProto).getSafeHtml());
    builder.appendHtmlConstant(" ");
    builder.appendEscaped(title);
    return builder.toSafeHtml();
  }
}
View Full Code Here

        SafeHtmlBuilder html = new SafeHtmlBuilder();
        html.appendHtmlConstant("<ul>");
        html.appendHtmlConstant("<li>").appendEscaped("Locale: The user interface language.");
        html.appendHtmlConstant("<li>").appendEscaped("Analytics: We track browser and operating system information in order to improve the user interface. ");
        html.appendEscaped("You can disable the analytics feature at anytime.");
        html.appendHtmlConstant("</ul>");
        StaticHelpPanel help = new StaticHelpPanel(html.toSafeHtml());
        layout.add(help.asWidget());
        layout.add(form.asWidget());
View Full Code Here

                    {
                        Log.error("Failed to retrieve attribute descriptions: "+address.getAddress());

                        html.appendHtmlConstant("<tr class='help-field-row'>");
                        html.appendHtmlConstant("<td class='help-field-name' colspan=2>");
                        html.appendEscaped("Attribute descriptions not available.");
                        html.appendHtmlConstant("</td>");
                        html.appendHtmlConstant("</tr>");
                    }
                    else
                    {
View Full Code Here

                            html.appendHtmlConstant("<tr class='help-field-row'>");
                            html.appendHtmlConstant("<td class='help-field-name'>");

                            String ref = field.getRef();
                            String title = form.getFormItemTitle(ref);
                            html.appendEscaped(title).appendEscaped(": ");
                            html.appendHtmlConstant("</td>");
                            html.appendHtmlConstant("<td class='help-field-desc'>");
                            try {
                                html.appendHtmlConstant(field.getDesc());
                            } catch (Throwable e) {
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.