All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sksamuel.jqm4gwt.html.Abbr Maven / Gradle / Ivy

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; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy