Changeset 5546 in josm


Ignore:
Timestamp:
2012-11-01T11:33:12+01:00 (10 years ago)
Author:
bastiK
Message:

remove old migration code

Location:
trunk/src/org/openstreetmap/josm/gui/preferences/projection
Files:
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java

    r5248 r5546  
    3838import org.openstreetmap.josm.tools.Utils;
    3939
    40 public class CustomProjectionChoice extends AbstractProjectionChoice implements Alias, SubPrefsOptions {
     40public class CustomProjectionChoice extends AbstractProjectionChoice implements SubPrefsOptions {
    4141
    4242    private String pref;
     
    230230
    231231    @Override
    232     public String getAlias() {
    233         return "org.openstreetmap.josm.data.projection.CustomProjectionPrefGui";
    234     }
    235 
    236     @Override
    237232    public boolean showProjectionCode() {
    238233        return false;
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/GaussKruegerProjectionChoice.java

    r5236 r5546  
    1010import org.openstreetmap.josm.data.projection.Projection;
    1111
    12 public class GaussKruegerProjectionChoice extends ListProjectionChoice implements Alias {
     12public class GaussKruegerProjectionChoice extends ListProjectionChoice {
    1313
    1414    private static String[] zones = { "2", "3", "4", "5" };
     
    5757    }
    5858   
    59     @Override
    60     public String getAlias() {
    61         return GaussKrueger.class.getName();
    62     }
    63 
    6459}
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertCC9ZonesProjectionChoice.java

    r5236 r5546  
    1616import org.openstreetmap.josm.tools.ImageProvider;
    1717
    18 public class LambertCC9ZonesProjectionChoice extends ListProjectionChoice implements Alias {
     18public class LambertCC9ZonesProjectionChoice extends ListProjectionChoice {
    1919
    2020    private static String[] lambert9zones = {
     
    8888    }
    8989
    90     @Override
    91     public String getAlias() {
    92         return LambertCC9Zones.class.getName();
    93     }
    94 
    9590}
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertProjectionChoice.java

    r5236 r5546  
    1616import org.openstreetmap.josm.tools.ImageProvider;
    1717
    18 public class LambertProjectionChoice extends ListProjectionChoice implements Alias {
     18public class LambertProjectionChoice extends ListProjectionChoice {
    1919
    2020    public static String[] lambert4zones = {
     
    8282    }
    8383
    84     @Override
    85     public String getAlias() {
    86         return Lambert.class.getName();
    87     }
    88 
    8984}
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java

    r5429 r5546  
    5555    private static List<ProjectionChoice> projectionChoices = new ArrayList<ProjectionChoice>();
    5656    private static Map<String, ProjectionChoice> projectionChoicesById = new HashMap<String, ProjectionChoice>();
    57     private static Map<String, String> aliasNormalizer = new HashMap<String, String>();
    5857
    5958    public static ProjectionChoice mercator = new SingleProjectionChoice("core:mercator", new Mercator());
     
    8281        projectionChoices.add(c);
    8382        projectionChoicesById.put(c.getId(), c);
    84         aliasNormalizer.put(c.getId(), c.getId());
    85         if (c instanceof Alias) {
    86             String alias = ((Alias) c).getAlias();
    87             projectionChoicesById.put(alias, c);
    88             aliasNormalizer.put(alias, c.getId());
    89         }
    9083    }
    9184
     
    288281            ProjectionChoice pc1 = (ProjectionChoice) projectionCombo.getItemAt(i);
    289282            pc1.setPreferences(getSubprojectionPreference(pc1));
    290             if (pc1.getId().equals(aliasNormalizer.get(PROP_PROJECTION.get()))) {
     283            if (pc1.getId().equals(PROP_PROJECTION.get())) {
    291284                projectionCombo.setSelectedIndex(i);
    292285                selectedProjectionChanged(pc1);
     
    309302
    310303    private Collection<String> getSubprojectionPreference(ProjectionChoice pc) {
    311         Collection<String> c1 = Main.pref.getCollection("projection.sub."+pc.getId(), null);
    312         if (c1 != null)
    313             return c1;
    314         if (pc instanceof Alias) {
    315             String alias = ((Alias) pc).getAlias();
    316             String sname = alias.substring(alias.lastIndexOf(".")+1);
    317             return Main.pref.getCollection("projection.sub."+sname, null);
    318         }
    319         return null;
     304        return Main.pref.getCollection("projection.sub."+pc.getId(), null);
    320305    }
    321306
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/PuwgProjectionChoice.java

    r5236 r5546  
    1010import org.openstreetmap.josm.data.projection.Puwg;
    1111
    12 public class PuwgProjectionChoice extends ListProjectionChoice implements Alias {
     12public class PuwgProjectionChoice extends ListProjectionChoice {
    1313
    1414    public PuwgProjectionChoice() {
     
    4040
    4141    @Override
    42     public String getAlias() {
    43         return Puwg.class.getName();
    44     }
    45 
    46     @Override
    4742    protected String indexToZone(int index) {
    4843        return Puwg.zones[index].toCode();
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/SingleProjectionChoice.java

    r5234 r5546  
    1515 * The GUI is an empty panel.
    1616 */
    17 public class SingleProjectionChoice implements ProjectionChoice, Alias {
     17public class SingleProjectionChoice implements ProjectionChoice {
    1818
    1919    private String id;
     
    7272            return null;
    7373    }
    74 
    75     @Override
    76     public String getAlias() {
    77         return projection.getClass().getName();
    78     }
    7974}
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java

    r5236 r5546  
    2020import org.openstreetmap.josm.tools.GBC;
    2121
    22 public class UTMProjectionChoice extends ListProjectionChoice implements Alias {
     22public class UTMProjectionChoice extends ListProjectionChoice {
    2323
    2424    private static final UTM.Hemisphere DEFAULT_HEMISPHERE = UTM.Hemisphere.North;
     
    148148    }
    149149
    150     @Override
    151     public String getAlias() {
    152         return UTM.class.getName();
    153     }
    154 
    155150}
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTM_France_DOM_ProjectionChoice.java

    r5236 r5546  
    1010import org.openstreetmap.josm.data.projection.UTM_France_DOM;
    1111
    12 public class UTM_France_DOM_ProjectionChoice extends ListProjectionChoice implements Alias {
     12public class UTM_France_DOM_ProjectionChoice extends ListProjectionChoice {
    1313
    1414    private final static String FortMarigotName = tr("Guadeloupe Fort-Marigot 1949");
     
    5858    }
    5959
    60     @Override
    61     public String getAlias() {
    62         return UTM_France_DOM.class.getName();
    63     }
    64 
    6560}
Note: See TracChangeset for help on using the changeset viewer.