Changeset 1747 in josm for trunk/src/org/openstreetmap/josm/gui/preferences/StyleSources.java
- Timestamp:
- 2009-07-08T15:26:12+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/StyleSources.java
r1743 r1747 95 95 } 96 96 97 public StyleSources(String pref, String iconpref, String url, boolean named, final String name)97 public StyleSources(String pref, String iconpref, final String url, boolean named, final String name) 98 98 { 99 99 sourcesList = new JList(new DefaultListModel()); … … 199 199 ((DefaultListModel)sourcesList.getModel()).addElement( 200 200 ((SourceInfo)sourcesDefaults.getSelectedValue()).url); 201 } 202 } 203 }); 204 205 JButton update = new JButton(tr("Update")); 206 update.addActionListener(new ActionListener(){ 207 public void actionPerformed(ActionEvent e) { 208 MirroredInputStream.cleanup(url); 209 getDefaults(url); 210 int num = sourcesList.getModel().getSize(); 211 if (num > 0) 212 { 213 ArrayList<String> l = new ArrayList<String>(); 214 for (int i = 0; i < num; ++i) 215 MirroredInputStream.cleanup((String)sourcesList.getModel().getElementAt(i)); 201 216 } 202 217 } … … 219 234 buttonPanel.add(edit, GBC.std().insets(5,5,5,0)); 220 235 buttonPanel.add(delete, GBC.std().insets(0,5,5,0)); 221 buttonPanel.add(copy, GBC.std().insets(0,5,0,0)); 236 buttonPanel.add(copy, GBC.std().insets(0,5,5,0)); 237 buttonPanel.add(update, GBC.std().insets(0,5,0,0)); 222 238 if(iconsList != null) 223 239 { … … 265 281 public void getDefaults(String name) 266 282 { 283 ((DefaultListModel)sourcesDefaults.getModel()).removeAllElements(); 267 284 String lang = Main.getLanguageCode()+"_"; 268 285 try
Note:
See TracChangeset
for help on using the changeset viewer.