T - Type of data the field has.H - Type of header Component.F - Type of footer Component.@Tag(value="header-footer-field-wrapper") @JsModule(value="./header-footer-field-wrapper.js") 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>>
WithIndexMixin and delegates setting index to header and footer components
(and to the field, if it also implements it).com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>HELPER_ABOVE_THEME_VARIANT| Constructor and Description |
|---|
HeaderFooterFieldWrapper(Supplier<R> rootSupplier,
H header,
V field,
F footer)
Creates the wrapper with given root layout, header, footer and field.
|
| Modifier and Type | Method and Description |
|---|---|
protected T |
generateModelValue() |
Optional<F> |
getFooter()
Gets the current footer.
|
Optional<H> |
getHeader()
Gets the current header.
|
int |
getIndex()
Returns the current index of the object.
|
String |
getLabel() |
boolean |
isDisablingFooterOnReadOnly() |
boolean |
isDisablingHeaderOnReadOnly() |
void |
setDisablingFooterOnReadOnly(boolean disablingFooterOnReadOnly) |
void |
setDisablingHeaderOnReadOnly(boolean disablingHeaderOnReadOnly) |
void |
setHelperComponent(com.vaadin.flow.component.Component component) |
void |
setHelperText(String helperText) |
void |
setIndex(int index)
Changes the index of the object.
|
void |
setLabel(String label) |
protected void |
setPresentationValue(T t) |
void |
setReadOnly(boolean readOnly) |
HeaderFooterFieldWrapper<T,H,F> |
withDisablingFooterOnReadOnly(boolean state) |
HeaderFooterFieldWrapper<T,H,F> |
withDisablingHeaderOnReadOnly(boolean state) |
add, getErrorMessage, isInvalid, remove, setErrorMessage, setInvalid, updateValueaddValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwithLabelwithIdwithHelperComponent, withHelperTextgetHelperComponent, getHelperTextwithHelperAbove, withHelperAbove, withHelperBelowisHelperAbove, setHelperAbove, setHelperAbove, setHelperBelowwithHeaderComponentswithFooterComponentswithValueaddValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, isReadOnly, isRequiredIndicatorVisible, setRequiredIndicatorVisible, setValuewithIndexgetCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFulladdFocusShortcut, blur, focus, getTabIndex, setTabIndexpublic HeaderFooterFieldWrapper(Supplier<R> rootSupplier, H header, V field, F footer)
R - Generic type to enforce root layout is a Component that HasComponents.V - Generic type to enforce field is a Component that HasValue of type T.rootSupplier - A provider for the root layout.header - Header to use. If not null, it will be added to whatever rootSupplier produces as first component.field - Field to wrap. Must not be null. It will be added to whatever rootSupplier.footer - Footer to use. If not null, it will be added to whatever rootSupplier produces after the field.public void setLabel(String label)
setLabel in interface com.vaadin.flow.component.HasLabelsetLabel in class com.vaadin.flow.component.customfield.CustomField<T>public String getLabel()
getLabel in interface com.vaadin.flow.component.HasLabelgetLabel in class com.vaadin.flow.component.customfield.CustomField<T>public void setHelperComponent(com.vaadin.flow.component.Component component)
setHelperComponent in interface com.vaadin.flow.component.HasHelperpublic void setHelperText(String helperText)
setHelperText in interface com.vaadin.flow.component.HasHelperprotected T generateModelValue()
generateModelValue in class com.vaadin.flow.component.customfield.CustomField<T>protected void setPresentationValue(T t)
setPresentationValue in class com.vaadin.flow.component.customfield.CustomField<T>public Optional<F> getFooter()
HasFooterpublic Optional<H> getHeader()
HasHeaderpublic int getIndex()
HasIndexpublic void setIndex(int index)
HasIndexpublic void setDisablingFooterOnReadOnly(boolean disablingFooterOnReadOnly)
public boolean isDisablingFooterOnReadOnly()
public final HeaderFooterFieldWrapper<T,H,F> withDisablingFooterOnReadOnly(boolean state)
public void setDisablingHeaderOnReadOnly(boolean disablingHeaderOnReadOnly)
public boolean isDisablingHeaderOnReadOnly()
public final HeaderFooterFieldWrapper<T,H,F> withDisablingHeaderOnReadOnly(boolean state)
public void setReadOnly(boolean readOnly)
setReadOnly in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<T>,T>,T>setReadOnly in interface com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<T>,T>,T>Copyright © 2024 Miki. All rights reserved.