public class ComboBoxHistory extends DefaultComboBoxModel implements Iterable<AutoCompletionListItem>
| Modifier and Type | Field and Description |
|---|---|
private List<HistoryChangedListener> |
listeners |
private int |
maxSize |
listenerList| Constructor and Description |
|---|
ComboBoxHistory(int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(Object o)
Adds or moves an element to the top of the history
|
void |
addHistoryChangedListener(HistoryChangedListener l) |
List<String> |
asStringList() |
private void |
fireHistoryChanged() |
Iterator<AutoCompletionListItem> |
iterator() |
void |
removeHistoryChangedListener(HistoryChangedListener l) |
void |
setItemsAsString(List<String> items) |
getElementAt, getIndexOf, getSelectedItem, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt, setSelectedItemaddListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratoraddListDataListener, removeListDataListenerprivate int maxSize
private List<HistoryChangedListener> listeners
public ComboBoxHistory(int size)
public void addElement(Object o)
addElement in interface MutableComboBoxModeladdElement in class DefaultComboBoxModelpublic Iterator<AutoCompletionListItem> iterator()
iterator in interface Iterable<AutoCompletionListItem>public void setItemsAsString(List<String> items)
public List<String> asStringList()
public void addHistoryChangedListener(HistoryChangedListener l)
public void removeHistoryChangedListener(HistoryChangedListener l)
private void fireHistoryChanged()