Class NonNullEnumStyleableKey<T extends Enum<T>>

Type Parameters:
T - the enum type
All Implemented Interfaces:
ReadOnlyStyleableMapAccessor<T>, WritableStyleableMapAccessor<T>, Key<T>, MapAccessor<T>, NonNullKey<T>, NonNullMapAccessor<T>

public class NonNullEnumStyleableKey<T extends Enum<T>> extends NonNullObjectStyleableKey<T> implements WritableStyleableMapAccessor<T>, NonNullKey<T>
Convenience class for creating a Key for an enum type.
Author:
Werner Randelshofer
  • Constructor Details

    • NonNullEnumStyleableKey

      public NonNullEnumStyleableKey(String xmlName, Class<T> clazz, T defaultValue)
      Creates a new instance with the specified name, enum class, mask and default value.
      Parameters:
      xmlName - The XML name of the key.
      clazz - The enum class.
      defaultValue - The default value.
    • NonNullEnumStyleableKey

      public NonNullEnumStyleableKey(String xmlName, String cssName, Class<T> clazz, T defaultValue)
      Creates a new instance with KebabCaseEnumCssConverter.
      Parameters:
      xmlName - The XML name of the key.
      cssName - The CSS name of the key.
      clazz - The enum class.
      defaultValue - The default value.
    • NonNullEnumStyleableKey

      public NonNullEnumStyleableKey(String xmlName, String cssName, Class<T> clazz, org.jhotdraw8.base.converter.Converter<T> converter, T defaultValue)
      Creates a new instance.
      Parameters:
      xmlName - The XML name of the key.
      cssName - The CSS name of the key.
      clazz - The enum class.
      converter - The CSS converter
      defaultValue - The default value.