Changeset 1747 in josm for trunk/src/org/openstreetmap/josm/gui/preferences
- Timestamp:
- 2009-07-08T15:26:12+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/preferences
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/ProjectionPreference.java
r1743 r1747 54 54 projPanel.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 )); 55 55 projPanel.setLayout(new GridBagLayout()); 56 projPanel.add(new JLabel(tr("Display coordinates as")), GBC.std().insets(5,5,0,5)); 57 projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL)); 58 projPanel.add(coordinatesCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5)); 56 59 projPanel.add(new JLabel(tr("Projection method")), GBC.std().insets(5,5,0,5)); 57 60 projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL)); 58 61 projPanel.add(projectionCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5)); 59 projPanel.add(new JLabel(tr("Display coordinates as")), GBC.std().insets(5,5,0,5));60 projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));61 projPanel.add(coordinatesCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));62 62 projPanel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH)); 63 63 JScrollPane scrollpane = new JScrollPane(projPanel); -
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.