Package com.illumon.iris.gui.widget
Class SortedComboBoxModel<T>
java.lang.Object
com.illumon.iris.gui.widget.SortedComboBoxModel<T>
- Type Parameters:
T-
- All Implemented Interfaces:
ComboBoxModel<T>,ListModel<T>,MutableComboBoxModel<T>
public class SortedComboBoxModel<T> extends Object implements MutableComboBoxModel<T>
A
ComboBoxModel that maintains it's items in a sorted order.-
Constructor Summary
Constructors Constructor Description SortedComboBoxModel(Comparator<T> comparator, List<T> items)SortedComboBoxModel(Comparator<T> comparator, T... items) -
Method Summary
Modifier and Type Method Description voidadd(T item)voidaddElement(T item)voidaddListDataListener(ListDataListener l)voidclear()TgetElementAt(int index)ObjectgetSelectedItem()intgetSize()voidinsertElementAt(T item, int index)voidremove(T item)voidremoveElement(Object obj)voidremoveElementAt(int index)voidremoveListDataListener(ListDataListener l)voidsetSelectedItem(Object anItem)
-
Constructor Details
-
Method Details
-
setSelectedItem
- Specified by:
setSelectedItemin interfaceComboBoxModel<T>
-
getSelectedItem
- Specified by:
getSelectedItemin interfaceComboBoxModel<T>
-
getSize
public int getSize() -
getElementAt
- Specified by:
getElementAtin interfaceListModel<T>
-
add
-
remove
-
addElement
- Specified by:
addElementin interfaceMutableComboBoxModel<T>
-
removeElement
- Specified by:
removeElementin interfaceMutableComboBoxModel<T>
-
insertElementAt
- Specified by:
insertElementAtin interfaceMutableComboBoxModel<T>
-
removeElementAt
public void removeElementAt(int index)- Specified by:
removeElementAtin interfaceMutableComboBoxModel<T>
-
clear
public void clear() -
addListDataListener
- Specified by:
addListDataListenerin interfaceListModel<T>
-
removeListDataListener
- Specified by:
removeListDataListenerin interfaceListModel<T>
-