Changeset 8510 in josm for trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
- Timestamp:
- 2015-06-20T23:42:21+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
r8509 r8510 45 45 public Bookmark(Collection<String> list) { 46 46 List<String> array = new ArrayList<>(list); 47 if (array.size() < 5)47 if (array.size() < 5) 48 48 throw new IllegalArgumentException(tr("Wrong number of arguments for bookmark")); 49 49 name = array.get(0); … … 155 155 */ 156 156 public final void load() { 157 DefaultListModel<Bookmark> model = (DefaultListModel<Bookmark>) getModel();157 DefaultListModel<Bookmark> model = (DefaultListModel<Bookmark>) getModel(); 158 158 model.removeAllElements(); 159 159 Collection<Collection<String>> args = Main.pref.getArray("bookmarks", null); 160 if (args != null) {160 if (args != null) { 161 161 List<Bookmark> bookmarks = new LinkedList<>(); 162 for (Collection<String> entry : args) {162 for (Collection<String> entry : args) { 163 163 try { 164 164 bookmarks.add(new Bookmark(entry)); … … 179 179 public final void save() { 180 180 List<Collection<String>> coll = new LinkedList<>(); 181 for (Object o : ((DefaultListModel<Bookmark>) getModel()).toArray()) {181 for (Object o : ((DefaultListModel<Bookmark>) getModel()).toArray()) { 182 182 String[] array = new String[5]; 183 183 Bookmark b = (Bookmark) o;
Note:
See TracChangeset
for help on using the changeset viewer.