T - Um objeto comparable.public class SortedComboBoxModel<T extends Comparable<T>> extends DefaultComboBoxModel
listenerList| Constructor and Description |
|---|
SortedComboBoxModel()
Construtor.
|
SortedComboBoxModel(boolean hasSpecialElement)
Construtor.
|
SortedComboBoxModel(Comparator<T> comparator)
Construtor.
|
SortedComboBoxModel(T[] items)
Construtor.
|
SortedComboBoxModel(T[] items,
Comparator<T> comparator)
Construtor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(Object element) |
void |
insertElementAt(Object element,
int index) |
static void |
main(String[] args)
Método de teste.
|
getElementAt, getIndexOf, getSelectedItem, getSize, removeAllElements, removeElement, removeElementAt, setSelectedItemaddListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListDataListener, removeListDataListenerpublic SortedComboBoxModel()
public SortedComboBoxModel(boolean hasSpecialElement)
hasSpecialElement - Indica se haverá um elemento especial que ficará
not topo da lista e não será passivel de ordenação.public SortedComboBoxModel(T[] items)
items - Itens que serão adicionados no modelo.public SortedComboBoxModel(Comparator<T> comparator)
comparator - Um comparador especial para ordenação do modelo.public SortedComboBoxModel(T[] items, Comparator<T> comparator)
items - Itens que serão adicionados no modelo.comparator - Um comparador especial para ordenação do modelo.public void addElement(Object element)
addElement in interface MutableComboBoxModeladdElement in class DefaultComboBoxModelpublic void insertElementAt(Object element, int index)
insertElementAt in interface MutableComboBoxModelinsertElementAt in class DefaultComboBoxModelpublic static void main(String[] args)
args - Copyright © 2019 Tecgraf/PUC-Rio. All rights reserved.