Class HeaderFooterFieldWrapper<T,H 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.AbstractField<com.vaadin.flow.component.customfield.CustomField<T>,T>
com.vaadin.flow.component.customfield.CustomField<T>
org.vaadin.miki.superfields.layouts.HeaderFooterFieldWrapper<T,H,F>
- Type Parameters:
T- Type of data the field has.H- Type of headerComponent.F- Type of footerComponent.
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.customfield.CustomField<T>>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.Focusable<com.vaadin.flow.component.customfield.CustomField<T>>,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.customfield.CustomField<T>>,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasHelper,com.vaadin.flow.component.HasLabel,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.HasValidation,com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<T>,,T>, T> com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<T>,,T>, T> com.vaadin.flow.component.shared.HasTooltip,com.vaadin.flow.component.shared.HasValidationProperties,Serializable,HasHelperPositionable,HasId,HasIndex,WithHelperMixin<HeaderFooterFieldWrapper<T,,H, F>> WithHelperPositionableMixin<HeaderFooterFieldWrapper<T,,H, F>> WithIdMixin<HeaderFooterFieldWrapper<T,,H, F>> WithIndexMixin<HeaderFooterFieldWrapper<T,,H, F>> WithLabelMixin<HeaderFooterFieldWrapper<T,,H, F>> WithValueMixin<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<T>,,T>, T, HeaderFooterFieldWrapper<T, H, F>> HasFooter<F>,HasHeader<H>,WithFooterComponentsMixin<F,,HeaderFooterFieldWrapper<T, H, F>> WithHeaderComponentsMixin<H,HeaderFooterFieldWrapper<T, H, F>>
public class HeaderFooterFieldWrapper<T,H 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.customfield.CustomField<T>
implements WithLabelMixin<HeaderFooterFieldWrapper<T,H,F>>, WithIdMixin<HeaderFooterFieldWrapper<T,H,F>>, WithHelperMixin<HeaderFooterFieldWrapper<T,H,F>>, WithHelperPositionableMixin<HeaderFooterFieldWrapper<T,H,F>>, WithHeaderComponentsMixin<H,HeaderFooterFieldWrapper<T,H,F>>, WithFooterComponentsMixin<F,HeaderFooterFieldWrapper<T,H,F>>, WithValueMixin<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<T>,T>,T,HeaderFooterFieldWrapper<T,H,F>>, WithIndexMixin<HeaderFooterFieldWrapper<T,H,F>>
A three-part layout (header, field, footer) for any field that itself is a field.
For easier use in collection field it implements
WithIndexMixin and delegates setting index to header and footer components
(and to the field, if it also implements it).- Since:
- 2021-09-03
- Author:
- miki
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V extends Object> Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V extends Object>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>> -
Field Summary
Fields inherited from interface org.vaadin.miki.markers.HasHelperPositionable
HELPER_ABOVE_THEME_VARIANT -
Constructor Summary
ConstructorsConstructorDescriptionHeaderFooterFieldWrapper(Supplier<R> rootSupplier, H header, V field, F footer) Creates the wrapper with given root layout, header, footer and field. -
Method Summary
Modifier and TypeMethodDescriptionprotected TGets the current footer.Gets the current header.intgetIndex()Returns the current index of the object.getLabel()booleanbooleanvoidsetDisablingFooterOnReadOnly(boolean disablingFooterOnReadOnly) voidsetDisablingHeaderOnReadOnly(boolean disablingHeaderOnReadOnly) voidsetHelperComponent(com.vaadin.flow.component.Component component) voidsetHelperText(String helperText) voidsetIndex(int index) Changes the index of the object.voidprotected voidvoidsetReadOnly(boolean readOnly) final HeaderFooterFieldWrapper<T,H, F> withDisablingFooterOnReadOnly(boolean state) final HeaderFooterFieldWrapper<T,H, F> withDisablingHeaderOnReadOnly(boolean state) Methods inherited from class com.vaadin.flow.component.customfield.CustomField
add, addThemeVariants, onAttach, remove, removeThemeVariants, updateValueMethods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, 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.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods 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.HasHelper
getHelperComponent, getHelperTextMethods inherited from interface org.vaadin.miki.markers.HasHelperPositionable
isHelperAbove, setHelperAbove, setHelperAbove, setHelperBelowMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipTextMethods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties
getErrorMessage, isInvalid, setErrorMessage, setInvalidMethods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, setValueMethods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setRequiredIndicatorVisibleMethods 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.WithHelperMixin
withHelperComponent, withHelperTextMethods inherited from interface org.vaadin.miki.markers.WithHelperPositionableMixin
withHelperAbove, withHelperAbove, withHelperBelowMethods inherited from interface org.vaadin.miki.markers.WithIdMixin
withIdMethods inherited from interface org.vaadin.miki.markers.WithIndexMixin
withIndexMethods inherited from interface org.vaadin.miki.markers.WithLabelMixin
withLabelMethods inherited from interface org.vaadin.miki.markers.WithValueMixin
withValue
-
Constructor Details
-
HeaderFooterFieldWrapper
Creates the wrapper with given root layout, header, footer and field.- Type Parameters:
R- Generic type to enforce root layout is aComponentthatHasComponents.V- Generic type to enforce field is aComponentthatHasValueof typeT.- Parameters:
rootSupplier- A provider for the root layout.header- Header to use. If notnull, it will be added to whateverrootSupplierproduces as first component.field- Field to wrap. Must not benull. It will be added to whateverrootSupplier.footer- Footer to use. If notnull, it will be added to whateverrootSupplierproduces after the field.
-
-
Method Details
-
setLabel
- Specified by:
setLabelin interfacecom.vaadin.flow.component.HasLabel- Overrides:
setLabelin classcom.vaadin.flow.component.customfield.CustomField<T>
-
getLabel
- Specified by:
getLabelin interfacecom.vaadin.flow.component.HasLabel- Overrides:
getLabelin classcom.vaadin.flow.component.customfield.CustomField<T>
-
setHelperComponent
public void setHelperComponent(com.vaadin.flow.component.Component component) - Specified by:
setHelperComponentin interfacecom.vaadin.flow.component.HasHelper
-
setHelperText
- Specified by:
setHelperTextin interfacecom.vaadin.flow.component.HasHelper
-
generateModelValue
- Specified by:
generateModelValuein classcom.vaadin.flow.component.customfield.CustomField<T>
-
setPresentationValue
- Specified by:
setPresentationValuein classcom.vaadin.flow.component.customfield.CustomField<T>
-
getHeader
Description copied from interface:HasHeaderGets the current header. -
getIndex
public int getIndex()Description copied from interface:HasIndexReturns the current index of the object. -
setIndex
public void setIndex(int index) Description copied from interface:HasIndexChanges the index of the object. -
setDisablingHeaderOnReadOnly
public void setDisablingHeaderOnReadOnly(boolean disablingHeaderOnReadOnly) -
isDisablingHeaderOnReadOnly
public boolean isDisablingHeaderOnReadOnly() -
withDisablingHeaderOnReadOnly
-
setReadOnly
public void setReadOnly(boolean readOnly) - Specified by:
setReadOnlyin interfacecom.vaadin.flow.component.HasValue<T,H extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents> - Specified by:
setReadOnlyin interfacecom.vaadin.flow.component.HasValueAndElement<T,H extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents>
-