com.google.gwt.user.client.Element.setInnerSafeHtml()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(160)

本文整理了Java中com.google.gwt.user.client.Element.setInnerSafeHtml()方法的一些代码示例,展示了Element.setInnerSafeHtml()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setInnerSafeHtml()方法的具体详情如下:
包路径:com.google.gwt.user.client.Element
类名称:Element
方法名:setInnerSafeHtml

Element.setInnerSafeHtml介绍

暂无

代码示例

代码示例来源:origin: kaaproject/kaa

loginTitle.getElement().setInnerSafeHtml(
  SafeHtmlUtils.fromSafeConstant(Utils.messages.loginTitle()));

代码示例来源:origin: kaaproject/kaa

getSaveButtonWidget().setText(Utils.constants.save());
getCancelButtonWidget().setText(Utils.constants.cancel());
requiredFieldsNoteLabel.getElement().setInnerSafeHtml(
  SafeHtmlUtils.fromSafeConstant(Utils.messages
    .requiredFieldsNote(Utils.avroUiStyle

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Redraw the widget.
 */
public void redraw() {
 SafeHtmlBuilder sb = new SafeHtmlBuilder();
 cell.render(createContext(), value, sb);
 getElement().setInnerSafeHtml(sb.toSafeHtml());
 /*
  * The rendered Cell should fill the root element so height and width styles
  * applied to the widget also apply to the Cell. If there is exactly one
  * child element, the height and width are set to 100% to fill the parent.
  */
 Element child = getElement().getFirstChildElement();
 if (child != null && child.getNextSiblingElement() == null) {
  child.getStyle().setHeight(100, Unit.PCT);
  child.getStyle().setWidth(100, Unit.PCT);
 }
}

代码示例来源:origin: GwtMaterialDesign/gwt-material

@Override
  public void setText(String text) {
    getElement().setInnerSafeHtml(SafeHtmlUtils.fromString(text));
  }
}

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material

@Override
  public void setText(String text) {
    getElement().setInnerSafeHtml(SafeHtmlUtils.fromString(text));
  }
}

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material-addins

@Override
public void setTitle(String title) {
  this.title = title;
  divTitle.getElement().setInnerSafeHtml(SafeHtmlUtils.fromString(title));
}

代码示例来源:origin: GwtMaterialDesign/gwt-material

@Override
public void setHTML(final String html) {
  getElement().setInnerSafeHtml(SafeHtmlUtils.fromString(html));
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
protected IsWidget createBodyPanel(SafeHtml header, Snapshot entity) {
  descriptionHeaderPanel.getElement().setInnerSafeHtml(header);
  createAdditionalInfoPanel();
  return bodyPanel;
}

代码示例来源:origin: GwtMaterialDesign/gwt-material

@Override
public void setValue(String value, boolean fireEvents) {
  header.getElement().setInnerSafeHtml(SafeHtmlUtils.fromString(value));
  super.setValue(value, fireEvents);
}

代码示例来源:origin: de.knightsoft-net/gwt-mt-widgets

@Override
public void setValue(final Double pvalue) {
 value = pvalue;
 final double rating = pvalue == null ? 0.0 : pvalue.doubleValue();
 final SafeHtmlBuilder stars = new SafeHtmlBuilder();
 for (int i = 1; i <= max; i++) {
  appendStar(stars, i, rating);
 }
 panel.getElement().setInnerSafeHtml(stars.toSafeHtml());
}

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material

@Override
public void setValue(String value, boolean fireEvents) {
  header.getElement().setInnerSafeHtml(SafeHtmlUtils.fromString(value));
  super.setValue(value, fireEvents);
}

代码示例来源:origin: ManfredTremmel/gwt-bean-validators

@Override
public void setValue(final Double pvalue) {
 value = pvalue;
 final double rating = pvalue == null ? 0.0 : pvalue.doubleValue();
 final SafeHtmlBuilder stars = new SafeHtmlBuilder();
 for (int i = 1; i <= max; i++) {
  appendStar(stars, i, rating);
 }
 panel.getElement().setInnerSafeHtml(stars.toSafeHtml());
}

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material-addins

@Override
public void setDescription(String description) {
  this.description = description;
  divDescription.setStyleName(AddinsCssName.DESCRIPTION);
  divDescription.getElement().setInnerSafeHtml(SafeHtmlUtils.fromString(description));
  conBody.insert(divDescription, 1);
}

代码示例来源:origin: org.eclipse.che.core/che-core-ide-app

ToolbarButton(SafeHtml content) {
 super(Document.get().createDivElement());
 getElement().setInnerSafeHtml(content);
 addStyleName(RESOURCES.css().button());
}

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material-addins

protected void applyIconStatus(MaterialIcon icon, String description) {
  iconError.removeFromParent();
  iconSuccess.removeFromParent();
  divCircle.removeFromParent();
  conCircle.insert(icon, 0);
  if (description != null) {
    divDescription.getElement().setInnerSafeHtml(SafeHtmlUtils.fromString(description));
  }
}

代码示例来源:origin: GwtMaterialDesign/gwt-material

/**
 * Sets the header of the collection component.
 */
public void setHeader(String header) {
  headerLabel.getElement().setInnerSafeHtml(SafeHtmlUtils.fromString(header));
  addStyleName(CssName.WITH_HEADER);
  ListItem item = new ListItem(headerLabel);
  UiHelper.addMousePressedHandlers(item);
  item.setStyleName(CssName.COLLECTION_HEADER);
  insert(item, 0);
}

代码示例来源:origin: org.eclipse.che.core/che-core-ide-app

HeaderWidget() {
  super();
  addStyleName(RESOURCES.commandToolbarCss().previewUrlWidget());
  final SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
  safeHtmlBuilder.appendHtmlConstant(FontAwesome.BULLSEYE);
  getElement().setInnerSafeHtml(safeHtmlBuilder.toSafeHtml());
 }
}

代码示例来源:origin: org.eclipse.che.core/che-core-ide-app

ActionButton(SafeHtml content) {
  super(Document.get().createDivElement());
  getElement().setInnerSafeHtml(content);
  asWidget().addStyleName(RESOURCES.commandToolbarCss().processWidgetActionButton());
 }
}

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material

/**
 * Sets the header of the collection component.
 */
public void setHeader(String header) {
  headerLabel.getElement().setInnerSafeHtml(SafeHtmlUtils.fromString(header));
  addStyleName(CssName.WITH_HEADER);
  ListItem item = new ListItem(headerLabel);
  UiHelper.addMousePressedHandlers(item);
  item.setStyleName(CssName.COLLECTION_HEADER);
  insert(item, 0);
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
protected IsWidget createBodyPanel(SafeHtml header, VmNetworkInterface networkInterface) {
  checkBoxPanel.add(createExpandIconPanel());
  iconPanel.add(createLinkStatusPanel(isInterfaceUp(networkInterface)));
  iconPanel.add(createCardPluggedStatusPanel(isCardPlugged(networkInterface)));
  iconPanel.add(new NetworkIcon());
  descriptionHeaderPanel.getElement().setInnerSafeHtml(header);
  return bodyPanel;
}

相关文章

Element类方法