public interface ComponentContainer extends HasComponents, HasComponents.ComponentAttachDetachNotifier
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
Sizeable.Unit
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
Modifier and Type | Method and 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.
As of 7.0, replaced by
#addComponentAttachListener(ComponentAttachListener) |
void |
addListener(HasComponents.ComponentDetachListener listener)
Deprecated.
As of 7.0, replaced by
#addComponentDetachListener(ComponentDetachListener) |
int |
getComponentCount()
Gets the number of children this
ComponentContainer has. |
Iterator<Component> |
getComponentIterator()
Deprecated.
As of 7.0, use
HasComponents.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.
As of 7.0, replaced by
#removeComponentAttachListener(ComponentAttachListener) |
void |
removeListener(HasComponents.ComponentDetachListener listener)
Deprecated.
As of 7.0, replaced by
#removeComponentDetachListener(ComponentDetachListener) |
void |
replaceComponent(Component oldComponent,
Component newComponent)
Replaces the component in the container with another one without changing
position.
|
iterator
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
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getConnectorId
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
forEach, spliterator
addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListener
void addComponent(Component c)
c
- the component to be added.void addComponents(Component... components)
components
- The components to add.void removeComponent(Component c)
c
- the component to be removed.void removeAllComponents()
void replaceComponent(Component oldComponent, Component newComponent)
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.
oldComponent
- the old component that will be replaced.newComponent
- the new component to be replaced.@Deprecated Iterator<Component> getComponentIterator()
HasComponents.iterator()
instead.int getComponentCount()
ComponentContainer
has. This
must be symmetric with what getComponentIterator()
returns.void moveComponentsFrom(ComponentContainer source)
source
.source
- the container which contains the components that are to be
moved to this container.@Deprecated void addListener(HasComponents.ComponentAttachListener listener)
#addComponentAttachListener(ComponentAttachListener)
@Deprecated void removeListener(HasComponents.ComponentAttachListener listener)
#removeComponentAttachListener(ComponentAttachListener)
@Deprecated void addListener(HasComponents.ComponentDetachListener listener)
#addComponentDetachListener(ComponentDetachListener)
@Deprecated void removeListener(HasComponents.ComponentDetachListener listener)
#removeComponentDetachListener(ComponentDetachListener)
Copyright © 2019 Vaadin Ltd. All rights reserved.