com.google.gwt.user.client.ui

## Class FlowPanel

- java.lang.Object
- - com.google.gwt.user.client.ui.UIObject
  - - com.google.gwt.user.client.ui.Widget
    - - com.google.gwt.user.client.ui.Panel
      - - com.google.gwt.user.client.ui.ComplexPanel
        - - com.google.gwt.user.client.ui.FlowPanel

All Implemented Interfaces:
  HasAttachHandlers, HasHandlers, EventListener, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, InsertPanel, InsertPanel.ForIsWidget, IsWidget, java.lang.Iterable<Widget>

    public class FlowPanel
    extends ComplexPanel
    implements InsertPanel.ForIsWidget

A panel that formats its child widgets using the default HTML layout behavior.

### Nested Class Summary

### Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

`UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled`

### Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel

`InsertPanel.ForIsWidget`

### Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets

`HasWidgets.ForIsWidget`

### Field Summary

### Fields inherited from class com.google.gwt.user.client.ui.Widget

`eventsToSink`

### Fields inherited from class com.google.gwt.user.client.ui.UIObject

`DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR`

### Constructor Summary

Constructors
Constructor and Description
`FlowPanel()` Creates an empty flow panel.
`FlowPanel(java.lang.String tag)` Creates an empty flow panel with a custom tag.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add(Widget w)` Adds a new child widget to the panel.
`void` `clear()` Removes all child widgets.
`void` `insert(IsWidget w, int beforeIndex)`
`void` `insert(Widget w, int beforeIndex)` Inserts a widget before the specified index.

### Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel

`add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, doLogicalClear, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove`

### Methods inherited from class com.google.gwt.user.client.ui.Panel

`add, adopt, doAttachChildren, doDetachChildren, orphan, remove`

### Methods inherited from class com.google.gwt.user.client.ui.Widget

`addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents, unsinkEvents`

### 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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget

`add`

### Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget

`getWidgetIndex`

### Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel

`getWidget, getWidgetCount, getWidgetIndex, remove`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Constructor Detail

#### FlowPanel

    public FlowPanel()

Creates an empty flow panel.

#### FlowPanel

    public FlowPanel(java.lang.String tag)

Creates an empty flow panel with a custom tag.

### Method Detail

#### add

    public void add(Widget w)

Adds a new child widget to the panel.

Specified by:
  `add` in interface `HasWidgets`
Specified by:
  `add` in interface `InsertPanel`
Overrides:
  `add` in class `Panel`
Parameters:
  `w` - the widget to be added
See Also:
  `HasWidgets.add(Widget)`

#### clear

    public void clear()

Description copied from interface: `HasWidgets`
Removes all child widgets.

Specified by:
  `clear` in interface `HasWidgets`
Overrides:
  `clear` in class `Panel`

#### insert

    public void insert(IsWidget w,
                       int beforeIndex)

Specified by:
  `insert` in interface `InsertPanel.ForIsWidget`

#### insert

    public void insert(Widget w,
                       int beforeIndex)

Inserts a widget before the specified index.

Specified by:
  `insert` in interface `InsertPanel`
Parameters:
  `w` - the widget to be inserted
  `beforeIndex` - the index before which it will be inserted
Throws:
  `java.lang.IndexOutOfBoundsException` - if `beforeIndex` is out of range