Package org.vaadin.miki.superfields.tabs
Class LambdaTabHandler
java.lang.Object
org.vaadin.miki.superfields.tabs.LambdaTabHandler
- All Implemented Interfaces:
Serializable,TabHandler
Implementation of
TabHandler that relies on lambdas.- Since:
- 2020-04-30
- Author:
- miki
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLambdaTabHandler(String description, com.vaadin.flow.function.SerializableTriConsumer<com.vaadin.flow.component.tabs.Tab, com.vaadin.flow.component.Component, com.vaadin.flow.component.HasComponents> onAdd, com.vaadin.flow.function.SerializableTriConsumer<com.vaadin.flow.component.tabs.Tab, com.vaadin.flow.component.Component, com.vaadin.flow.component.HasComponents> onRemove, com.vaadin.flow.function.SerializableTriConsumer<com.vaadin.flow.component.tabs.Tab, com.vaadin.flow.component.Component, com.vaadin.flow.component.HasComponents> onSelect, com.vaadin.flow.function.SerializableTriConsumer<com.vaadin.flow.component.tabs.Tab, com.vaadin.flow.component.Component, com.vaadin.flow.component.HasComponents> onDeselect) Creates this object with given delegates. -
Method Summary
Modifier and TypeMethodDescriptionvoidtabAdded(com.vaadin.flow.component.tabs.Tab tabHeader, com.vaadin.flow.component.Component tabContents, com.vaadin.flow.component.HasComponents contentsContainer) Called when a tab has been added, but its contents have not.voidtabDeselected(com.vaadin.flow.component.tabs.Tab tabHeader, com.vaadin.flow.component.Component tabContents, com.vaadin.flow.component.HasComponents contentsContainer) Called when a tab has been deselected, but its contents have not yet been updated.voidtabRemoved(com.vaadin.flow.component.tabs.Tab tabHeader, com.vaadin.flow.component.Component tabContents, com.vaadin.flow.component.HasComponents contentsContainer) Called when a tab has been removed, but its contents have not.voidtabSelected(com.vaadin.flow.component.tabs.Tab tabHeader, com.vaadin.flow.component.Component tabContents, com.vaadin.flow.component.HasComponents contentsContainer) Called when a tab has been selected, but its contents have not yet been updated.toString()
-
Constructor Details
-
LambdaTabHandler
public LambdaTabHandler(String description, com.vaadin.flow.function.SerializableTriConsumer<com.vaadin.flow.component.tabs.Tab, com.vaadin.flow.component.Component, com.vaadin.flow.component.HasComponents> onAdd, com.vaadin.flow.function.SerializableTriConsumer<com.vaadin.flow.component.tabs.Tab, com.vaadin.flow.component.Component, com.vaadin.flow.component.HasComponents> onRemove, com.vaadin.flow.function.SerializableTriConsumer<com.vaadin.flow.component.tabs.Tab, com.vaadin.flow.component.Component, com.vaadin.flow.component.HasComponents> onSelect, com.vaadin.flow.function.SerializableTriConsumer<com.vaadin.flow.component.tabs.Tab, com.vaadin.flow.component.Component, com.vaadin.flow.component.HasComponents> onDeselect) Creates this object with given delegates.- Parameters:
description- Description of this handler, used intoString().onAdd- Implementation oftabAdded(Tab, Component, HasComponents).onRemove- Implementation oftabRemoved(Tab, Component, HasComponents).onSelect- Implementation oftabSelected(Tab, Component, HasComponents).onDeselect- Implementation oftabDeselected(Tab, Component, HasComponents).
-
-
Method Details
-
tabAdded
public void tabAdded(com.vaadin.flow.component.tabs.Tab tabHeader, com.vaadin.flow.component.Component tabContents, com.vaadin.flow.component.HasComponents contentsContainer) Description copied from interface:TabHandlerCalled when a tab has been added, but its contents have not.- Specified by:
tabAddedin interfaceTabHandler- Parameters:
tabHeader- Header that was added to the tab headers.tabContents- Contents to be added.contentsContainer- Container with the contents. It also is aComponent.
-
tabRemoved
public void tabRemoved(com.vaadin.flow.component.tabs.Tab tabHeader, com.vaadin.flow.component.Component tabContents, com.vaadin.flow.component.HasComponents contentsContainer) Description copied from interface:TabHandlerCalled when a tab has been removed, but its contents have not.- Specified by:
tabRemovedin interfaceTabHandler- Parameters:
tabHeader- Header that was removed.tabContents- Contents to be removed.contentsContainer- Container with the contents. It also is aComponent.
-
tabSelected
public void tabSelected(com.vaadin.flow.component.tabs.Tab tabHeader, com.vaadin.flow.component.Component tabContents, com.vaadin.flow.component.HasComponents contentsContainer) Description copied from interface:TabHandlerCalled when a tab has been selected, but its contents have not yet been updated.- Specified by:
tabSelectedin interfaceTabHandler- Parameters:
tabHeader- Header that was selected.tabContents- Contents to be selected.contentsContainer- Container with the contents. It also is aComponent.
-
tabDeselected
public void tabDeselected(com.vaadin.flow.component.tabs.Tab tabHeader, com.vaadin.flow.component.Component tabContents, com.vaadin.flow.component.HasComponents contentsContainer) Description copied from interface:TabHandlerCalled when a tab has been deselected, but its contents have not yet been updated.- Specified by:
tabDeselectedin interfaceTabHandler- Parameters:
tabHeader- Header that was deselected.tabContents- Contents to be deselected.contentsContainer- Container with the contents. It also is aComponent.
-
toString
-