Class SimplePanel
Abstract base class for panels that contain only one widget.
Constructors
SimplePanel() | Creates an empty panel that uses a DIV for its contents. |
SimplePanel(Element) | Creates an empty panel that uses the specified browser element for its
contents. |
Methods
Constructor Detail
SimplePanel
public SimplePanel()
Creates an empty panel that uses a DIV for its contents.
SimplePanel
protected
SimplePanel(
Element elem)
Creates an empty panel that uses the specified browser element for its
contents.
Parameters
- elem
- the browser element to use
Method Detail
add
Adds a widget to this panel.
Parameters
- w
- the child widget to be added
getContainerElement
protected
Element getContainerElement()
Override this method to specify that an element other than the root element
be the container for the panel's child widget. This can be useful when you
want to create a simple panel that decorates its contents.
Return Value
the element to be used as the panel's container
getWidget
Gets the panel's child widget.
Return Value
the child widget, or
null
if none is present
iterator
Gets an iterator for the contained widgets. This iterator is required to
implement
Iterator.remove().
remove
public boolean
remove(
Widget w)
Removes a child widget.
Parameters
- w
- the widget to be removed
Return Value
true
if the widget was present
setWidget
public void
setWidget(
Widget w)
Sets this panel's widget. Any existing child widget will be removed.
Parameters
- w
- the panel's new widget (
null
will clear the panel)