|
GWT 2.0.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
com.google.gwt.user.client.ui.CaptionPanel
public class CaptionPanel
A panel that wraps its contents in a border with a caption that appears in the upper left corner of the border. This is an implementation of the fieldset HTML element.
Nested Class Summary | |
---|---|
static class |
CaptionPanel.CaptionPanelImpl
Implementation class without browser-specific hacks. |
static class |
CaptionPanel.CaptionPanelImplMozilla
Implementation class that handles Mozilla rendering issues. |
static class |
CaptionPanel.CaptionPanelImplSafari
Implementation class that handles Safari rendering issues. |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
CaptionPanel()
Constructs a CaptionPanel with an empty caption. |
|
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. |
Method Summary | |
---|---|
void |
add(Widget w)
Adds a child widget. |
void |
clear()
Removes the content widget. |
java.lang.String |
getCaptionHTML()
|
java.lang.String |
getCaptionText()
|
Widget |
getContentWidget()
Accesses the content widget, if present. |
java.util.Iterator<Widget> |
iterator()
Iterates over the singular content widget, if present. |
boolean |
remove(Widget w)
Removes the specified widget, although in practice the specified widget must be the content widget. |
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. |
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, 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, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CaptionPanel()
public 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 escapedMethod Detail |
---|
public void add(Widget w)
HasWidgets
add
in interface HasWidgets
w
- the widget to be addedpublic void clear()
clear
in interface HasWidgets
public java.lang.String getCaptionHTML()
setCaptionText(String)
, the return value is
undefinedpublic java.lang.String getCaptionText()
setCaptionHTML(String)
, the return value is
undefinedpublic Widget getContentWidget()
setContentWidget(Widget)
public java.util.Iterator<Widget> iterator()
iterator
in interface HasWidgets
iterator
in interface java.lang.Iterable<Widget>
public boolean remove(Widget w)
remove
in interface HasWidgets
w
- the widget to remove; note that anything other than the Widget
returned by getContentWidget()
will have no effect
true
if the widget was presentpublic void setCaptionHTML(java.lang.String html)
html
- HTML for the new caption; must not be null
public void setCaptionText(java.lang.String text)
text
- text for the new caption; must not be null
public void setContentWidget(Widget w)
w
- the content widget to be set
|
GWT 2.0.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |