Class HeaderFooterLayoutWrapper<R extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents,H extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents,B extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<R>
org.vaadin.miki.superfields.layouts.HeaderFooterLayoutWrapper<R,H,B,F>
- Type Parameters:
R- Root layout of the component. Obtainable fromComposite.getContent().H- Header layout. Obtainable fromgetHeader().B- Body layout.F- Footer layout. Obtainable fromgetFooter().
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasStyle,Serializable,Iterable<com.vaadin.flow.component.Component>,HasId,HasReadOnly,WithIdMixin<HeaderFooterLayoutWrapper<R,,H, B, F>> HasFooter<F>,HasHeader<H>,WithFooterComponentsMixin<F,,HeaderFooterLayoutWrapper<R, H, B, F>> WithHeaderComponentsMixin<H,HeaderFooterLayoutWrapper<R, H, B, F>>
public class HeaderFooterLayoutWrapper<R extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents,H extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents,B extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents>
extends com.vaadin.flow.component.Composite<R>
implements com.vaadin.flow.component.HasComponents, Iterable<com.vaadin.flow.component.Component>, WithHeaderComponentsMixin<H,HeaderFooterLayoutWrapper<R,H,B,F>>, WithIdMixin<HeaderFooterLayoutWrapper<R,H,B,F>>, WithFooterComponentsMixin<F,HeaderFooterLayoutWrapper<R,H,B,F>>, HasReadOnly
A wrapper for a typical header-body-footer layout that exposes header and footer, and delegates all
methods from
HasComponents to the body. In other words, it allows using predefined layouts.
This component is Iterable over the Components contained in the body.
Similarly, getComponents() ()} returns Components things put in the body.- Since:
- 2021-09-03
- Author:
- miki
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(com.vaadin.flow.component.Component... components) voidaddComponentAtIndex(int index, com.vaadin.flow.component.Component component) getBody()Returns the body of this component.Stream<com.vaadin.flow.component.Component>Returns components contained in the body.Gets the current footer.Gets the current header.protected RbooleanChecks whether this object is in read-only mode.Iterator<com.vaadin.flow.component.Component>iterator()voidremove(com.vaadin.flow.component.Component... components) voidvoidsetReadOnly(boolean readOnly) Sets the new read-only state.Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasComponents
add, add, addComponentAsFirst, removeMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.vaadin.miki.superfields.layouts.WithFooterComponentsMixin
withFooterComponentsMethods inherited from interface org.vaadin.miki.superfields.layouts.WithHeaderComponentsMixin
withHeaderComponentsMethods inherited from interface org.vaadin.miki.markers.WithIdMixin
withId
-
Constructor Details
-
HeaderFooterLayoutWrapper
Creates the layout.- Parameters:
rootSupplier- Callback to create root layout.header,body, andfooterwill all be added to it.header- Header.body- Body.footer- Footer.
-
-
Method Details
-
initContent
- Overrides:
initContentin classcom.vaadin.flow.component.Composite<R extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents>
-
add
public void add(com.vaadin.flow.component.Component... components) - Specified by:
addin interfacecom.vaadin.flow.component.HasComponents
-
addComponentAtIndex
public void addComponentAtIndex(int index, com.vaadin.flow.component.Component component) - Specified by:
addComponentAtIndexin interfacecom.vaadin.flow.component.HasComponents
-
removeAll
public void removeAll()- Specified by:
removeAllin interfacecom.vaadin.flow.component.HasComponents
-
remove
public void remove(com.vaadin.flow.component.Component... components) - Specified by:
removein interfacecom.vaadin.flow.component.HasComponents
-
getHeader
Description copied from interface:HasHeaderGets the current header. -
iterator
-
getBody
Returns the body of this component.- Returns:
- Body.
-
getComponents
Returns components contained in the body.- Returns:
- A
Streamwith components contained in the body. - See Also:
-
iterator()Composite.getChildren()
-
setReadOnly
public void setReadOnly(boolean readOnly) Description copied from interface:HasReadOnlySets the new read-only state.- Specified by:
setReadOnlyin interfaceHasReadOnly- Parameters:
readOnly- Whether the object should be in read-only mode.
-
isReadOnly
public boolean isReadOnly()Description copied from interface:HasReadOnlyChecks whether this object is in read-only mode.- Specified by:
isReadOnlyin interfaceHasReadOnly- Returns:
- Whether the object is in read-only mode.
-