Package com.vaadin.flow.component
Interface HasComponents
- All Superinterfaces:
HasComponentsOfType<Component>,HasElement,HasEnabled,Serializable
- All Known Subinterfaces:
FlexComponent,HasItemComponents<T>,HasItemsAndComponents<T>,HasOrderedComponents
- All Known Implementing Classes:
Abbr,AccordionPanel,Anchor,Article,Aside,Board,Card,CheckboxGroup,Code,ConfirmDialog,DescriptionList,DescriptionList.Description,DescriptionList.Term,Details,Dialog,Dialog.DialogFooter,Dialog.DialogHeader,Div,Emphasis,FieldSet,FieldSet.Legend,FlexLayout,Footer,FormLayout,FormLayout.FormItem,FormLayout.FormRow,GridMenuItem,H1,H2,H3,H4,H5,H6,Header,HorizontalLayout,HtmlContainer,HtmlObject,Image,ListBox,ListBoxBase,ListItem,Main,MenuItem,MenuItemBase,MultiSelectListBox,NativeButton,NativeDetails.Summary,NativeLabel,NativeTable,NativeTableBody,NativeTableCaption,NativeTableCell,NativeTableFooter,NativeTableHeader,NativeTableHeaderCell,NativeTableRow,Nav,Notification,OrderedList,Paragraph,Popover,Pre,RouterLink,Row,Section,Select,Span,Tab,UI,UnorderedList,VerticalLayout,WebComponentUI
A component to which the user can add and remove child components.
Component in 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 support
adding and removing arbitrary child components.
HasComponents is generally implemented by layouts or components whose
primary function is to host child components. It isn't, for example,
implemented by non-layout components such as fields.
This interface is equivalent to HasComponentsOfType<Component>; if
the container should only accept a restricted set of child component types,
implement HasComponentsOfType directly with that type instead.
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.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Method Summary
Methods inherited from interface com.vaadin.flow.component.HasComponentsOfType
add, add, addComponentAsFirst, addComponentAtIndex, bindChildren, getChildren, getComponentAt, getComponentCount, indexOf, remove, remove, removeAll, replaceMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
bindEnabled, isEnabled, setEnabled
-
Method Details
-
add
Add the given text as a child of this component.- Parameters:
text- the text to add, notnull
-