/** * Get a SafeHtml representation of the header that includes an image and some text. * @param image the {@link ImageResource} to add next to the header * @param text the header text * @return the header as SafeHtml */ public static SafeHtml getHeaderSafeHtml(final ImageResource image, final String text) { HeaderHTML headerHTML = new HeaderHTML(); headerHTML.setText(text); headerHTML.setImageResource(image); return toSafeHtml(headerHTML.getElement().getString()); }
/** * Get a HTML representation of the header that includes an image and some text. * @param image the {@link ImageResource} to add next to the header * @param text the header text * @return the header as HTML */ public static HTML getHeaderHTML(final ImageResource image, final String text) { HeaderHTML headerHTML = new HeaderHTML(); headerHTML.setText(text); headerHTML.setImageResource(image); return new HTML(headerHTML.getElement().getString()); }
/** * Get a HTML representation of the header that includes an image and some text. * @param image the {@link ImageResource} to add next to the header * @param text the header text * @return the header as HTML */ public static HTML getHeaderHTML(final ImageResource image, final String text) { HeaderHTML headerHTML = new HeaderHTML(); headerHTML.setText(text); headerHTML.setImageResource(image); return new HTML(headerHTML.getElement().getString()); }
/** * Get a SafeHtml representation of the header that includes an image and some text. * @param image the {@link ImageResource} to add next to the header * @param text the header text * @return the header as SafeHtml */ public static SafeHtml getHeaderSafeHtml(final ImageResource image, final String text) { HeaderHTML headerHTML = new HeaderHTML(); headerHTML.setText(text); headerHTML.setImageResource(image); return toSafeHtml(headerHTML.getElement().getString()); }