Class EnumEditor<E extends Enum<E>>

    • Field Detail

      • type

        protected Class<E extends Enum<E>> type
        Type of enumeration
    • Constructor Detail

      • EnumEditor

        public EnumEditor​(Class<E> type)
      • EnumEditor

        public EnumEditor​(Class<E> type,
                          int maxOrdinal)
      • EnumEditor

        public EnumEditor​(E... universe)
    • Method Detail

      • newEditor

        public static <E extends Enum<E>> EnumEditor<E> newEditor​(Class<E> type)
        Creates a EnumEditor for the given enumeration type, with all values of enumeration.
        Type Parameters:
        E - generci type of enumeration
        Parameters:
        type - type of enumeration
        Returns:
        the instanciated editor
      • newEditor

        public static <E extends Enum<E>> EnumEditor<E> newEditor​(Class<E> type,
                                                                  int maxOrdinal)
        Creates a EnumEditor for the given enumeration type, with all values of enumeration which ordinal is strictly lower than the given maxOrdinal.
        Type Parameters:
        E - generic type of enumeration
        Parameters:
        type - type of enumeration
        maxOrdinal - the upper (strict) bound of ordinal values allowed
        Returns:
        the instanciated editor
      • newEditor

        public static <E extends Enum<E>> EnumEditor<E> newEditor​(E... universe)
        Creates a EnumEditor for the given enumeration type, with all given universe values of enumeration.
        Type Parameters:
        E - generci type of enumeration
        Parameters:
        universe - enumerations to put in editor
        Returns:
        the instanciated editor
      • getSelectedValue

        public E getSelectedValue()
      • setSelectedValue

        public void setSelectedValue​(E selectedValue)
      • getType

        public Class<E> getType()
      • buildModel

        protected static <E extends Enum<E>> E[] buildModel​(Class<E> type)
      • buildModel

        protected static <E extends Enum<E>> E[] buildModel​(Class<E> type,
                                                            int maxOrdinal)