Package com.vaadin.ui

Interface StyleGenerator<T>

  • Type Parameters:
    T - the item type
    All Superinterfaces:
    java.util.function.Function<T,​java.lang.String>, java.io.Serializable, SerializableFunction<T,​java.lang.String>
    All Known Implementing Classes:
    ComboBox.DeclarativeStyleGenerator
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface StyleGenerator<T>
    extends SerializableFunction<T,​java.lang.String>
    A callback interface for generating custom CSS class names for items.
    Since:
    8.0
    Author:
    Vaadin Ltd
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String apply​(T item)
      Gets a class name for the item.
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Method Detail

      • apply

        java.lang.String apply​(T item)
        Gets a class name for the item.
        Specified by:
        apply in interface java.util.function.Function<T,​java.lang.String>
        Parameters:
        item - the item to get the class name for
        Returns:
        the generated class name