Changeset 3779 in josm for trunk/src/org/openstreetmap/josm/data/projection/UTM_France_DOM.java
- Timestamp:
- 2011-01-08T01:04:23+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/UTM_France_DOM.java
r3473 r3779 9 9 10 10 import java.awt.GridBagLayout; 11 import java.awt.event.ActionListener; 11 12 import java.util.Collection; 12 13 import java.util.Collections; … … 410 411 } 411 412 412 public void setupPreferencePanel(JPanel p) { 413 @Override 414 public void setupPreferencePanel(JPanel p, ActionListener listener) { 413 415 JComboBox prefcb = new JComboBox(utmGeodesicsNames); 414 416 … … 419 421 p.add(prefcb, GBC.eop().fill(GBC.HORIZONTAL)); 420 422 p.add(GBC.glue(1, 1), GBC.eol().fill(GBC.BOTH)); 423 if (listener != null) { 424 prefcb.addActionListener(listener); 425 } 421 426 } 422 427 … … 430 435 } 431 436 437 @Override 438 public String[] allCodes() { 439 return utmEPSGs; 440 } 441 432 442 public Collection<String> getPreferencesFromCode(String code) { 433 443 for (int i=0; i < utmEPSGs.length; i++ ) 434 444 if (utmEPSGs[i].endsWith(code)) 435 return Collections.singleton(Integer.toString(i ));445 return Collections.singleton(Integer.toString(i+1)); 436 446 return null; 437 447 } … … 444 454 { 445 455 currentGeodesic = Integer.parseInt(s)-1; 446 if(currentGeodesic < 0 || currentGeodesic > 4) {456 if(currentGeodesic < 0 || currentGeodesic >= utmEPSGs.length) { 447 457 currentGeodesic = DEFAULT_GEODESIC; 448 458 }
Note:
See TracChangeset
for help on using the changeset viewer.