Package com.vaadin.classic.v8.ui
Interface SingleComponentContainer
-
- All Superinterfaces:
HasComponents,HasComponents.ComponentAttachDetachNotifier,java.lang.Iterable<com.vaadin.flow.component.Component>,java.io.Serializable
- All Known Implementing Classes:
AbstractSingleComponentContainer,Panel
public interface SingleComponentContainer extends HasComponents, HasComponents.ComponentAttachDetachNotifier
Interface for classic component containers that have one child component and do not support adding or removing components. For component containers that support multiple children, seeComponentContainerinstead.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.classic.v8.ui.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetComponentCount()Gets the number of children thisSingleComponentContainerhas.com.vaadin.flow.component.ComponentgetContent()Gets the content of this container.voidsetContent(com.vaadin.flow.component.Component content)Sets the content of this container.-
Methods inherited from interface com.vaadin.classic.v8.ui.HasComponents
iterator
-
Methods inherited from interface com.vaadin.classic.v8.ui.HasComponents.ComponentAttachDetachNotifier
addComponentAttachListener, addComponentDetachListener
-
-
-
-
Method Detail
-
getComponentCount
int getComponentCount()
Gets the number of children thisSingleComponentContainerhas. This must be symmetric with whatHasComponents.iterator()returns and thus typically return 1 if the content is set, 0 otherwise.- Returns:
- The number of child components this container has.
-
getContent
com.vaadin.flow.component.Component getContent()
Gets the content of this container. The content is a component that serves as the outermost item of the visual contents.- Returns:
- a component to use as content
- See Also:
setContent(Component)
-
setContent
void setContent(com.vaadin.flow.component.Component content)
Sets the content of this container. The content is a component that serves as the outermost item of the visual contents. The content should always be set, either as a constructor parameter or by calling this method.
-
-