Google Web Toolkit (Beta)
Search this site:

# Interface HasWidgets

public interface HasWidgets
// Implemented by `Tree`, `TabPanel`, `Panel`, `DisclosurePanel`
A widget that implements this interface contains widgets and can enumerate them.

## Methods

add(Widget) | Adds a child widget.
clear() | Removes all child widgets.
iterator() | Gets an iterator for the contained widgets.
remove(Widget) | Removes a child widget.

## Method Detail

### add

public void add(Widget w)
Adds a child widget.

#### Parameters

w
  the widget to be added

### clear

public void clear()
Removes all child widgets.

### iterator

public Iterator 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