Class ItemComboBoxModel<T>

    • Method Detail

      • indexOf

        public int indexOf​(T value)
        Returns the index of the Item representing the given value, -1 if this model does not contain such an Item.
        Parameters:
        value - the value
        Returns:
        the index of the Item representing the given value, -1 if not found
      • itemComboBoxModel

        public static <T> ItemComboBoxModel<T> itemComboBoxModel()
        Type Parameters:
        T - the Item value type
        Returns:
        a new combo box model
      • itemComboBoxModel

        public static <T> ItemComboBoxModel<T> itemComboBoxModel​(List<Item<T>> items)
        Type Parameters:
        T - the Item value type
        Parameters:
        items - the items
        Returns:
        a new combo box model
      • sortedItemComboBoxModel

        public static <T> ItemComboBoxModel<T> sortedItemComboBoxModel()
        Type Parameters:
        T - the Item value type
        Returns:
        a new combo box model
      • sortedItemComboBoxModel

        public static <T> ItemComboBoxModel<T> sortedItemComboBoxModel​(List<Item<T>> items)
        Type Parameters:
        T - the Item value type
        Parameters:
        items - the items
        Returns:
        a new combo box model
      • sortedItemComboBoxModel

        public static <T> ItemComboBoxModel<T> sortedItemComboBoxModel​(Comparator<Item<T>> sortComparator)
        Type Parameters:
        T - the Item value type
        Parameters:
        sortComparator - the sort comparator to use
        Returns:
        a new combo box model
      • sortedItemComboBoxModel

        public static <T> ItemComboBoxModel<T> sortedItemComboBoxModel​(List<Item<T>> items,
                                                                       Comparator<Item<T>> sortComparator)
        Type Parameters:
        T - the Item value type
        Parameters:
        items - the items
        sortComparator - the sort comparator to use
        Returns:
        a new combo box model
      • booleanItemComboBoxModel

        public static ItemComboBoxModel<Boolean> booleanItemComboBoxModel()
        Constructs a new Boolean based ItemComboBoxModel with null as the initially selected value.
        Returns:
        a Boolean based ItemComboBoxModel
      • booleanItemComboBoxModel

        public static ItemComboBoxModel<Boolean> booleanItemComboBoxModel​(String nullCaption)
        Constructs a new Boolean based ItemComboBoxModel with null as the initially selected value.
        Parameters:
        nullCaption - the string representing a null value
        Returns:
        a Boolean based ItemComboBoxModel
      • booleanItemComboBoxModel

        public static ItemComboBoxModel<Boolean> booleanItemComboBoxModel​(String nullCaption,
                                                                          String trueCaption,
                                                                          String falseCaption)
        Constructs a new Boolean based ItemComboBoxModel with null as the initially selected value.
        Parameters:
        nullCaption - the string representing a null value
        trueCaption - the string representing the boolean value 'true'
        falseCaption - the string representing the boolean value 'false'
        Returns:
        a Boolean based ItemComboBoxModel