public interface HasComponents extends HasElement, HasEnabled
Componentin itself provides basic support for child components that are manually added as children of an element belonging to the component. This interface provides an explicit API for components that explicitly supports adding and removing arbitrary child components.
The default implementations assume that children are attached to
HasElement.getElement(). Override all methods in this interface if the
components should be added to some other element.
|Modifier and Type||Method and Description|
Adds the given components as children of this component.
Removes the given child components from this component.
Removes all contents from this component, this includes child components, text content as well as child elements that have been added directly to this component using the
default void add(Component... components)
components- the components to add
default void remove(Component... components)
components- the components to remove
IllegalArgumentException- if any of the components is not a child of this component
default void removeAll()
ElementAPI. it also removes the children that were added only at the client-side.
Copyright © 2018. All rights reserved.