Class FlowPanel

public class FlowPanel
extends ComplexPanel
implements IndexedPanel
A panel that formats its child widgets using the default HTML layout behavior.

Constructors

FlowPanel()Creates an empty flow panel.

Methods

add(Widget)Adds a new child widget to the panel.
getWidget(int)Gets the child widget at the specified index.
getWidgetCount()Gets the number of child widgets in this panel.
getWidgetIndex(Widget)Gets the index of the specified child widget.
remove(int)Removes the widget at the specified index.

Constructor Detail

FlowPanel

public FlowPanel()
Creates an empty flow panel.

Method Detail

add

public void add(Widget w)
Adds a new child widget to the panel.

Parameters

w
the widget to be added

getWidget

public Widget getWidget(int index)
Gets the child widget at the specified index.

Parameters

index
the child widget's index

Return Value

the child widget

getWidgetCount

public int getWidgetCount()
Gets the number of child widgets in this panel.

Return Value

the number of children

getWidgetIndex

public int getWidgetIndex(Widget child)
Gets the index of the specified child widget.

Parameters

child
the widget to be found

Return Value

the widget's index, or -1 if it is not a child of this panel

remove

public boolean remove(int index)
Removes the widget at the specified index.

Parameters

index
the index of the widget to be removed

Return Value

false if the widget is not present