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 void
add(T item)
void
addElement(T item)
void
addListDataListener(ListDataListener l)
void
clear()
T
getElementAt(int index)
Object
getSelectedItem()
int
getSize()
void
insertElementAt(T item, int index)
void
remove(T item)
void
removeElement(Object obj)
void
removeElementAt(int index)
void
removeListDataListener(ListDataListener l)
void
setSelectedItem(Object anItem)
-
Constructor Details
-
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>
-