Package com.storedobject.vaadin
Class ContentWithHeader
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
com.storedobject.vaadin.ContentWithHeader
- All Implemented Interfaces:
HasSize,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,Serializable
public class ContentWithHeader
extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
implements HasSize
A simple layout with a "header" portion and a scrollable "body" portion. The "header" portion will stick to the top.
- Author:
- Syam
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.ContentWithHeader(com.vaadin.flow.component.Component header, com.vaadin.flow.component.Component body) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.ComponentgetBody()Get theComponentfrom the body portion.com.vaadin.flow.component.ComponentGet theButtonLayoutfrom the header portion.protected com.vaadin.flow.component.html.DivvoidsetBody(com.vaadin.flow.component.Component body) Set the body portion.voidsetHeader(com.vaadin.flow.component.Component header) Set the header portion.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.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
ContentWithHeader
public ContentWithHeader()Constructor. -
ContentWithHeader
public ContentWithHeader(com.vaadin.flow.component.Component header, com.vaadin.flow.component.Component body) Constructor.- Parameters:
header- Header portionbody- Body portion
-
-
Method Details
-
initContent
protected com.vaadin.flow.component.html.Div initContent()- Overrides:
initContentin classcom.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
-
setHeader
public void setHeader(com.vaadin.flow.component.Component header) Set the header portion.- Parameters:
header- Component to set as the header portion.
-
getHeader
public com.vaadin.flow.component.Component getHeader()Get theButtonLayoutfrom the header portion.- Returns:
- The header.
-
getBody
public com.vaadin.flow.component.Component getBody()Get theComponentfrom the body portion.- Returns:
- The body.
-
setBody
public void setBody(com.vaadin.flow.component.Component body) Set the body portion.- Parameters:
body- Component to set as the body portion
-