Class AbstractLayout
java.lang.Object
com.vaadin.featurepack.desktop.layouts.AbstractLayout
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponent(com.vaadin.flow.component.Component component) Should be called when a component is added to the container.Stream<com.vaadin.flow.component.Component> Gets the components in the container.abstract ObjectgetConstraints(com.vaadin.flow.component.Component component) Gets the constraints for the given component.com.vaadin.flow.component.ComponentGets the container for this layout.protected voidonContainerAttach(com.vaadin.flow.component.AttachEvent event) Called when the container is attached to a UI.protected voidonContainerDetach(com.vaadin.flow.component.DetachEvent event) Called when the container is detached from a UI.voidremoveComponent(com.vaadin.flow.component.Component component) Should be called when a component is removed from the container.abstract voidsetConstraints(com.vaadin.flow.component.Component component, Object constraints) Sets the constraints for the given component.voidsetContainer(com.vaadin.flow.component.Component container) Sets the container for this layout.
-
Constructor Details
-
AbstractLayout
public AbstractLayout()
-
-
Method Details
-
setContainer
public void setContainer(com.vaadin.flow.component.Component container) Sets the container for this layout.- Parameters:
container-
-
onContainerAttach
protected void onContainerAttach(com.vaadin.flow.component.AttachEvent event) Called when the container is attached to a UI.- Parameters:
event-
-
onContainerDetach
protected void onContainerDetach(com.vaadin.flow.component.DetachEvent event) Called when the container is detached from a UI.- Parameters:
event-
-
addComponent
public void addComponent(com.vaadin.flow.component.Component component) Should be called when a component is added to the container.- Parameters:
component- the component to add, notnull
-
removeComponent
public void removeComponent(com.vaadin.flow.component.Component component) Should be called when a component is removed from the container.- Parameters:
component- the component to remove, notnull
-
getContainer
public com.vaadin.flow.component.Component getContainer()Gets the container for this layout.- Returns:
- the container or
nullif no container is set
-
getComponents
Gets the components in the container.- Returns:
-
setConstraints
public abstract void setConstraints(com.vaadin.flow.component.Component component, Object constraints) Sets the constraints for the given component.- Parameters:
component- the component to set constraints forconstraints- the constraints object
-
getConstraints
Gets the constraints for the given component.- Parameters:
component- the component to get constraints for- Returns:
- the constraints object
-