Changeset 2219 in josm for trunk/src/org
- Timestamp:
- 2009-09-30T16:49:46+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/widgets
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java
r2218 r2219 39 39 private int maxSize = 10; 40 40 41 private List<HistoryChangedListener> listeners = new ArrayList<HistoryChangedListener>(); 42 41 43 public ComboBoxHistory(int size) { 42 44 maxSize = size; … … 69 71 // set selected item to the one just added 70 72 setSelectedItem(o); 73 74 fireHistoryChanged(); 71 75 } 72 76 … … 110 114 return list; 111 115 } 116 117 public void addHistoryChangedListener(HistoryChangedListener l) { 118 listeners.add(l); 119 } 120 121 public void removeHistoryChangedListener(HistoryChangedListener l) { 122 listeners.remove(l); 123 } 124 125 private void fireHistoryChanged() { 126 for (HistoryChangedListener l : listeners) { 127 l.historyChanged(asList()); 128 } 129 } 112 130 }
Note:
See TracChangeset
for help on using the changeset viewer.