List of usage examples for com.google.gwt.user.client Element setInnerText
@Override public void setInnerText(String text)
From source file:org.jrydberg.ui.client.MenuButton.java
License:Apache License
public void setText(String text) { getElement().removeChild(getElement().getChild(0)); Element textElement = DOM.createSpan(); textElement.setInnerText(text); getElement().insertFirst(textElement); }
From source file:org.kaaproject.kaa.server.admin.client.mvp.view.widget.ImageTextButton.java
License:Apache License
public ImageTextButton(ImageResource imageResource, String text, ClickHandler clickHandler) { super();/*from w w w .j a v a2 s . c o m*/ if (clickHandler != null) { addClickHandler(clickHandler); } String definedStyles = getElement().getAttribute("style"); getElement().setAttribute("style", definedStyles + "; vertical-align:middle;"); this.text = text; Element span = DOM.createElement("span"); span.setInnerText(text); DOM.insertChild(getElement(), span, 0); Element imageSpan = DOM.createElement("span"); int spacing; if (this.text == null || this.text.trim().equals("")) { spacing = 0; } else { spacing = 16; } updateImageElementFromImageResource(imageSpan, imageResource, spacing); DOM.insertBefore(getElement(), imageSpan, DOM.getFirstChild(getElement())); }
From source file:org.kuali.student.common.ui.client.widgets.field.layout.element.AbbrPanel.java
License:Educational Community License
public AbbrPanel(String title, String className, String text) { Element abbr = DOM.createElement("abbr"); abbr.setTitle(title);// w ww . j a va 2s. c om abbr.setClassName(className); abbr.setInnerText(text); this.setElement(abbr); }
From source file:org.kuali.student.common.ui.client.widgets.field.layout.element.LabelPanel.java
License:Educational Community License
public LabelPanel(String text, String forID) { Element label = DOM.createLabel(); label.setInnerText(text); label.setAttribute("for", forID); this.setElement(label); }
From source file:org.kuali.student.common.ui.client.widgets.field.layout.element.LabelPanel.java
License:Educational Community License
public LabelPanel(String text) { Element label = DOM.createLabel(); label.setInnerText(text); this.setElement(label); }
From source file:org.kuali.student.common.ui.client.widgets.field.layout.element.LegendPanel.java
License:Educational Community License
public LegendPanel(String text, String forID) { Element legend = DOM.createLegend(); legend.setInnerText(text); legend.setAttribute("for", forID); this.setElement(legend); }
From source file:org.nightcode.gwt.selectio.client.ui.ItemSelector.java
License:Apache License
private void appendItem(Element parent, final String search) { Element li = DOM.createElement("li"); li.setClassName("slt-selected-item"); li.setId(search);//from www . j a v a2 s . c o m li.setInnerText("*" + search + "*"); DOM.appendChild(parent, li); Event.setEventListener(li, selectedSearchQueriesEventListener); Event.sinkEvents(li, Event.ONCLICK); }
From source file:org.nightcode.gwt.selectio.client.ui.ItemSelector.java
License:Apache License
private void appendItem(Element parent, ItemSelectionModel.Type type, String text) { Element li = DOM.createElement("li"); li.setClassName("slt-selected-item"); li.setId(type.name());//from w w w . j a v a 2 s .c o m li.setInnerText(text); DOM.appendChild(parent, li); Event.setEventListener(li, selectedTypeEventListener); Event.sinkEvents(li, Event.ONCLICK); }
From source file:org.nightcode.gwt.selectio.client.ui.ItemSelector.java
License:Apache License
private void appendItem(Element parent, final ItemProxy item) { Element li = DOM.createElement("li"); li.setClassName("slt-selected-item"); li.setId(item.getId());/*www .j av a2s . com*/ li.setInnerText(item.getDisplayName()); DOM.appendChild(parent, li); Event.setEventListener(li, selectedItemsEventListener); Event.sinkEvents(li, Event.ONCLICK); }
From source file:org.nightcode.gwt.selectio.client.ui.ItemSelector.java
License:Apache License
private void insertTitle(Element parent, String message) { Element selectedTitle = DOM.createElement("li"); selectedTitle.setClassName("slt-selected-label"); selectedTitle.setInnerText(message); DOM.insertChild(parent, selectedTitle, 0); }