Interface FilterComboBoxModel.ComboBoxItems<T>

Type Parameters:
T - the item type
All Superinterfaces:
is.codion.common.model.FilterModel.Items<T>, is.codion.common.observer.Mutable<Collection<T>>, is.codion.common.observer.Observable<Collection<T>>, is.codion.common.observer.Observer<Collection<T>>
Enclosing interface:
FilterComboBoxModel<T>

public static interface FilterComboBoxModel.ComboBoxItems<T> extends is.codion.common.model.FilterModel.Items<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
     
    void
    replace(T item, T replacement)
    Replaces the given item in this combo box model
    is.codion.common.value.Value<Predicate<T>>
    Provides a way for the model to prevent the addition of certain items.

    Methods inherited from interface is.codion.common.model.FilterModel.Items

    addItem, addItems, contains, count, filter, filtered, removeItem, removeItems, visible

    Methods inherited from interface is.codion.common.observer.Mutable

    clear, set

    Methods inherited from interface is.codion.common.observer.Observable

    addConsumer, addListener, addWeakConsumer, addWeakListener, get, observer, optional, removeConsumer, removeListener, removeWeakConsumer, removeWeakListener
  • Method Details

    • validator

      is.codion.common.value.Value<Predicate<T>> validator()
      Provides a way for the model to prevent the addition of certain items. Trying to add items that fail validation will result in an exception. Note that any translation of the selected item is done before validation.
      Returns:
      the Value controlling the item validator
    • replace

      void replace(T item, T replacement)
      Replaces the given item in this combo box model
      Parameters:
      item - the item to replace
      replacement - the replacement item
      Throws:
      IllegalArgumentException - in case the replacement item fails validation
    • cleared

      boolean cleared()
      Returns:
      true if the items have been cleared and need to be refreshed
    • nullItem

      Returns:
      the null item