com.sksamuel.jqm4gwt.html.Abbr Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jqm4gwt-standalone Show documentation
Show all versions of jqm4gwt-standalone Show documentation
jqm4gwt bundled with all of its dependencies
The newest version!
package com.sksamuel.jqm4gwt.html;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.Widget;
import com.sksamuel.jqm4gwt.HasHTML;
import com.sksamuel.jqm4gwt.HasText;
/**
* An implemenation of a <abbr> element exposed as a widget.
*
The <abbr> tag indicates an abbreviation or an acronym, like "WWW" or "NATO".
*
* @author slavap
*
*/
public class Abbr extends Widget implements HasText, HasHTML {
public Abbr() {
Element elt = DOM.createElement("abbr");
setElement(elt);
}
@Override
public String getText() {
return getElement().getInnerText();
}
@Override
public void setText(String text) {
getElement().setInnerText(text);
}
@Override
public Abbr withText(String text) {
setText(text);
return this;
}
@Override
public String getHTML() {
return getElement().getInnerHTML();
}
@Override
public void setHTML(String html) {
getElement().setInnerHTML(html);
}
@Override
public Abbr withHTML(String html) {
setHTML(html);
return this;
}
}