public class CaptionPanel extends Composite implements HasWidgets.ForIsWidget
| Modifier and Type | Class and Description | 
|---|---|
| static class  | CaptionPanel.CaptionPanelImplImplementation class without browser-specific hacks. | 
| static class  | CaptionPanel.CaptionPanelImplMozillaImplementation class that handles Mozilla rendering issues. | 
| static class  | CaptionPanel.CaptionPanelImplSafariImplementation class that handles Safari rendering issues. | 
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledHasWidgets.ForIsWidgeteventsToSinkDEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR| Constructor and Description | 
|---|
| CaptionPanel()Constructs a CaptionPanel with an empty caption. | 
| CaptionPanel(SafeHtml caption)Constructs a CaptionPanel with specified caption text. | 
| CaptionPanel(java.lang.String captionText)Constructs a CaptionPanel with specified caption text. | 
| CaptionPanel(java.lang.String caption,
            boolean asHTML)Constructs a CaptionPanel having the specified caption. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(IsWidget w)Overloaded version for IsWidget. | 
| void | add(Widget w)Adds a child widget. | 
| void | clear()Removes the content widget. | 
| java.lang.String | getCaptionHTML()Returns the caption as HTML; note that if the caption was previously set
 using  setCaptionText(String), the return value is undefined. | 
| java.lang.String | getCaptionText()Returns the caption as text; note that if the caption was previously set
 using  setCaptionHTML(String), the return value is undefined. | 
| Widget | getContentWidget()Accesses the content widget, if present. | 
| java.util.Iterator<Widget> | iterator()Iterates over the singular content widget, if present. | 
| boolean | remove(IsWidget w)Overloaded version for IsWidget. | 
| boolean | remove(Widget w)Removes the specified widget, although in practice the specified widget
 must be the content widget. | 
| void | setCaptionHTML(SafeHtml html)Sets the caption for the panel using a SafeHtml string. | 
| void | setCaptionHTML(java.lang.String html)Sets the caption for the panel using an HTML fragment. | 
| void | setCaptionText(java.lang.String text)Sets the caption for the panel using text that will be automatically
 escaped. | 
| void | setContentWidget(Widget w)Sets or replaces the content widget within the CaptionPanel. | 
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringpublic CaptionPanel()
public CaptionPanel(SafeHtml caption)
caption - the text of the captionpublic CaptionPanel(java.lang.String captionText)
captionText - the text of the caption, which is automatically escapedpublic CaptionPanel(java.lang.String caption,
                    boolean asHTML)
caption - the caption to displayasHTML - if true, the caption param is
            interpreted as HTML; otherwise, caption is
            treated as text and automatically escapedpublic void add(Widget w)
HasWidgetsadd in interface HasWidgetsw - the widget to be addedpublic void add(IsWidget w)
add in interface HasWidgets.ForIsWidgetadd(Widget)public void clear()
clear in interface HasWidgetspublic java.lang.String getCaptionHTML()
setCaptionText(String), the return value is undefined.public java.lang.String getCaptionText()
setCaptionHTML(String), the return value is undefined.public Widget getContentWidget()
setContentWidget(Widget)public java.util.Iterator<Widget> iterator()
iterator in interface HasWidgetsiterator in interface java.lang.Iterable<Widget>public boolean remove(Widget w)
remove in interface HasWidgetsw - the widget to remove; note that anything other than the Widget
            returned by getContentWidget() will have no effecttrue if the widget was presentpublic boolean remove(IsWidget w)
remove in interface HasWidgets.ForIsWidgetremove(Widget)public void setCaptionHTML(java.lang.String html)
html - HTML for the new caption; must not be nullpublic void setCaptionHTML(SafeHtml html)
html - HTML for the new caption; must not be nullpublic void setCaptionText(java.lang.String text)
text - text for the new caption; must not be nullpublic void setContentWidget(Widget w)
w - the content widget to be set