Package com.google.gwt.safehtml.shared

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


  }

  public Menu(MenuAppearance appearance) {
    this.appearance = appearance;

    SafeHtmlBuilder builder = new SafeHtmlBuilder();
    appearance.render(builder);

    setElement(XDOM.create(builder.toSafeHtml()));
    getElement().makePositionable(true);

    ul = appearance.getMenuList(getElement());

    monitorWindowResize = true;
View Full Code Here


    this.panel = panel;
    this.panelData = data;
    this.region = region;
    this.appearance = GWT.<CollapsePanelAppearance> create(CollapsePanelAppearance.class);

    SafeHtmlBuilder builder = new SafeHtmlBuilder();
    this.appearance.render(builder, region);

    setElement(XDOM.create(builder.toSafeHtml()));
    sinkEvents(Event.ONCLICK);

    IconConfig config = ToolButton.DOUBLERIGHT;
    switch (region) {
      case EAST:
View Full Code Here

    return node.getJointElement();
  }

  public SafeHtml getTemplate(M m, String id, SafeHtml text, ImageResource icon, boolean checkable, Joint joint,
      int level) {
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    tree.getTreeAppearance().renderNode(sb, id, text, tree.getStyle(), icon, checkable, CheckState.UNCHECKED, joint,
        level - 1, TreeViewRenderMode.ALL);
    return sb.toSafeHtml();
  }
View Full Code Here

  public FieldSet(FieldSetAppearance appearance) {
    super(true);

    this.appearance = appearance;

    SafeHtmlBuilder builder = new SafeHtmlBuilder();
    this.appearance.render(builder);

    setElement(XDOM.create(builder.toSafeHtml()));
  }
View Full Code Here

   * @param appearance the appearance of the date picker
   */
  public DatePicker(DatePickerAppearance appearance) {
    this.appearance = appearance;

    SafeHtmlBuilder builder = new SafeHtmlBuilder();
    this.appearance.render(builder);

    setElement(XDOM.create(builder.toSafeHtml()));

    setAllowTextSelection(false);

    String[] dn = constants.weekdaysNarrow();
    @SuppressWarnings("unused")
View Full Code Here

      appearance.onUpdateDateStyle(target, DateState.OVER, true);
    }
  }

  private void createMonthPicker() {
    SafeHtmlBuilder builder = new SafeHtmlBuilder();
    appearance.renderMonthPicker(builder, messages, constants.monthsShort());

    monthPicker.setInnerHTML(builder.toSafeHtml().asString());

    mpMonths = new CompositeElement(Util.toElementArray(monthPicker.select(appearance.monthPickerMonthSelector())));
    mpYears = new CompositeElement(Util.toElementArray(monthPicker.select(appearance.monthPickerYearSelector())));

    mpMonths.each(new CompositeFunction() {
View Full Code Here

  }

  public MenuBar(MenuBarAppearance appearance) {
    this.appearance = appearance;

    SafeHtmlBuilder builder = new SafeHtmlBuilder();
    appearance.render(builder);

    setElement(XDOM.create(builder.toSafeHtml()));
    sinkEvents(Event.ONCLICK | Event.ONFOCUS | Event.ONBLUR);

    getElement().setTabIndex(-1);
    getElement().setAttribute("hideFocus", "true");
View Full Code Here

    this.appearance = appearance;
    this.treeAppearance = treeAppearance;

    disabledStyle = null;

    SafeHtmlBuilder builder = new SafeHtmlBuilder();
    this.appearance.render(builder);

    setElement(XDOM.create(builder.toSafeHtml()));
    getElement().makePositionable();

    // Do not remove, this is being used in Grid.css
    addStyleName("x-treegrid");
View Full Code Here

  public IconButton(IconButtonAppearance appearance, IconConfig config) {
    this.config = config;

    this.appearance = appearance;

    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    this.appearance.render(sb);

    setElement(XDOM.create(sb.toSafeHtml()));

    // mark element to not start drags
    addStyleName(CommonStyles.get().nodrag());

    addStyleName(config.style);
View Full Code Here

    super(itemAppearance);
    this.appearance = menuItemAppearance;

    canActivate = true;

    SafeHtmlBuilder markupBuilder = new SafeHtmlBuilder();
    appearance.render(markupBuilder);

    setElement(XDOM.create(markupBuilder.toSafeHtml()));
  }
View Full Code Here

TOP

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

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.