A
Container
that lays out its children using a
Layout
. Layouts are responsible for connecting the child components to the container. Layouts are very flexible as they can create any internal element structure, inserting its child components at any location. For example, a TableLayout lays out its children using HTML tables.
Many layouts support layout data which are configurable objects that provide additional information to the layout. These objects can be passed when adding and inserting child components into the container. Each layout will document if and what layout data it supports. Code snippet:
LayoutContainer container = new LayoutContainer(); container.add(new Button("Click Me")); container.setSize(300, 300); container.setBorders(true); RootPanel.get().add(container);
{@link FlowLayout} is the the default layout and will be used if not a layoutis not specified. You must size/position containers unless they are in an existing container that lays out its children.
- Events:
- AfterLayout : ContainerEvent(container)
Fires when the widgets in this container are arranged by the associated layout.
- Inherited Events:
- ScrollContainer Scroll
- Container BeforeAdd
- Container Add
- Container BeforeRemove
- Container Remove
- BoxComponent Move
- BoxComponent Resize
- Component Enable
- Component Disable
- Component BeforeHide
- Component Hide
- Component BeforeShow
- Component Show
- Component Attach
- Component Detach
- Component BeforeRender
- Component Render
- Component BrowserEvent
- Component BeforeStateRestore
- Component StateRestore
- Component BeforeStateSave
- Component SaveState
@see Layout