public abstract class AbstractComponentContainer extends AbstractComponent implements ComponentContainer
AbstractComponent
that defines the default
implementation for the methods in ComponentContainer
. Basic UI
components that need to contain other components inherit this class to easily
qualify as a component container.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
DESIGN_ATTR_PLAIN_TEXT
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
Constructor and Description |
---|
AbstractComponentContainer()
Constructs a new component container.
|
Modifier and Type | Method and Description |
---|---|
void |
addComponent(Component c)
This only implements the events and component parent calls.
|
void |
addComponentAttachListener(HasComponents.ComponentAttachListener listener)
Listens the component attach events.
|
void |
addComponentDetachListener(HasComponents.ComponentDetachListener listener)
Listens the component detach events.
|
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(com.vaadin.ui.ComponentContainer.ComponentAttachListener) |
void |
addListener(HasComponents.ComponentDetachListener listener)
Deprecated.
As of 7.0, replaced by
#addComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener) |
protected void |
fireComponentAttachEvent(Component component)
Fires the component attached event.
|
protected void |
fireComponentDetachEvent(Component component)
Fires the component detached event.
|
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 the container.
|
void |
removeComponent(Component c)
This only implements the events and component parent calls.
|
void |
removeComponentAttachListener(HasComponents.ComponentAttachListener listener)
Stops the listening component attach events.
|
void |
removeComponentDetachListener(HasComponents.ComponentDetachListener listener)
Stops the listening component detach events.
|
void |
removeListener(HasComponents.ComponentAttachListener listener)
Deprecated.
As of 7.0, replaced by
#removeComponentAttachListener(com.vaadin.ui.ComponentContainer.ComponentAttachListener) |
void |
removeListener(HasComponents.ComponentDetachListener listener)
Deprecated.
As of 7.0, replaced by
#removeComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener) |
void |
setHeight(float height,
Sizeable.Unit unit)
Sets the height of the object.
|
void |
setWidth(float width,
Sizeable.Unit unit)
Sets the width of the object.
|
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getState, getState, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isResponsive, isVisible, readDesign, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefined, writeDesign
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getComponentCount, replaceComponent
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, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidthUndefined
forEach, spliterator
public AbstractComponentContainer()
public void addComponents(Component... components)
ComponentContainer
addComponents
in interface ComponentContainer
components
- The components to add.public void removeAllComponents()
removeAllComponents
in interface ComponentContainer
public void moveComponentsFrom(ComponentContainer source)
ComponentContainer
source
.moveComponentsFrom
in interface ComponentContainer
source
- the container which contains the components that are to be
moved to this container.public void addComponentAttachListener(HasComponents.ComponentAttachListener listener)
HasComponents.ComponentAttachDetachNotifier
addComponentAttachListener
in interface HasComponents.ComponentAttachDetachNotifier
listener
- the listener to add.@Deprecated public void addListener(HasComponents.ComponentAttachListener listener)
#addComponentAttachListener(com.vaadin.ui.ComponentContainer.ComponentAttachListener)
addListener
in interface ComponentContainer
public void removeComponentAttachListener(HasComponents.ComponentAttachListener listener)
HasComponents.ComponentAttachDetachNotifier
removeComponentAttachListener
in interface HasComponents.ComponentAttachDetachNotifier
listener
- the listener to removed.@Deprecated public void addListener(HasComponents.ComponentDetachListener listener)
#addComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener)
addListener
in interface ComponentContainer
public void addComponentDetachListener(HasComponents.ComponentDetachListener listener)
HasComponents.ComponentAttachDetachNotifier
addComponentDetachListener
in interface HasComponents.ComponentAttachDetachNotifier
@Deprecated public void removeListener(HasComponents.ComponentAttachListener listener)
#removeComponentAttachListener(com.vaadin.ui.ComponentContainer.ComponentAttachListener)
removeListener
in interface ComponentContainer
public void removeComponentDetachListener(HasComponents.ComponentDetachListener listener)
HasComponents.ComponentAttachDetachNotifier
removeComponentDetachListener
in interface HasComponents.ComponentAttachDetachNotifier
@Deprecated public void removeListener(HasComponents.ComponentDetachListener listener)
#removeComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener)
removeListener
in interface ComponentContainer
protected void fireComponentAttachEvent(Component component)
component
- the component that has been added to this container.protected void fireComponentDetachEvent(Component component)
component
- the component that has been removed from this container.public void addComponent(Component c)
addComponent
in interface ComponentContainer
c
- the component to be added.ComponentContainer.addComponent(Component)
public void removeComponent(Component c)
removeComponent
in interface ComponentContainer
c
- the component to be removed.ComponentContainer.removeComponent(Component)
public void setWidth(float width, Sizeable.Unit unit)
Sizeable
setWidth
in interface Sizeable
setWidth
in class AbstractComponent
width
- the width of the object.unit
- the unit used for the width.public void setHeight(float height, Sizeable.Unit unit)
Sizeable
setHeight
in interface Sizeable
setHeight
in class AbstractComponent
height
- the height of the object.unit
- the unit used for the width.@Deprecated public Iterator<Component> getComponentIterator()
HasComponents.iterator()
instead.getComponentIterator
in interface ComponentContainer
Copyright © 2016 Vaadin Ltd. All rights reserved.