public final <E extends Enum<E>> StyleableProperty<E> createStyleableEnumProperty (S styleable, String propertyName, String cssProperty, Function<S, StyleableProperty<E>> function, Class<E> enumClass)

Create a StyleableProperty<E extends Enum<E>>. The initial value is null and inherit flag defaults to false. The enumClass parameter is the Class of the Enum that is the value of the property. For example,

     private static final StyleablePropertyFactory<MyControl> FACTORY = new StyleablePropertyFactory<>();
     StyleableProperty<Orientation> orientation =
         FACTORY.createStyleableEnumProperty(
             this,
             "orientation",
             "-my-orientation",
             s -> ((MyControl)s).orientation,
             Orientation.class);
 

Parameters:
styleable    The this reference of the returned property. This is also the property bean.
propertyName    The field name of the StyleableProperty<E extends Enum<E>>
cssProperty    The CSS property name
function    A function that returns the StyleableProperty<E extends Enum<E>> that was created by this method call.
enumClass    The Enum class that is the type of the StyleableProperty<E extends Enum<E>>.