Enum MLItemType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MLItemType>

    public enum MLItemType
    extends java.lang.Enum<MLItemType>
    The mobile list item types.
    Author:
    Christopher Mindus
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BUTTON_SET
      The button set consists of a few buttons that behaves as radio button choices, i.e.
      CALENDAR
      Calendar date input.
      CHECKBOX
      The checkbox has a text on leading/trailing sides and a description.
      COMBOBOX
      Combobox with optional textual input that displays a pop-up list of choices.
      DATE_TIME
      Date/time input in form of a pop-up to input a date and/or time in various forms.
      NUMERIC_SPINNER
      Numeric input in form of an spinner for integer values between two values.
      RADIO_BUTTON
      The radio button has a text on leading/trailing sides and a description.
      SIMPLE
      A simple list item has a text on leading/trailing sides and a description.
      SLIDER
      The slider can be set to represent a value in a range.
      SWITCH
      The switch has a text on leading side and a description.
      TEXT_ENTRY
      Text entry is a text box that accepts any user input, with the additional specification of text type to show a special keyboard (e.g.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int type
      The type value.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static MLItemType from​(int type)
      Returns the type from an integer value.
      static MLItemType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MLItemType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • SIMPLE

        public static final MLItemType SIMPLE
        A simple list item has a text on leading/trailing sides and a description.

        The trailing side is optional as well as the description.

        An optional description text can be added to the bottom of the list item.

      • CHECKBOX

        public static final MLItemType CHECKBOX
        The checkbox has a text on leading/trailing sides and a description. On the trailing side, a checkbox is shown.

        The trailing text can be left adjusted after the leading text that may have a fixed width in order to have an additional column of text.

        The selection state is independent of other components, support for third state exists.

        An optional description text can be added to the bottom of the list item.

      • SWITCH

        public static final MLItemType SWITCH
        The switch has a text on leading side and a description. On the trailing side, a switch is shown.

        The switch can be left adjusted after the leading text that may have a fixed width in order to have an additional column of text.

        The selection state is independent of other components, and does not support third state (as the checkbox does).

        An optional description text can be added to the bottom of the list item.

      • RADIO_BUTTON

        public static final MLItemType RADIO_BUTTON
        The radio button has a text on leading/trailing sides and a description. On the trailing side, a radio button is shown.

        The trailing text can be left adjusted after the leading text that may have a fixed width in order to have an additional column of text.

        The selection state only allows one radio button in the same group to be selected at a time.

        An optional description text can be added to the bottom of the list item.

      • BUTTON_SET

        public static final MLItemType BUTTON_SET
        The button set consists of a few buttons that behaves as radio button choices, i.e. one button is selected at a time.

        The button set can be preceded with a text and have an optional description below.

        The button set is normally justified to the trailing side, but has an option to adjust to leading position. The text width can be fixed in order to produce a column for alignment.

        An optional description text can be added to the bottom of the list item.

      • TEXT_ENTRY

        public static final MLItemType TEXT_ENTRY
        Text entry is a text box that accepts any user input, with the additional specification of text type to show a special keyboard (e.g. URL, Phone Number, Numeric).

        The text entry can be preceded with a leading text with an optional fixed width, and the text entry will take up the remaining space in the list item.

        The text entry may have a fixed width and be trailing justified (i.e. right for LTR or left for RTL).

        An action button can be added to the trailing side.

        An optional description text can be added to the bottom of the list item.

      • NUMERIC_SPINNER

        public static final MLItemType NUMERIC_SPINNER
        Numeric input in form of an spinner for integer values between two values. A small pop-up is displayed to perform the input, or optionally a plus/minus sign surrounding the value.

        The numeric input can be preceded with a leading text with an optional fixed width, and the text entry will take up the remaining space in the list item.

        The text entry may have a fixed width and be trailing justified (i.e. right for LTR or left for RTL).

        An action button can be added to the trailing side.

        An optional description text can be added to the bottom of the list item.

      • DATE_TIME

        public static final MLItemType DATE_TIME
        Date/time input in form of a pop-up to input a date and/or time in various forms.

        The date/time input can be preceded with a leading text with an optional fixed width, and the text entry will take up the remaining space in the list item.

        An action button can be added to the trailing side.

        An optional description text can be added to the bottom of the list item.

      • CALENDAR

        public static final MLItemType CALENDAR
        Calendar date input.

        An action button can be added to the trailing side.

        An optional description text can be added to the bottom of the list item.

      • COMBOBOX

        public static final MLItemType COMBOBOX
        Combobox with optional textual input that displays a pop-up list of choices.

        The combobox input can be preceded with a leading text with an optional fixed width, and the text entry will take up the remaining space in the list item.

        An action button can be added to the trailing side.

        An optional description text can be added to the bottom of the list item.

      • SLIDER

        public static final MLItemType SLIDER
        The slider can be set to represent a value in a range. It has various display options.

        The slider set can be preceded with a text and have an optional description below.

        The slider set is normally justified to the trailing side, but has an option to adjust to leading position. The text width can be fixed in order to produce a column for alignment.

        An optional description text can be added to the bottom of the list item.

    • Field Detail

      • type

        public final int type
        The type value.
    • Method Detail

      • values

        public static MLItemType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MLItemType c : MLItemType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MLItemType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • from

        public static MLItemType from​(int type)
        Returns the type from an integer value.
        Parameters:
        type - The type value.
        Returns:
        The type, or SIMPLE if the type value is not between 0 and 10 inclusive.