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>
A
ComboBoxModel
that maintains it's items in a sorted order.-
Constructor Summary
ConstructorsConstructorDescriptionSortedComboBoxModel
(Comparator<T> comparator, List<T> items) SortedComboBoxModel
(Comparator<T> comparator, T... items) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addElement
(T item) void
void
clear()
getElementAt
(int index) int
getSize()
void
insertElementAt
(T item, int index) void
void
removeElement
(Object obj) void
removeElementAt
(int index) void
void
setSelectedItem
(Object anItem)
-
Constructor Details
-
SortedComboBoxModel
-
SortedComboBoxModel
-
-
Method Details
-
setSelectedItem
- Specified by:
setSelectedItem
in interfaceComboBoxModel<T>
-
getSelectedItem
- Specified by:
getSelectedItem
in interfaceComboBoxModel<T>
-
getSize
public int getSize() -
getElementAt
- Specified by:
getElementAt
in interfaceListModel<T>
-
add
-
remove
-
addElement
- Specified by:
addElement
in interfaceMutableComboBoxModel<T>
-
removeElement
- Specified by:
removeElement
in interfaceMutableComboBoxModel<T>
-
insertElementAt
- Specified by:
insertElementAt
in interfaceMutableComboBoxModel<T>
-
removeElementAt
public void removeElementAt(int index) - Specified by:
removeElementAt
in interfaceMutableComboBoxModel<T>
-
clear
public void clear() -
addListDataListener
- Specified by:
addListDataListener
in interfaceListModel<T>
-
removeListDataListener
- Specified by:
removeListDataListener
in interfaceListModel<T>
-