Class ComplexPanel

public class ComplexPanel
extends Panel

// Superclass of AbsolutePanel, CellPanel, DeckPanel, FlowPanel, HTMLPanel, StackPanel
Abstract base class for panels that can contain multiple child widgets.

Methods

add(Widget, Element)Adds a new child widget to the panel.
getChildren()Gets the list of children contained in this panel.
insert(Widget, Element, int)Inserts a new child widget into the panel.
iterator()Gets an iterator for the contained widgets.
remove(Widget)Removes a child widget.

Method Detail

add

protected void add(Widget w, Element container)
Adds a new child widget to the panel.

Parameters

w
the child widget to be added
container
the element within which the child will be contained

getChildren

protected WidgetCollection getChildren()
Gets the list of children contained in this panel.

Return Value

a collection of child widgets

insert

protected void insert(Widget w, Element container, int beforeIndex)
Inserts a new child widget into the panel.

Parameters

w
the child widget to be added
container
the element within which the child will be contained
beforeIndex
the index before which the widget will be added

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