Package com.vaadin.ui
Interface ComponentContainer
-
- All Superinterfaces:
ClientConnector
,Component
,Connector
,HasComponents
,HasComponents.ComponentAttachDetachNotifier
,Iterable<Component>
,Serializable
,Sizeable
- All Known Subinterfaces:
Layout
- All Known Implementing Classes:
AbsoluteLayout
,AbstractComponentContainer
,AbstractLayout
,AbstractOrderedLayout
,AbstractSplitPanel
,Accordion
,ColorPickerPreview
,CssLayout
,CustomLayout
,FormLayout
,GridLayout
,HorizontalLayout
,HorizontalSplitPanel
,Navigator.EmptyView
,TabSheet
,VerticalLayout
,VerticalSplitPanel
public interface ComponentContainer extends HasComponents, HasComponents.ComponentAttachDetachNotifier
A special type of parent which allows the user to add and remove components to it. Typically does not have any restrictions on the number of children it can contain.- Since:
- 3.0
- Author:
- Vaadin Ltd.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
-
-
Field Summary
-
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addComponent(Component c)
Adds the component into this container.void
addComponents(Component... components)
Adds the components in the given order to this component container.void
addListener(HasComponents.ComponentAttachListener listener)
Deprecated.void
addListener(HasComponents.ComponentDetachListener listener)
Deprecated.int
getComponentCount()
Gets the number of children thisComponentContainer
has.Iterator<Component>
getComponentIterator()
Deprecated.As of 7.0, useHasComponents.iterator()
instead.void
moveComponentsFrom(ComponentContainer source)
Moves all components from an another container into this container.void
removeAllComponents()
Removes all components from this container.void
removeComponent(Component c)
Removes the component from this container.void
removeListener(HasComponents.ComponentAttachListener listener)
Deprecated.void
removeListener(HasComponents.ComponentDetachListener listener)
Deprecated.void
replaceComponent(Component oldComponent, Component newComponent)
Replaces the component in the container with another one without changing position.-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, readDesign, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible, writeDesign
-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
Methods inherited from interface com.vaadin.ui.HasComponents
iterator
-
Methods inherited from interface com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier
addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListener
-
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
-
-
-
-
Method Detail
-
addComponent
void addComponent(Component c)
Adds the component into this container.- Parameters:
c
- the component to be added.
-
addComponents
void addComponents(Component... components)
Adds the components in the given order to this component container.- Parameters:
components
- The components to add.
-
removeComponent
void removeComponent(Component c)
Removes the component from this container.- Parameters:
c
- the component to be removed.
-
removeAllComponents
void removeAllComponents()
Removes all components from this container.
-
replaceComponent
void replaceComponent(Component oldComponent, Component newComponent)
Replaces the 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.
- Parameters:
oldComponent
- the old component that will be replaced.newComponent
- the new component to be replaced.
-
getComponentIterator
@Deprecated Iterator<Component> getComponentIterator()
Deprecated.As of 7.0, useHasComponents.iterator()
instead.Gets an iterator to the collection of contained components. Using this iterator it is possible to step through all components contained in this container.- Returns:
- the component iterator.
-
getComponentCount
int getComponentCount()
Gets the number of children thisComponentContainer
has. This must be symmetric with whatgetComponentIterator()
returns.- Returns:
- The number of child components this container has.
- Since:
- 7.0.0
-
moveComponentsFrom
void moveComponentsFrom(ComponentContainer source)
Moves all components from an another container into this container. The components are removed fromsource
.- Parameters:
source
- the container which contains the components that are to be moved to this container.
-
addListener
@Deprecated void addListener(HasComponents.ComponentAttachListener listener)
Deprecated.
-
removeListener
@Deprecated void removeListener(HasComponents.ComponentAttachListener listener)
Deprecated.
-
addListener
@Deprecated void addListener(HasComponents.ComponentDetachListener listener)
Deprecated.
-
removeListener
@Deprecated void removeListener(HasComponents.ComponentDetachListener listener)
Deprecated.
-
-