/** * Constructs a CaptionPanel having the specified caption. * * @param caption the caption to display * @param asHTML if <code>true</code>, the <code>caption</code> param is * interpreted as HTML; otherwise, <code>caption</code> is * treated as text and automatically escaped */ public CaptionPanel(@IsSafeHtml String caption, boolean asHTML) { FieldSetElement fieldSet = Document.get().createFieldSetElement(); initWidget(new SimplePanel(fieldSet)); legend = Document.get().createLegendElement(); fieldSet.appendChild(legend); if (asHTML) { setCaptionHTML(caption); } else { setCaptionText(caption); } }
/** * Constructs a CaptionPanel having the specified caption. * * @param caption the caption to display * @param asHTML if <code>true</code>, the <code>caption</code> param is * interpreted as HTML; otherwise, <code>caption</code> is * treated as text and automatically escaped */ public CaptionPanel(String caption, boolean asHTML) { FieldSetElement fieldSet = Document.get().createFieldSetElement(); initWidget(new SimplePanel(fieldSet)); legend = Document.get().createLegendElement(); fieldSet.appendChild(legend); if (asHTML) { setCaptionHTML(caption); } else { setCaptionText(caption); } }
/** * Constructs a CaptionPanel having the specified caption. * * @param caption the caption to display * @param asHTML if <code>true</code>, the <code>caption</code> param is * interpreted as HTML; otherwise, <code>caption</code> is * treated as text and automatically escaped */ public CaptionPanel(String caption, boolean asHTML) { FieldSetElement fieldSet = Document.get().createFieldSetElement(); initWidget(new SimplePanel(fieldSet)); legend = Document.get().createLegendElement(); fieldSet.appendChild(legend); if (asHTML) { setCaptionHTML(caption); } else { setCaptionText(caption); } }