public final class ComponentSelectHelpers extends Object
ComponentSelect.| Modifier and Type | Method and Description |
|---|---|
static <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.ClickNotifier<C> & com.vaadin.flow.component.HasStyle> |
changeStyle(String fromStyle,
String toStyle)
Returns a consumer that changes the style of the component from a given style to another style.
|
static <T,C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.ClickNotifier<C> & com.vaadin.flow.component.HasText> |
simpleComponentFactory(Supplier<C> constructor)
Returns a simple component factory that uses
Object.toString() to produce component text. |
static <T,C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.ClickNotifier<C> & com.vaadin.flow.component.HasText> |
simpleComponentFactory(Supplier<C> constructor,
Function<T,String> captionGenerator)
Returns a simple component factory.
|
public static <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.ClickNotifier<C> & com.vaadin.flow.component.HasStyle> com.vaadin.flow.function.SerializableBiConsumer<Integer,C> changeStyle(String fromStyle, String toStyle)
C - Type of the component.fromStyle - Style to change from (will be removed from the style class names of the component).toStyle - Style to change to (will be added to the style class names of the component).SerializableBiConsumer.public static <T,C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.ClickNotifier<C> & com.vaadin.flow.component.HasText> com.vaadin.flow.function.SerializableBiFunction<Integer,T,C> simpleComponentFactory(Supplier<C> constructor)
Object.toString() to produce component text.T - Type of item.C - Type of component.constructor - Reference to a constructor of a component.SerializableBiFunction that returns components with caption.public static <T,C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.ClickNotifier<C> & com.vaadin.flow.component.HasText> com.vaadin.flow.function.SerializableBiFunction<Integer,T,C> simpleComponentFactory(Supplier<C> constructor, Function<T,String> captionGenerator)
T - Type of item.C - Type of component.constructor - Reference to a constructor of a component.captionGenerator - Function to generate captions.SerializableBiFunction that returns components with caption.Copyright © 2024 Miki. All rights reserved.