org.openstreetmap.josm.gui.widgets
Class ComboBoxHistory
java.lang.Object
javax.swing.AbstractListModel
javax.swing.DefaultComboBoxModel
org.openstreetmap.josm.gui.widgets.ComboBoxHistory
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<AutoCompletionListItem>, javax.swing.ComboBoxModel, javax.swing.ListModel, javax.swing.MutableComboBoxModel
public class ComboBoxHistory
- extends javax.swing.DefaultComboBoxModel
- implements java.lang.Iterable<AutoCompletionListItem>
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Methods inherited from class javax.swing.DefaultComboBoxModel |
getElementAt, getIndexOf, getSelectedItem, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt, setSelectedItem |
Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.ListModel |
addListDataListener, removeListDataListener |
maxSize
private int maxSize
listeners
private java.util.List<HistoryChangedListener> listeners
ComboBoxHistory
public ComboBoxHistory(int size)
addElement
public void addElement(java.lang.Object o)
- Adds or moves an element to the top of the history
- Specified by:
addElement
in interface javax.swing.MutableComboBoxModel
- Overrides:
addElement
in class javax.swing.DefaultComboBoxModel
iterator
public java.util.Iterator<AutoCompletionListItem> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<AutoCompletionListItem>
setItemsAsString
public void setItemsAsString(java.util.List<java.lang.String> items)
asStringList
public java.util.List<java.lang.String> asStringList()
addHistoryChangedListener
public void addHistoryChangedListener(HistoryChangedListener l)
removeHistoryChangedListener
public void removeHistoryChangedListener(HistoryChangedListener l)
fireHistoryChanged
private void fireHistoryChanged()
JOSM