public class CollectionComponentProviders extends Object
CollectionComponentProvider and subclasses.| Modifier and Type | Method and Description |
|---|---|
static CollectionComponentProvider<com.vaadin.flow.component.button.Button> |
addFirstButton(String text)
A
CollectionComponentProvider that produces a Button that adds an element to the collection by calling CollectionController.add(int) with 0 as parameter. |
static CollectionComponentProvider<com.vaadin.flow.component.button.Button> |
addLastButton(String text)
A
CollectionComponentProvider that produces a Button that adds an element to the collection by calling CollectionController.add(). |
static CollectionLayoutProvider<HeaderFooterLayoutWrapper<com.vaadin.flow.component.orderedlayout.FlexLayout,com.vaadin.flow.component.orderedlayout.FlexLayout,com.vaadin.flow.component.orderedlayout.FlexLayout,com.vaadin.flow.component.orderedlayout.FlexLayout>> |
columnWithHeaderAndFooterRows(Collection<CollectionComponentProvider<?>> headerComponents,
Collection<CollectionComponentProvider<?>> footerComponents)
|
static <T,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,T>> |
columnWithHeaderAndFooterRows(CollectionValueComponentProvider<T,F> inner,
Collection<CollectionComponentProvider<?>> headerComponents,
Collection<CollectionComponentProvider<?>> footerComponents)
A
CollectionValueComponentProvider for a column-based HeaderFooterFieldWrapper where header and footer are row-based FlexLayouts. |
static <T,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,T> & com.vaadin.flow.component.HasLabel> |
labelledField(Supplier<F> fieldSupplier,
String label)
Returns a
CollectionValueComponentProvider that generates a given field and sets its label. |
static <K,V,C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,K>,W extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,V>> |
mapEntryField(com.vaadin.flow.function.SerializableSupplier<C> keyComponentSupplier,
com.vaadin.flow.function.SerializableSupplier<W> valueComponentSupplier)
A
CollectionValueComponentProvider that produces a MapEntryField with given key and value suppliers. |
static <K,V,C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasLabel & com.vaadin.flow.component.HasValue<?,K>,W extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasLabel & com.vaadin.flow.component.HasValue<?,V>> |
mapEntryField(String keyLabel,
com.vaadin.flow.function.SerializableSupplier<C> keyComponentSupplier,
String valueLabel,
com.vaadin.flow.function.SerializableSupplier<W> valueComponentSupplier)
A
CollectionValueComponentProvider that produces a MapEntryField with given key and value suppliers, but also sets labels to both produced components.. |
static CollectionComponentProvider<com.vaadin.flow.component.button.Button> |
removeAllButton(String text)
A
CollectionComponentProvider that produces a Button that clears the collection by calling CollectionController.removeAll(). |
static CollectionComponentProvider<IndexedButton> |
removeButton(String text)
A
CollectionComponentProvider that produces an IndexedButton that removes a given element from the collection by calling CollectionController.remove(int). |
static <T,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,T>> |
row(CollectionValueComponentProvider<T,F> inner,
Collection<CollectionComponentProvider<?>> headerComponents,
Collection<CollectionComponentProvider<?>> footerComponents)
A
CollectionValueComponentProvider that wraps given field with a layout containing header and footer. |
static <T,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,T>> |
rowWithRemoveButtonFirst(CollectionValueComponentProvider<T,F> inner,
String removeButtonText)
A
CollectionValueComponentProvider that wraps given field with a layout containing a header and footer. |
static <T,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,T>> |
rowWithRemoveButtonLast(CollectionValueComponentProvider<T,F> inner,
String removeButtonText)
A
CollectionValueComponentProvider that wraps given field with a layout containing a header and footer. |
static SuperTextArea |
textArea(int index,
CollectionController controller)
Produces plain text area.
|
static SuperTextField |
textField(int index,
CollectionController controller)
Produces plain text field.
|
public static SuperTextField textField(int index, CollectionController controller)
CollectionValueComponentProvider.index - Index.controller - Controller.SuperTextField.public static SuperTextArea textArea(int index, CollectionController controller)
CollectionValueComponentProvider.index - Index.controller - Controller.SuperTextArea.public static <T,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,T> & com.vaadin.flow.component.HasLabel> CollectionValueComponentProvider<T,F> labelledField(Supplier<F> fieldSupplier, String label)
CollectionValueComponentProvider that generates a given field and sets its label.T - Type of data.F - Type of component to display the data.fieldSupplier - Field supplier.label - Label to use. String.format(label, index) will be applied, so any %d will be replaced with an index.CollectionValueComponentProvider that generates given field and sets its label.public static <T,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,T>> CollectionValueComponentProvider<T,HeaderFooterFieldWrapper<T,com.vaadin.flow.component.orderedlayout.FlexLayout,com.vaadin.flow.component.orderedlayout.FlexLayout>> row(CollectionValueComponentProvider<T,F> inner, Collection<CollectionComponentProvider<?>> headerComponents, Collection<CollectionComponentProvider<?>> footerComponents)
CollectionValueComponentProvider that wraps given field with a layout containing header and footer.
The wrapper is row-aligned, with header and footer being column-based.
None of the parameters may ever be null.T - Type of the value.F - Type of the field used to show the value.inner - Inner field generator.headerComponents - A collection of generators for components to appear in the header.footerComponents - A collection of generators for components to appear in the footer.CollectionValueComponentProvider that generates a HeaderFooterFieldWrapper with a given field, header and footer.public static <T,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,T>> CollectionValueComponentProvider<T,HeaderFooterFieldWrapper<T,com.vaadin.flow.component.orderedlayout.FlexLayout,com.vaadin.flow.component.orderedlayout.FlexLayout>> rowWithRemoveButtonLast(CollectionValueComponentProvider<T,F> inner, String removeButtonText)
CollectionValueComponentProvider that wraps given field with a layout containing a header and footer.
The footer contains a button that removes the entry from the collection.T - Type of the value.F - Type of the field used to show the value.inner - Inner field generator.removeButtonText - Text to appear on the button.CollectionValueComponentProvider that generates a HeaderFooterFieldWrapper with a given field, header and footer (with a button).public static <T,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,T>> CollectionValueComponentProvider<T,HeaderFooterFieldWrapper<T,com.vaadin.flow.component.orderedlayout.FlexLayout,com.vaadin.flow.component.orderedlayout.FlexLayout>> rowWithRemoveButtonFirst(CollectionValueComponentProvider<T,F> inner, String removeButtonText)
CollectionValueComponentProvider that wraps given field with a layout containing a header and footer.
The header contains a button that removes the entry from the collection.T - Type of the value.F - Type of the field used to show the value.inner - Inner field generator.removeButtonText - Text to appear on the button.CollectionValueComponentProvider that generates a HeaderFooterFieldWrapper with a given field, header (with a button) and a footer.public static <T,F extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,T>> CollectionValueComponentProvider<T,HeaderFooterFieldWrapper<T,com.vaadin.flow.component.orderedlayout.FlexLayout,com.vaadin.flow.component.orderedlayout.FlexLayout>> columnWithHeaderAndFooterRows(CollectionValueComponentProvider<T,F> inner, Collection<CollectionComponentProvider<?>> headerComponents, Collection<CollectionComponentProvider<?>> footerComponents)
CollectionValueComponentProvider for a column-based HeaderFooterFieldWrapper where header and footer are row-based FlexLayouts.T - Type of data to display.F - Type of field to use.inner - Inner field.headerComponents - Components to put in the header. Must never be null.footerComponents - Components to put in the footer. Must never be null.CollectionValueComponentProvider that produces a HeaderFooterFieldWrapper with a given field.public static CollectionLayoutProvider<HeaderFooterLayoutWrapper<com.vaadin.flow.component.orderedlayout.FlexLayout,com.vaadin.flow.component.orderedlayout.FlexLayout,com.vaadin.flow.component.orderedlayout.FlexLayout,com.vaadin.flow.component.orderedlayout.FlexLayout>> columnWithHeaderAndFooterRows(Collection<CollectionComponentProvider<?>> headerComponents, Collection<CollectionComponentProvider<?>> footerComponents)
CollectionLayoutProvider for a HeaderFooterLayoutWrapper based on FlexLayouts.
The content is column-based. The footer and header are row-based.
No parameter may ever be null.headerComponents - Components to place in the header.footerComponents - Components to place in the footer.CollectionLayoutProvider.public static CollectionComponentProvider<com.vaadin.flow.component.button.Button> removeAllButton(String text)
CollectionComponentProvider that produces a Button that clears the collection by calling CollectionController.removeAll().text - Text to appear on the button.CollectionComponentProvider that produces a Button.public static CollectionComponentProvider<com.vaadin.flow.component.button.Button> addFirstButton(String text)
CollectionComponentProvider that produces a Button that adds an element to the collection by calling CollectionController.add(int) with 0 as parameter.text - Text to appear on the button.CollectionComponentProvider that produces a Button.public static CollectionComponentProvider<com.vaadin.flow.component.button.Button> addLastButton(String text)
CollectionComponentProvider that produces a Button that adds an element to the collection by calling CollectionController.add().text - Text to appear on the button.CollectionComponentProvider that produces a Button.public static CollectionComponentProvider<IndexedButton> removeButton(String text)
CollectionComponentProvider that produces an IndexedButton that removes a given element from the collection by calling CollectionController.remove(int).text - Text to appear on the button.CollectionComponentProvider that produces a Button.public static <K,V,C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,K>,W extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,V>> CollectionValueComponentProvider<Map.Entry<K,V>,MapEntryField<K,V>> mapEntryField(com.vaadin.flow.function.SerializableSupplier<C> keyComponentSupplier, com.vaadin.flow.function.SerializableSupplier<W> valueComponentSupplier)
CollectionValueComponentProvider that produces a MapEntryField with given key and value suppliers.K - Key type.V - Value type.C - Ensures key component supplier is a Component that HasValue of type K.W - Ensures value component supplier is a Component that HasValue of type V.keyComponentSupplier - Supplier of components capable of displaying keys.valueComponentSupplier - Supplier of components capable of displaying values.CollectionValueComponentProvider of MapEntryFields.public static <K,V,C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasLabel & com.vaadin.flow.component.HasValue<?,K>,W extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasLabel & com.vaadin.flow.component.HasValue<?,V>> CollectionValueComponentProvider<Map.Entry<K,V>,MapEntryField<K,V>> mapEntryField(String keyLabel, com.vaadin.flow.function.SerializableSupplier<C> keyComponentSupplier, String valueLabel, com.vaadin.flow.function.SerializableSupplier<W> valueComponentSupplier)
CollectionValueComponentProvider that produces a MapEntryField with given key and value suppliers, but also sets labels to both produced components..K - Key type.V - Value type.C - Ensures key component supplier is a Component that HasLabel and HasValue of type K.W - Ensures value component supplier is a Component that HasLabel and HasValue of type V.keyLabel - Label for the key component. It is applied as is.keyComponentSupplier - Supplier of components capable of displaying keys.valueLabel - Label for the value component. It is applied as is.valueComponentSupplier - Supplier of components capable of displaying values.CollectionValueComponentProvider of MapEntryFields.Copyright © 2023 Miki. All rights reserved.