List of usage examples for com.google.gwt.user.client.ui HasHTML setHTML
void setHTML(String html);
From source file:com.vaadin.client.VCaption.java
License:Apache License
/** * Sets the text of the given widget to the caption found in the state. * <p>//from w w w .j a v a2s .c om * Uses {@link AbstractComponentState#captionAsHtml} to determine whether to * set the caption as html or plain text * * @since 7.4 * @param widget * the target widget * @param state * the state from which to read the caption text and mode */ public static void setCaptionText(HasHTML widget, AbstractComponentState state) { if (state.captionAsHtml) { widget.setHTML(state.caption); } else { widget.setText(state.caption); } }