Class SortedListModel<E>
java.lang.Object
de.bsvrz.sys.funclib.kappich.collections.SortedListModel<E>
- All Implemented Interfaces:
ComboBoxModel<E>,ListModel<E>
Ein einfaches ListModel, das eine Menge von Elementen darstellt und diese Objekte nach einem Comparator sortiert. Der Comparator wird im
Konstruktor übergeben.
Das ListModel unterstützt außerdem eine schnelle indexOf()-Implementierung.
Wenn als Comparator ein CollatorComparator angegeben wird, wird eine optimierte Sortierung mit CollationKeys
verwendet.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidget(int index) getElementAt(int index) intgetSize()intvoidvoidsetElements(Collection<? extends E> elements) voidsetSelectedItem(Object anItem)
-
Constructor Details
-
SortedListModel
-
-
Method Details
-
getSelectedItem
- Specified by:
getSelectedItemin interfaceComboBoxModel<E>
-
setSelectedItem
- Specified by:
setSelectedItemin interfaceComboBoxModel<E>
-
getSize
public int getSize() -
getElementAt
- Specified by:
getElementAtin interfaceListModel<E>
-
setElements
-
indexOf
-
addListDataListener
- Specified by:
addListDataListenerin interfaceListModel<E>
-
removeListDataListener
- Specified by:
removeListDataListenerin interfaceListModel<E>
-
get
-
getElementsUnsorted
-