*
* @param tooltip
* @return
*/
public HTMLElement tooltip(String tooltip) {
Span outer = new Span();
outer.getElement().setAttribute("data-tooltip", "");
outer.getElement().setTitle(tooltip);
// it's unlikely that this will be the case, since most of the time a tooltip will be configured while building
if (getElement().hasParentElement()) {
getElement().getParentElement().replaceChild(outer.getElement(), getElement());
}
outer.wrap(this);
// we have to return outer
return outer;
}