protected final void setState(String html) { stateSpan.setInnerHTML(html); }
public void setStatusText(String text) { statusText.setInnerHTML(text); }
@Override public void setLabel(String label) { String innerHtml = "<b>" + label.toUpperCase() + "</b>"; spanElement.setInnerHTML(innerHtml); }
public FormGroup validationMessage(String validationMessage) { this.validationMessage.setInnerHTML(SafeHtmlUtils.fromString(validationMessage).asString()); return this; }
public DateFilterWidget() { dimensionSpan.setInnerHTML(I18N.CONSTANTS.dates()); stateSpan.setInnerText(I18N.CONSTANTS.allDates()); }
private void showError(String message) { messageSpanContainer.setVisible(true); messageSpan.setInnerHTML(SafeHtmlUtils.fromString(message).asString()); }
private SpanElement buildTitleTextWidget(final String title, final IsWidget titleDecoration) { final SpanElement spanElement = Document.get().createSpanElement(); spanElement.addClassName("uf-listbar-panel-header-title-text"); spanElement.addClassName(CSSLocatorsUtils.buildLocator("qe-list-bar-header", title)); final String titleWidget = (titleDecoration instanceof Image) ? titleDecoration.toString() : ""; spanElement.setInnerHTML(titleWidget + " " + title.replaceAll(" ", "\u00a0")); spanElement.setTitle(title); return spanElement; }
private SpanElement buildTitleTextWidget(final String title, final IsWidget titleDecoration) { final SpanElement spanElement = Document.get().createSpanElement(); spanElement.addClassName("uf-listbar-panel-header-title-text"); spanElement.addClassName(CSSLocatorsUtils.buildLocator("qe-list-bar-header", title)); final String titleWidget = (titleDecoration instanceof Image) ? titleDecoration.toString() : ""; spanElement.setInnerHTML(titleWidget + " " + title.replaceAll(" ", "\u00a0")); spanElement.setTitle(title); return spanElement; }
public void setDescription(String description) { if (description != null && !description.trim().isEmpty()) { if (descriptionElement == null) { descriptionElement = Document.get().createSpanElement(); descriptionElement.setClassName(NAVBUTTON_CLASSNAME + "-desc"); } /* * Add the descriptionElement if it's not already added as it might * have been overwritten by a call to #setText */ if (!getElement().isOrHasChild(descriptionElement)) { getElement().insertFirst(descriptionElement); } descriptionElement.setInnerHTML(description); } else if (descriptionElement != null) { descriptionElement.removeFromParent(); descriptionElement = null; } }
private Element getIconElement(Object icon) { if (icon instanceof SVGResource) { return ((SVGResource) icon).getSvg().getElement(); } else if (icon instanceof String) { SpanElement element = Document.get().createSpanElement(); element.getStyle().setFontSize(11., Style.Unit.PT); element.getStyle().setMarginTop(2., Style.Unit.PT); element.setInnerHTML((String) icon); return element; } throw new IllegalArgumentException("Icon type is undefined"); } }
private Widget buildTitle( final String title, final IsWidget titleDecoration ) { final SpanElement spanElement = Document.get().createSpanElement(); spanElement.getStyle().setWhiteSpace( Style.WhiteSpace.NOWRAP ); spanElement.getStyle().setOverflow( Style.Overflow.HIDDEN ); spanElement.getStyle().setTextOverflow( Style.TextOverflow.ELLIPSIS ); spanElement.getStyle().setDisplay( BLOCK ); final String titleWidget = (titleDecoration instanceof Image) ? titleDecoration.toString() : ""; spanElement.setInnerHTML(titleWidget + " " + title.replaceAll( " ", "\u00a0" ) ); return new DragArea() {{ add( spanElement ); }}; }
private Button createButton() { Button button = new Button(); button.removeStyleName(GWT_BUTTON); button.addStyleName(Styles.BTN); button.addStyleName(BTN_DEFAULT); button.addStyleName(Styles.DROPDOWN_TOGGLE); button.addStyleName(Styles.FORM_CONTROL); button.getElement().setAttribute(ID, DROPDOWN_MENU); button.getElement().setAttribute(DATA_TOGGLE, Styles.DROPDOWN); selectedValue = Document.get().createSpanElement(); selectedValue.addClassName(FILTER_OPTION); selectedValue.addClassName(Styles.PULL_LEFT); //$NON-NLS-1$ selectedValue.setInnerHTML(NBSP); return button; }
if (caption != null) { if (captionAsHtml) { captionElement.setInnerHTML(caption); } else { captionElement.setInnerText(caption);