Interface ComponentContainer

Extension to the com.itmill.toolkit.ui.Component interface which adds to it the capacity to contain other components. All UI elements that can have child elements implement this interface.

Synopsis

Since

3.0

Inheritance Path.  com.itmill.toolkit.ui.ComponentContainer

addComponent(Component)

Parameters

c

the component to be added

Adds a component into this container.

addListener(ComponentContainer.ComponentAttachListener)

Listen component attach events

addListener(ComponentContainer.ComponentDetachListener)

Listen component detach events

getComponentIterator()

Parameters

return

component iterator

Gets an iterator to the collection of contained components. Using this iterator it is possible to step through all components contained in this container.

moveComponentsFrom(ComponentContainer)

Parameters

source

the container which contains the components that are to be moved to this container

Moves all components from an another container into this container. The components are removed from source .

removeAllComponents()

Removes all components from this container.

removeComponent(Component)

Parameters

c

the component to be added

Removes a component from this container.

removeListener(ComponentContainer.ComponentAttachListener)

Stop listening component attach events

removeListener(ComponentContainer.ComponentDetachListener)

Stop listening component detach events

replaceComponent(Component, Component)

Parameters

oldComponent

The old component that will be replaced.

newComponent

The new component to be replaced

Replace a component in the container with another one without changing position.

This method replaces component with another one is such way that the new component overtakes the position of the old component. If the old component is not in the container, the new component is added to the container. If the both component are already in the container, their positions are swapped. Component attach and detach events should be taken care as with add and remove.