public class ComboBoxHistory extends DefaultComboBoxModel<AutoCompletionListItem> 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(AutoCompletionListItem o)
Adds or moves an element to the top of the history
|
void |
addElement(String s) |
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, setSelectedItem
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListDataListener, removeListDataListener
private int maxSize
private List<HistoryChangedListener> listeners
public ComboBoxHistory(int size)
public void addElement(String s)
public void addElement(AutoCompletionListItem o)
addElement
in interface MutableComboBoxModel<AutoCompletionListItem>
addElement
in class DefaultComboBoxModel<AutoCompletionListItem>
public 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()